|
|
|
|
|
by Tainnor
1815 days ago
|
|
It is widely accepted that using floats for money[1] is wrong because floating point numbers cannot guarantee precision. The fact that you ask is a very good case in point though: Many programmers are not aware of this issue and would maybe not question the "wisdom" of the AI code generator. In that sense, it could have a similar effect to blindly copy-pasted answers from SO, just with even less friction. [1] Exceptions may apply to e.g. finance mathematics where you need to work with statistics and you're not going to expect exact results anyway. |
|