Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
rounding error?
A1 = 5.0568725
B1 = 5.0569 C1 = Round(A1,4)-B1 Why doesn't C1 give me a zero value? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
rounding error?
Regardless of how the cell has been formatted, cell A1 still contains the
value of 5.0568725. To get a zero you would have to round the number in cell A1 to 4 decimal positions" =ROUND(5.0568725,4) -- Kevin Backmann "Steve" wrote: A1 = 5.0568725 B1 = 5.0569 C1 = Round(A1,4)-B1 Why doesn't C1 give me a zero value? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
rounding error?
Go to format cell | number | category | number | decimal places 0 | ok
On May 30, 8:19*pm, Steve wrote: A1 = 5.0568725 B1 = 5.0569 C1 = Round(A1,4)-B1 Why doesn't C1 give me a zero value? * |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
rounding error?
In my C1 formula why doesn't "round(a1,4)" calculate a value of 5.0569 so
when I subtract 5.0569 I get zero? "Kevin B" wrote: Regardless of how the cell has been formatted, cell A1 still contains the value of 5.0568725. To get a zero you would have to round the number in cell A1 to 4 decimal positions" =ROUND(5.0568725,4) -- Kevin Backmann "Steve" wrote: A1 = 5.0568725 B1 = 5.0569 C1 = Round(A1,4)-B1 Why doesn't C1 give me a zero value? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
rounding error?
Initially I overlooked your formula when I responded the first time but I've
not been able to replicate your answer. I'm using Excel 2003 and regardless of where I do the rounding I'm getting 0 -- Kevin Backmann "Steve" wrote: In my C1 formula why doesn't "round(a1,4)" calculate a value of 5.0569 so when I subtract 5.0569 I get zero? "Kevin B" wrote: Regardless of how the cell has been formatted, cell A1 still contains the value of 5.0568725. To get a zero you would have to round the number in cell A1 to 4 decimal positions" =ROUND(5.0568725,4) -- Kevin Backmann "Steve" wrote: A1 = 5.0568725 B1 = 5.0569 C1 = Round(A1,4)-B1 Why doesn't C1 give me a zero value? |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
rounding error?
My guess is that B1 is the result of a calculation an that =(B1-5.0569) is
not zero. Computers do finite precision math, so rounding errors can accumulate. Consequently, with floating point values you should test whether ABS(x-y)<epsilon, instead of whether x=y. "Steve" wrote: A1 = 5.0568725 B1 = 5.0569 C1 = Round(A1,4)-B1 Why doesn't C1 give me a zero value? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Rounding error is conditional on brackets | Excel Discussion (Misc queries) | |||
Have Excel display an error rather than rounding # to fit column | Setting up and Configuration of Excel | |||
Rounding Error when adding or subtracting two cells | Excel Worksheet Functions | |||
how to minimize rounding error with complicated formulas | Excel Discussion (Misc queries) | |||
Percentage rounding error in charts | Excel Discussion (Misc queries) |