Re:Excel_to_code – Converts some Excel spreadsheets to C
by AceJohnny2 on Friday July 24, 2015 @08:42PM
(#9946084)
I expect all financial math is fixed point.
[ Parent
| on HN ]
Re:Excel_to_code – Converts some Excel spreadsheets to C
by timrobinson on Saturday July 25, 2015 @03:10AM
(#9946834)
It's absolutely not. Everything I've seen has been 64-bit double. If you need to, you round either intermediate or final calcs to a set precision.
I once worked on replicating a particular index, and the engine used fixed point internally. In order to get the values to match with the ones published officially, we had to emulate Excel floating point: our fixed point values wouldn't line up with theirs.
Re:Excel_to_code – Converts some Excel spreadsheets to C
by chillingeffect on Friday July 24, 2015 @11:33PM
(#9946446)
I'm not sure why ppl downvoted you. But from what I've heard - never implemented myself - what you're saying is common... At least as far as using separate fixed point values to represent the left and right sides of the decimal place.
Now I'm sure for things like computing interest by raising things to a power or even computing percentages, etc, floating point is used (and eventually reduced to fixed point values), so maybe someone found it too absolute to say "all" financial math is fixed point? Anyway, if someone with experience can confirm or deny, it would be neat...
Re:Excel_to_code – Converts some Excel spreadsheets to C
by JupiterMoon on Saturday July 25, 2015 @07:50AM
(#9947320)
Because he is wrong? Excel uses 64 bit floats.