Forums before death by AOL, social media and spammers... "We can't have nice things"
|    sci.math.symbolic    |    Symbolic algebra discussion    |    10,432 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 8,960 of 10,432    |
|    Nasser M. Abbasi to All    |
|    How to implement (x/x) ?    |
|    14 Jan 16 05:06:11    |
      From: nma@12000.org              Someone posted an interesting observation at Mathematica forum,       and I am not able to reproduce it in Maple or mupad or       Matlab.              Mathematica implements (x/x) as x*1/x, which causes something       like this              x = 935.93;       x/x        0.9999999999999999`              Which is correct, from floating point operations, if the operation       is done by evaluating 1/x then multiplying the result with x.              Here it is in Matlab:              x=935.93;       r=1/x;       r*x;       >> num2strexact(ans)              0.99999999999999988897769753748434595763683319091796875              But this happens in Mathematica, even if one types in x/x,       which does not happen in Matlab nor in Maple:              >>x=935.93;       >>x/x        1       >> num2strexact(ans)       1              And not in Maple:              x:=935.93;       x/x;        1.000000000              So my question is: Why does Mathematica implement x/x as x*(1/x)       or rather, why does one not get the same result as Mathematica       gets using the other systems?              Do you know of a system which gives the same result as       Mathematica when given the input x/x for x=935.93?              Just trying to understand the logic of what is going on as it       seems the difference is interesting.              ps. my PC is 64 bit intel, and the programs are 64 bits also.              --Nasser              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca