Welcome Guest!
 EUforum
 Previous Message All Messages Next Message 
Re: Glitch in floor() function?  Matt Lewis
 Jun 27, 2008 11:54 PDT 


posted by: Matt Lewis <matthewwalkerlewis at gm??l.com>

Mike Wever wrote:
 
Thanks to everyone who replied on this. I thought it was due to something
like that but I couldn't see the difference in the value even going out to 20
decimal places.

So does anyone have a suggestion for a better way to handle rounding? I'm
trying to verify a sales tax computation and after using this rounding
routine, I had a situation where the result of round(62.50 * 0.075, 2) was not
equal to the number that resulted from value("6.49").

Don't use integer values for dollars. Easiest thing would be to use either
pennies or fraction of a penny to be your unit.

Matt
	
 Previous Message All Messages Next Message 
  Check It Out!

  Topica Channels
 Best of Topica
 Art & Design
 Books, Movies & TV
 Developers
 Food & Drink
 Health & Fitness
 Internet
 Music
 News & Information
 Personal Finance
 Personal Technology
 Small Business
 Software
 Sports
 Travel & Leisure
 Women & Family

  Start Your Own List!
Email lists are great for debating issues or publishing your views.
Start a List Today!

© 2001 Topica Inc. TFMB
Concerned about privacy? Topica is TrustE certified.
See our Privacy Policy.