Vote UpVote

Rounding the Currency type like they taught us in school

Cape Cod Gunny Does Delphi – I started using Delphi's Currency type for it's accuracy only to discover it doesn't round the way I would have expected it to round. I remember being taught in school that when rounding numbers if the remainder was equal to or greater than five you round up otherwise you round down.For Example:12.344 Rounds to 12.3412.345 Rounds to 12.3512.346 Rounds to 12.35This is how I was taught in school.This is how Microsoft Excel does it when you set the cell to display as two decimal places.This is how Microsoft SQL does it when you format the display as two decimal places. ...
Favorite? Off-Topic? Michael Riley @ 2012-06-10 15:56


Visits: 751
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

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)