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

How often do programmers deal with floating point?

I deal with business math, which while there are positions to the right of the decimal point we have very well defined numbers and such.

What languages other than javascript have issues such as described in this article?



I'm a game programmer so I end up dealing with lots of floating point numbers no matter what language I'm working in because physics and graphics engines just love their floats. C#, C++ and Typescript are my most frequent languages but I would expect to encounter these same issues whatever language I'm working in.

I did some pretty cool work on a fixed point physics engine once - using integers to represent individual millimeters, so the game field was limited to a mere 4294.97Km! But the graphics engine was still all floats, there's no escape :'(


When using C++ in games you often find that you want results to be deterministic so it is same for all players across all hardware.




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

Search: