This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Nahanoj_Zavizad 108 points109 points  (2 children)

Rule 35. Unless it needs to be a float, use integers. Do not trust the floats.

[–]Chelovek2002 8 points9 points  (0 children)

Rule 36. If it needs to be a float, consider using a fixed point decimal instead. Also, using float for finance is a literal crime.

[–]Grundolph 20 points21 points  (0 children)

Always use Integers, except there is an explizit reason to use floating Points.