Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.independent

Topic: Is it me or is it Wolfram?
Replies: 16   Last Post: May 13, 2013 4:51 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
RGVickson@shaw.ca

Posts: 1,650
Registered: 12/1/07
Re: Is it me or is it Wolfram?
Posted: May 10, 2013 1:13 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Thursday, May 9, 2013 11:01:54 AM UTC-7, JT wrote:
> http://www.wolframalpha.com/input/?i=0.49999999999999999999999999999999999999999%3D%28n%2F2-1%29%2Fn
>
>
>
> n = -1.
>
> 0.49999999999999999999999999999999999999999 = (n/2-1)/n
>
>
>
> http://www.wolframalpha.com/input/?i=%3D%28100000000000000000000000000000000000000000%2F2-1%29%2F100000000000000000000000000000000000000000
>
>
>
> 0.49999999999999999999999999999999999999999=(100000000000000000000000000000000000000000/2-1)/
>
> 100000000000000000000000000000000000000000
>
>
>
> I do not understand to, can please someone explain why and how wolfram
>
> get -1 for the upper calculation, it is obvious using the one below
>
> what the solution is?
>
>
>
> And if there was two solutions should not Wolfram give them both? What
>
> is going on here, i am total newb to math calculators so tell me what
>
> is going on?


It must have something to do with truncation of floating-point numbers. I do not have access to Mathematica, but here is your example in Maple 14:

eq:=z=(n/2-1)/n: lprint(eq); z = (1/2*n-1)/n <---equation
Nz:=solve(eq,n): lprint(Nz); -2/(2*z-1) <--- solution

Default digits setting = 10 gives:
eq1:=0.49999999999999999999999999999999999999999 = (n/2-1)/n :
lprint(eq1); .49999999999999999999999999999999999999999 = (1/2*n-1)/n
solve(eq1,n);
42
0.1000000000 10
(this is 0.10e42)
subs(z=0.49999999999999999999999999999999999999999,Nz);
Float(-infinity)

Even with the low digits setting, Maple handles the direct equation well, but fails when the parameter is
substituted into the solution (because the extra digits are handled in one problem but not in the other)'

Now let's increase the digits setting:

Digits:=60;
subs(z=0.49999999999999999999999999999999999999999,Nz);
42
0.100000000000000000000000000000000000000000000000000000000000 10
(this is 0.100....00 e42)

Now both ways handle the extra digits well enough to yield identical answers.

I presume something like this happens also in Mathematica. However, if by "Wolfram" you mean wolfram alpha, I don't know if it allows you to change digit settings easily.





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.