Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Rounding error is conditional on brackets

If I put these values and formulae, I get a zero total, which is what I expect

a1: 123.456
a2: 234.567
a3: 358.023

=a3-a2-a1 (gives zero exactly)

If I put this, I get a rounding error:

=(a3-a2-a1) (gives 1.42e-14)

In another spreadsheet, the error was much larger (2e-9).

Excel should give the same result either way, but it doesn't.

Does anyone know why?

Jason
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Rounding error is conditional on brackets

A very common question. It is to do with the way Excel stores
fractional values, as most decimal fractions cannot be represented
accurately in binary. Take a simple decimal example, using 2 dp:

x = 1/3 = 0.33

x + x + x = 0.33 + 0.33 + 0.33 = 0.99

which is not equal to 1.

Pete

On Feb 4, 5:08*pm, JasonG wrote:
If I put these values and formulae, I get a zero total, which is what I expect

a1: 123.456
a2: 234.567
a3: 358.023

=a3-a2-a1 * *(gives zero exactly)

If I put this, I get a rounding error:

=(a3-a2-a1) * (gives 1.42e-14)

In another spreadsheet, the error was much larger (2e-9).

Excel should give the same result either way, but it doesn't.

Does anyone know why?

Jason


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Rounding error is conditional on brackets

Hi Jason,

Look he

http://support.microsoft.com/kb/78113

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"JasonG" wrote in message ...
| If I put these values and formulae, I get a zero total, which is what I expect
|
| a1: 123.456
| a2: 234.567
| a3: 358.023
|
| =a3-a2-a1 (gives zero exactly)
|
| If I put this, I get a rounding error:
|
| =(a3-a2-a1) (gives 1.42e-14)
|
| In another spreadsheet, the error was much larger (2e-9).
|
| Excel should give the same result either way, but it doesn't.
|
| Does anyone know why?
|
| Jason


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
Conditional Rounding yk Excel Discussion (Misc queries) 7 July 6th 07 02:36 PM
Conditional Sum Brackets { } ron Excel Worksheet Functions 5 June 13th 07 06:37 PM
conditional rounding egarcia Excel Worksheet Functions 2 November 28th 06 05:17 PM
Conditional Rounding Annie Excel Worksheet Functions 4 March 29th 06 08:42 PM
Percentage rounding error in charts Tracey Excel Discussion (Misc queries) 4 May 14th 05 04:01 AM


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

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"