Date: May 10, 2013 1:13 PM
Author: RGVickson@shaw.ca
Subject: Re: Is it me or is it Wolfram?

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.