Hacker News new | ask | show | jobs
by devjab 853 days ago
We use long double to present financial money amounts with a little safety on top of it before it’s consumed by whatever JavaScript (Typescript really) frontend it heads to. Works fine. Outside of the need for speed it’s one of the few areas we use c in our backend services.

We don’t store the data in floats or anything resembling it, however.

1 comments

Are you using also doubles for calculations or just presentation? Either way doesnt pass the smell test for me.
It depends we sometimes do since quadruple precision with checks tends to be safe, but for the most parts we don’t as most things are basically transactions unless you need to display something.