Skip to main content

All 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 ...
schrödingcöder's user avatar
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 ...
haskell looks great's user avatar