Does anyone have an apparent fix for this mathematica problem?
- To: mathgroup at yoda.ncsa.uiuc.edu
- Subject: Does anyone have an apparent fix for this mathematica problem?
- From: uunet!oregon.uoregon.edu!JOE
- Date: Thu, 7 Jun 90 09:10 PDT
Has anyone else heard of the problem my users describe below? Is a patch available to make Mathematica on the NeXT yield the same results as Mathematica on the Mac? If you've any queries Fred needs to see or respond to, please CC: him directly since he's not on the list right now. Thanks, Joe St Sauver (JOE at OREGON.UOREGON.EDU or JOE at OREGON) Statistical Programmer and Consultant University of Oregon Computing Center >From: OREGON::OLNESS "Fredrick Olness (503) 346-5206 OLNESS at OREGON" >To: OREGON::JOE > >Joe, > > .... One of Bob Zimmerman's students >found what appers to be a bug in Mathematica on the Next. >(Yes, I did not believe it until I tried it myself.) > >I attach two examples of the problem below. >(For reference, the Mac gave the correct answer, >so it is not a subtle error pertaining to branch cuts or >anything.) I think he was going to try it on a different Next >machine for comparison. > >Thanks, > >Fred. > >--- example one -- >1% math >Mathematica 1.2 (August 30, 1989) [With pre-loaded data] >by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin, > S. Omohundro, D. Ballman and J. Keiper >with I. Rivin and D. Withoff >Copyright 1988,1989 Wolfram Research Inc. > >In[1]:= InputForm[(b*c*(a + d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/ > (4*(a - d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))* > (a^2 + 4*b*c - 2*a*d + d^2)^(1/2)) - > (b*c*(a + d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/ > (4*(a - d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))* > (a^2 + 4*b *c - 2*a*d + d^2)^(1/2))] > >Out[1]//InputForm= > (b*c*(a + d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/ > (4*(a^2 + 4*b*c - 2*a*d + d^2)^(1/2)* > (a - d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))) - > (b*c*(a + d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/ > (4*(a^2 + 4*b*c - 2*a*d + d^2)^(1/2)* > (a - d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))) > >In[2]:= rule={a->1,b->2,c->3,d->4} > >Out[2]= {a -> 1, b -> 2, c -> 3, d -> 4} > >In[3]:= N[res//.rule] > >Out[3]= res > >In[4]:= res=%1; > >In[5]:= N[res//.rule] > >Out[5]= 37. > >In[6]:= N[Together[Expand[res]]//.rule] > >Out[6]= 47.2208 > >In[7]:= N[Simplify[res]//.rule] > >Out[7]= 47.2208 > >-- example two follows -- > >1 % math >Mathematica 1.2 (August 30, 1989) [With pre-loaded data] >by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin, > S. Omohundro, D. Ballman and J. Keiper >with I. Rivin and D. Withoff >Copyright 1988,1989 Wolfram Research Inc. > >In[1]:= InputForm[(b*c*(a + d - (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))^3)/ > (4*(a - d + (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))* > (a^2 - 2*a*c + 4*b*c + d^2)^(1/2)) - > (b*c*(a + d + (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))^3)/ > (4*(a - d - (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))* > (a^2 - 2*a *c + 4*b*c + d^2)^(1/2))] > > >Out[1]//InputForm= > (b*c*(a + d - (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))^3)/ > (4*(a^2 - 2*a*c + 4*b*c + d^2)^(1/2)* > (a - d + (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))) - > (b*c*(a + d + (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))^3)/ > (4*(a^2 - 2*a*c + 4*b*c + d^2)^(1/2)* > (a - d - (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))) > >In[2]:= res=%; > >In[3]:= rule={a->1,b->2,c->3,d->4} > >Out[3]= {a -> 1, b -> 2, c -> 3, d -> 4} > >In[4]:= N[res//.rule] > >Out[4]= 36.9231 > >In[5]:= N[Together[Expand[res]]//.rule] > >Out[5]= 46.9906 > >In[6]:= N[Simplify[res]//.rule] > >Out[6]= 46.9906