title: Caveat floating point
body: <p>I need to find three values x,y,z of type Double, such that (x + y) + z == 1.0 and x + (y + z) == 0.0. I'm trying to solve this problem on Scala. This problem has to do with <a href="https://stackoverflow.com/questions/588004/is-floating-point-math-broken">Is floating point math broken?</a> but how i'm supposed to find such values? Is there any algorithm to complete this task? From what i have read, if the denominator is the power of two it is converted to floating point without an error. I tried values like 0.5, 1, 0, 0.25 still no success. Can anyone help me?</p>