MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Errors with decimal addition in Mathematica 5.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47423] Re: Errors with decimal addition in Mathematica 5.0
  • From: bobhanlon at aol.com (Bob Hanlon)
  • Date: Sun, 11 Apr 2004 04:44:02 -0400 (EDT)
  • References: <c582pm$npb$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

The last digit is correct to the display precision.  What you are asking for is
how to display an additional digit.

InputForm[13505.5-244.91]

13260.59

NumberForm[13505.5-244.91,7]

13260.59

13505.5`7-244.91`7

13260.59


Bob Hanlon

In article <c582pm$npb$1 at smc.vnet.net>, yupeng_ at hotmail.com (Peng Yu) wrote:

<< In[1]:= 13505.5 - 244.91
Out[1]= 13260.6

However,13505.5 - 244.91 = 13260.59. "N" doesn't help, either.

In[25]:= N[13505.50 - 244.91]
Out[25]= 13260.6

But the following command gives the correct answer.
In[26]:= 505.50 - 244.91
Out[26]= 260.59


  • Prev by Date: Re: Errors with decimal addition in Mathematica 5.0
  • Next by Date: RE: Errors with decimal addition in Mathematica 5.0
  • Previous by thread: Re: Errors with decimal addition in Mathematica 5.0
  • Next by thread: RE: Errors with decimal addition in Mathematica 5.0