Vote UpVote

Floating point values are evil

Compas Pascal – If you want to do comparisons like > < =, always consider to convert your floating point numbers to integers and store them in integer variables. The basic problem is, that simple values like 0.1 do not exist in the double type.There are several solutions:* Instead of showing currencies as the number of dollars, where 0.20 is 20 cents, consider to register the number of cents, instead, so that
Favorite? Off-Topic? Lars D @ 2009-06-19 14:45


Visits: 732
Votes: 3
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Charles Ardour
Felipe L.B.
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)