All Questions
2 questions
6
votes
3
answers
383
views
Can referential transparency be assumed when dealing with floating-point arithmetic?
A pure function is assumed to produce the same outputs given the same inputs. Suppose an (otherwise) side-effects free function computes with floating-point numbers. Due to numerical error, these ...
12
votes
2
answers
1k
views
Haskell ways to the 3n+1 problem
Here is a simple programming problem from SPOJ: http://www.spoj.com/problems/PROBTRES/.
Basically, you are asked to output the biggest Collatz cycle for numbers between i and j. (Collatz cycle of a ...