LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Bruno Campanini
 
Posts: n/a
Default

"Jerry W. Lewis" wrote in message
...
MOD is working exactly as it should. The "problem" is that most floating
point numbers (including .2) have no exact binary representation (just as
1/3 has no exact decimal representation). When you have to approximate
your inputs, that the output is only approximate should be no surprise.

100 times the binary approximation to 622.2 is
62220.0000000000072759576141834259033203125
...

If x has a fractional part but x*100 is supposed to be an integer, then
you need to use =MOD(ROUND(x*100,0),10) to ensure that you get rid of any
residues of the original binary approximation to x.

Jerry


Or, you can use VatType Currency (only four decimals) or Decimal.
They are not affected by floating point bugs.

Bruno




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
undefined function error when creating xls pivot from mdb qry andrew Excel Worksheet Functions 0 July 29th 05 07:26 PM
MROUND function. Getting the following error: #NAME? masoud Excel Worksheet Functions 2 June 29th 05 11:19 AM
How can I download and install ERROR FUNCTION in Excel 2003? ERF. Zhiming Qi Excel Worksheet Functions 2 April 25th 05 01:15 PM
Error message when inserting function Ajay Excel Discussion (Misc queries) 0 April 18th 05 04:28 PM
Vlookup & Lookup function error Beginner Excel Worksheet Functions 9 January 11th 05 12:37 AM


All times are GMT +1. The time now is 08:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"