Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Son I sure hope thats not an Int. Its double, float or something else


To be doubly pedantic, it probably is an int in many places, to avoid rounding errors.


Correct. In finance it is the norm to store all currency amounts as int.


Let's hope it's a signed int, then.


I sure hope "something else". I'd really like to think it's fixed precision.


Often trading systems represent prices as integral values; using fixed point. It eliminates some problems with rounding.


Might be stored as an int in cents (or whatever the tick size is).


That's what I would do. Would never trust floating point numbers with something as important as currency.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: