Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: Bug 1+4/10

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120107] Re: Bug 1+4/10
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Fri, 8 Jul 2011 04:55:01 -0400 (EDT)

On 7/7/11 at 7:32 AM, slawek at host.pl (slawek) wrote:

>If Mathematica answer that a == b is true, then Mathematica should
>also answer that N[a] == N[b] is true. It is trivial.

Agreed. And Mathematica does this using your example, i.e.

In[2]:= N[1.4] == N[1 + 4/10]

Out[2]= True

>You can, poor boy, check that  1.4 == 1+1/4 gives True, but N[1.4,
>30] gives different result than N[1+1/4, 30] .

You need to understand/learn the difference between

N[1.4] an identity operation, i.e.

In[4]:= 1.4 === N[1.4]

Out[4]= True

and

N[1.4, 30] another identity operation, i.e.

In[5]:= 1.4 === N[1.4, 30]

Out[5]= True

In[6]:= Precision[N[1.4, 30]]

Out[6]= MachinePrecision

and

N[1+4/10] an operation that decreases information

There is a very large set of values for x such that N[x] will be
1.4. Specifically,

N[1.4 + a $MachineEpsilong]==N[1.4]

will return true for any a such that Abs[a]<1

Since, all of these are equally valid choices, it would be
incorrect for Mathemtica to select one over all others.
Undoubtedly, this is why N[1.4, 30] is an operation that does nothing.

In short, N is not intended to increase the precision of a
number. There is no universally valid way to increase numerical
precision. Any attempt to do so requires creation of new
information which can be done in a large variety of ways.



  • Prev by Date: Re: How to write a "proper" math document
  • Next by Date: Re: How to NSolve equation which involves NIntegrate?
  • Previous by thread: Re: Bug 1+4/10
  • Next by thread: Re: Bug 1+4/10