 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[mathcad] RE: [mathcad]Re: Rounding up/down error
| [mathcad] RE: [mathcad]Re: Rounding up/down error |
|
Author: Dan Khoushy Ph D
Posted: Tue, 15 Jul 2003 10:50:02 +0100
|
If it were to be true then any instance of 0.04425 will round incorrectly,
which is not the case. Just write x:=0.0425 and then x= and format the
results to 5 digits and you will get exactly x=0.04425.
52-bit normalised mantissa should be quite enough.
If Sandra will let us have her worksheet maybe we can solve the mystery.
Best Regards,
Dan
-----Original Message-----
From: Sander Lablans
Sent: Tuesday, July 15, 2003 10:01
To: Mathcad Discussion List
Subject: [mathcad] RE: [mathcad]Re: Rounding up/down error
Well, the problem isn't that actually. I know about hidden digits. The fact
is that I DEFINED a variable with:
dp := 0.04425 N/mm^2
Therefore, I know that there are NO other digits after the 5. But for my
report, I have to use 4 digits instead of 5 (due to conformance throughout
the document). It was then that I found out about this strange occurence.
I do have to say that I think Chris does have the answer to this strange
behavior. I am no MathCad specialist, so I have to take his word for it that
MathCad uses a 52-bit normalised mantissa. But it would make sense.
In fact: if I change the value of 0.04425 to 0.05425 it is rounded to
0.0542, changing it to 0.06425, it gets rounded to 0.0643. If I change this
first non-zero digit from 0 to 9, I get a rather arbitrarily behavior of the
last digit, which would point to Chris' explanation.
Sander
-----Original Message-----
From: Markos E. Psarros />
Sent: dinsdag 15 juli 2003 10:28
To: Mathcad Discussion List
Subject: [mathcad] [mathcad]Re: Rounding up/down error
Dear Sander
Have you checked what is the ACTUAL number that underlies 0.04425?
If in 6 decimal points accuracy it was 0.044248 it would round in 5 digits
as 0.04425 (48 turns to 50) but if it was round to 4 digits it would give
0.0442 (because 248 rounds to 200 since it is NOT more than 250)!!
That for, check the result in 6 or even 8 digits accuracy and you'll see!
Markos
*********** REPLY SEPARATOR ***********
On 15/7/2003 at 9:12 pl Sander Lablans wrote:
[Edit] and now with attachment... [Edit]
Hello list,
I have been using a calculation with a number of 0.04425 N/mm^2. However, I
noticed a strange behavior when I modified the properties of a result to
show me 4 digits. Normally, it would then show me 0.0443 as a 5 always
rounds up. However, as you can see in the attached mathcad-sheet, MathCad
decides that it does not want to show 0.0443, but 0.0442. I have been
playing with a few other numbers, but this is the only one I have found. Can
someone tell me, whether this is a bug in MathCad, or that there is an
option included in MathCad that makes sure that some results are rounded to
a different value? (Or perhaps someone else has encountered the same
rounding error somewhere else...)
Regards,
Sander Lablans
---------------------------------
NedTech Engineering B.V.
The Netherlands
**********END OF INITIAL MESSAGE******* ---
The Mathcad List - Discussion, Support & News
Contributions: />
Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/
---
Would you like this to come to a different email address?
---
Simply leave the mailing list (see below) and re-join by
sending a blank email from the new address to:
or
---
If you do not want to be on the Mathcad list, simply send a
blank email (no subject or message needed) to:
Dr. Markos E. Psarros
Ph.D. Civil Engineering
General Manager Software Imports and Sales
MP & Associates
33 Skoufa Str.
ATHENS 106 73
GREECE
Tel: +30-210-3633977
Fax: +30-210-3617108
e-mail: />
http://www.mpassociates.gr
---
The Mathcad List - Discussion, Support & News
Contributions: />
Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/
---
Would you like this to come to a different email address?
---
Simply leave the mailing list (see below) and re-join by
sending a blank email from the new address to:
or
---
If you do not want to be on the Mathcad list, simply send a
blank email (no subject or message needed) to:
---
The Mathcad List - Discussion, Support & News
Contributions: />
Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/
---
Would you like this to come to a different email address?
---
Simply leave the mailing list (see below) and re-join by
sending a blank email from the new address to:
or
---
If you do not want to be on the Mathcad list, simply send a
blank email (no subject or message needed) to:
/>
|
[View Complete Thread]
Previous by date: [mathcad] RE: [mathcad]Re: Rounding up/down error, Sander Lablans
Next by date: [mathcad] RE: [mathcad]Re: Rounding up/down error, Chris Whitford
Previous thread: [mathcad] [mathcad]Re: Rounding up/down error, Markos E Psarros
Next thread: [mathcad] RE: [mathcad]Re: Rounding up/down error, Sander Lablans
|
|
|