Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
rgs rgs is offline
external usenet poster
 
Posts: 3
Default logical function bug?

Is there a bug with logical functions and large numbers in Excel?
=54574.47-52348.24=2226.23 returns true
=4354574.47-4352348.24=2226.23 returns false
the only difference in the above 2 lines is the extra 4300000
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default logical function bug?

This is not a bug, just a normal rounding eror.
--
Gary''s Student - gsnu200781
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default logical function bug?

See this:

http://tinyurl.com/4jd3fa

--
Biff
Microsoft Excel MVP


"rgs" wrote in message
...
Is there a bug with logical functions and large numbers in Excel?
=54574.47-52348.24=2226.23 returns true
=4354574.47-4352348.24=2226.23 returns false
the only difference in the above 2 lines is the extra 4300000



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default logical function bug?

On Fri, 25 Apr 2008 14:44:00 -0700, rgs
wrote:

Is there a bug with logical functions and large numbers in Excel?
=54574.47-52348.24=2226.23 returns true
=4354574.47-4352348.24=2226.23 returns false
the only difference in the above 2 lines is the extra 4300000


This is no bug. It is just a consequence of the fact that not all
numbers are stored without rounding in the computers memory.
Computers work with binary representation of numbers and numbers
than have a finite number of decimals the way humans write them, with
10 as the base, often have an infinite number of "decimals" when 2 is
used as the base.

Example:
10.1 = 1010.00011001100110011... and so on

as there is a limited allocated space to store a number, these type of
numbers have to be truncated as some point which leads no the type
of strange observations that you have done.

You can try to enter this in a cell
=10.1-10

then increase the number of shown decimals and you will find that at
some point the displayed result is no longer 0.1
It might be 0.09999999999999996

Lars-Åke


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
rgs rgs is offline
external usenet poster
 
Posts: 3
Default logical function bug?

Thanks for the link. My original work around was to to use <.01 since these
are large dollars I'm working with, but the tip about using the Round
function in the link works great.

Thanks also to the other posters.

RGS

"T. Valko" wrote:

See this:

http://tinyurl.com/4jd3fa

--
Biff
Microsoft Excel MVP


"rgs" wrote in message
...
Is there a bug with logical functions and large numbers in Excel?
=54574.47-52348.24=2226.23 returns true
=4354574.47-4352348.24=2226.23 returns false
the only difference in the above 2 lines is the extra 4300000




Reply
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
Help with logical function PT Excel Worksheet Functions 2 February 22nd 08 02:13 AM
Logical function Lavanya Excel Discussion (Misc queries) 1 January 25th 07 06:20 AM
should it be if() or another logical function? Gina Excel Worksheet Functions 2 November 10th 06 05:59 PM
logical function [email protected] Excel Worksheet Functions 4 July 27th 06 04:43 AM
Logical Function vnsrod2000 Excel Worksheet Functions 2 January 28th 05 04:03 AM


All times are GMT +1. The time now is 07:19 PM.

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

About Us

"It's about Microsoft Excel"