News for hackers. Stuff that matters.
Re:0.30000000000000004 by ehvatum on Monday December 02, 2019 @05:22PM (#21687711)
My day job is high performance financial model implementation. Floats storing dollar amounts are the norm for predictions. Operating on values that are linear combinations of integer fractions multiplied by irrational constants (such as Euler’s number) is perfectly possible, but it’s much more performant to be aware of floating point epsilon when writing modeling code.
Re:0.30000000000000004 by TeMPOraL on Monday December 02, 2019 @05:53PM (#21687951)
Financial models are predictive, they don't have to be accurate to a penny, right? Unlike processing actual money people own.

(I do some work with predictive simulations about money, but outside finance, and there we care that the result has accurate order of magnitude. Floats were used extensively in the project; I actually upgraded them to doubles for the sake of handling larger order of magnitude spans.)

Re:0.30000000000000004 by ehvatum on Tuesday December 03, 2019 @10:15AM (#21692938)
That’s right. The trading desk also uses floats for analysis and regulatory reporting. Actual account balances come through an API that gives us floats, but rumor has it that it’s backed by Hollerith a punch card library maintained by cybernetic undead, encoded in 1215-EBCDIC-BLACKTONGUE.
Re:0.30000000000000004 by nothrabannosir on Monday December 02, 2019 @05:33PM (#21687814)
I stand corrected, thanks for this example.