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: Jean Rosenfeld    Posted: Wed, 16 Jul 2003 20:30:03 +0100
As I understand it the correct (all digits) value of a variable is always
carried through in any calculations, however it is displayed. The choice of
significant digits to display is a cosmetic matter that does not affect
calculations. For engineers just as for scientists (of whom I am one), the
cardinal rule is not to show more significant figures than are warranted by,
for example the uncertainty in the data or physical constants used. If this
rounding 'problem' worries anyone, they could show results to one more
figure than are truly significant, then do the final rounding themselves to
suit their taste.
Having said that, it does seem somewhat unfortunate that the convention used
in MathCAD is somewhat obscure when rounding a number whose last significant
digit has been entered as 5.

Some trial and error for numbers ending with the sequence pq5. If p is odd,
it rounds up whether q is even or odd. If p is even it rounds down if q is
even, but up if q is odd.
examples
x= 0.12345 formatted to 4 digits shows 0.1235 rounds up with p odd, q even
x= 0.12335 formatted to 4 digits shows 0.1234 rounds up with p odd, q odd
x= 0.12445 formatted to 4 digits shows 0.1244 rounds down with p even, q
even
x= 0.12235 formatted to 4 digits shows 0.1224 rounds up with p even, q odd

It is just unfortunate that the number that started this discussion was of
the 'anomalous' (p even, q even) type (well if it had not been there would
have been no discussion...). Of course, if you add the sequence 0000001 at
the end of the number, it rounds up also for this type, provided that the 1
is not beyond the number of places carried in MathCAD (e.g. for the 5 digit
numbers discussed here, you can insert up to 11 zeros before the 1 to flip
the result to rounding up). Doing this might be one way of solving the
display problem, without significantly affecting subsequent calculations.


--------------------------------------------------------
Jean L.J. Rosenfeld
Argoed Hall
Bryn-y-Baal
Mold
Flintshire CH7 6SQ
Wales, UK
Tel +44 1352 750566
E-mail />


-----Original Message-----
From: Shiner Adrian
Sent: 16 July 2003 17:36
To: Mathcad Discussion List
Subject: [mathcad] Re: Rounding up/down error



Good point Chris. If the application is in engineering then the precision of
results are sufficient that lead to the physical product being to
requirements. As the engineer said to the mathematician in a certain
competition to win a lady's favour "I can get close enough for all practical
purposes".

I occasionally see building dimensions shown on drawings to decimal parts of
a millimetre! An understanding of the technology that you are working with
is always useful in order to avoid such howlers and sources of mirth.

Now if you are intent on calculating down to quantum dimensions then perhaps
its another matter, antimatter or dark matter as the case may be.

Best wishes

Adrian

-----Original Message-----
From: Chris Whitford
Sent: 16 July 2003 17:21
To: Mathcad Discussion List
Subject: [mathcad] Re: Rounding up/down error


I wonder whether some people are missing the point here. There is no law of
nature which says that 0.5 must round up. The IEEE floating point formats
(which the PC FP processor uses) say that 0.5 rounds to the nearest even
integer - 1.5 will round to 2 while 2.5 will also round to 2. But Mathcad
does numerical calculations with real numbers, which, except for special
cases, like integers, are approximated by floating point numbers. If you
are worried about the missing digits, display more of them! If you really
need 0.5 to mean exactly 1/2, you need to use the symbolic processor.

Chris

+------------------------------------------------------------------+
+ 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:


---
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, Shiner Adrian
Next by date: [mathcad] Re: Rounding up/down error,  Belshan, James E52
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