Adept Scientific - English
The world's best software and hardware for research, science and engineering.
flag arrow
clearclear

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKdedksvnofi
Home
Products
Training
Events
 Buy Online
Downloads
Academic Discounts
Support
My Adept
International |  About Us |  Adept Scientific Blog |  Contact Us |  Press Room |  Jobs
Adept Scientific on Twitter Adept Scientific on LinkedIn


The Next Steps

• Ask us a question
• Buy Mathcad Now
• View Mathcad Pricing
•  Download a Demo
•  Request a Brochure
• Download a Brochure
• Find out about Training
• Meet Our Team
• Read our RSS Feeds

Learn More

Mathcad Home
Compare Mathcad 15
and Mathcad Prime 1.0

Version Comparison Chart
Mathcad's Mathematical
Functions

Mathcad Enterprise
Mathcad for Education
Rave Reviews
Add-ons

System Requirements

Latest Information

New Features in Mathcad
Prime 1.0

Mathcad Prime 1.0 movie
New Features in Mathcad 15
Using Mathcad and Excel
Engineering Application
Packs

Return on Investment

Service & Support

Patches & Downloads
Frequently Asked Questions
Search the Knowledge Base
Join the Discussion List
Search the List Archive

List Archives >  Mathcad List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[mathcad] Re: Rounding up/down error

Search email archive for  

[mathcad] Re: Rounding up/down error
Author: Pergande, Albert N    Posted: Thu, 17 Jul 2003 08:29:22 -0400
Round to even dates back to steam engine and slide rule days - by
rounding to even, subsequent calculations where very slightly easier,
since numbers that end in an even digit as easier to divide by 2.

It's sort of like the roman carriage wheel width standard driving modern
railroad gages.

-----Original Message-----
From: Steve Ellison /> Sent: Thursday, July 17, 2003 5:42 AM
To: Mathcad Discussion List
Subject: [mathcad] Re: Rounding up/down error


Chris & co;

The numerical precision isn't causing this behaviour. Mathcad is
apparently implementing ISO/IEEE round-to-even rules exactly correctly.
Chris is correct as to the reason for that rule; on large data sets,
always rounding 5 up causes a small positive bias (because only 9 (ie
1-9) of the ten available digits are ever rounded - noone rounds zero.
To have rounding average out to zero, half the digits must round up and
half down. Half of 9 is 4.5 - which means one needs to be rounded up
half the time).

The 'unexpectedness' arises partly because the round-toeven rule is
relatively recent and rarely taght at school. Also, though, any rounding
rules do odd things if you progressively round; 1.50 rounds to 2 under
most rounding rules, but 1.49 rounds correctly to 1.5 to two sig figs,
and correctly to 1.0 if rounded to one sig fig. Only if you incorrectly
round first from 1.49 to 1.5 and then round 1.5 does is get
inconsistent. Moral 1 - never round progressively!

Also, don't round if it matters! Remember we only round for reporting
convenience (or sometimes paper calculation); in either case, the
general rule is never to throw away significant information. So no
argument over rounding behaviour should, almost by definition, ever be
important. :)

Steve E.

>>> 15/07/2003 09:04:29 >>>
I suspect the reason is this: numbers are represented internally by a
normalised mantissa (52 bits) times a power of 2. Most decimal fractions

cannot be represented exactly, so some rounding takes place. Then when
you
display the number, it is converted back to decimal, and it gets rounded

again. The first rounding could take it up or down, by a very tiny
amount.
The actual IEEE floating point format specifies that if the number ends
in
exactly 0.5, it is rounded to the nearest even integer. So 1.5 and 2.5
are
both rounded to 2. This is so that, statistically, 0.5 is rounded up or
down with equal probablility.

Chris

At 09:12 15/07/2003 +0200, you wrote:
>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...)


+------------------------------------------------------------------+
+ Chris Whitford University of Leicester +
+ Research Fellow Space Research Centre +
+ Tel: +44 (0)116 252 3496 Physics and Astronomy Department +
+ Fax: +44 (0)116 252 2464 University Road +
+ email: LEICESTER LE1 7RH +
+ http://www.star.le.ac.uk/ UK +
+------------------------------------------------------------------+


---
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:
/>
*******************************************************************
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If
you have received this message in error, please notify the sender
immediately via +44(0)20 8943 7000 or notify /> and delete this message and any copies from your computer and network.
LGC Limited. Registered in England 2991879.
Registered office: Queens Road, Teddington, Middlesex, TW11 0LY, UK


---
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: Rounding up/down error,  Bruff, Stuart
Next by date: [mathcad] Re: Rounding up/down error,  Pergande, Albert N
Previous thread: [mathcad] [mathcad]Re: Rounding up/down error,  Markos E Psarros
Next thread: [mathcad] Re: Rounding up/down error, Chris Whitford



Ready to buy?

Mathcad 15 (with 1 year maintenance) - includes FREE Mathcad Prime
Add to shopping basket
£ 970.00
Upgrade to Mathcad 15 individual licence from v14 single user licence - includes FREE Mathcad Prime
Add to shopping basket
£ 220.00
Upgrade to Mathcad 15 individual licence from v11, v12, v13 single user licence - includes FREE Mathcad Prime
Add to shopping basket
£ 290.00

Featured Downloads

Mathcad Prime 1.0 Datasheet
Mathcad Prime 1.0 and Mathcad 15 Comparison Chart
Mathcad Prime 1.0 Demo
Mathcad or Excel?
Mathcad Customer Story: Man B&W Diesel
Mathcad Customer Story: Stork Fokker Aerospace

Latest Downloads

Application Example: Faster Physical Modelling for Mathcad users
Mathcad Case Study - Breakthrough in Water Treatment Technology
Mathcad Whitepaper - Best practices in product development: Design studies & trade-off analyses
Mathcad 15 - New Design of Experiments Demo
Mathcad Prime 2.0 Pre-Launch Interview

Latest News

Mathcad Case Study - Breakthrough in Water Treatment Technology
PTC Recognizes Adept Scientific
PTC recognises Adept Scientific’s Mathcad quality
PTC recognises Adept Scientific’s Mathcad quality
PTC launches Mathcad® Prime 1.0™
adept

Top of the Page

Popular Links: ChemDraw | ChemOffice | Data Acquisition | Data Analysis | EndNote | Maple | MapleSim | Mathcad | MathType | Quality Analyst | Reference Manager | VisSim

EU ePrivacy Directive | Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2012, Adept Scientific plc.
Site designed and maintained by Lyndon Ash

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055