home bbs files messages ]

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,842 of 10,432   
   Nasser M. Abbasi to All   
   on sin(very large number)   
   03 Aug 15 21:44:24   
   
   From: nma@12000.org   
      
   I was answering someone question on Matlab forum, and noticed   
   something interesting.   
      
   Maple:   
   ========   
   Digits::60: sin(2*10^30): evalf(%);   
   0.17950046751493908795061771231643809505098047699633484280836744\   
      698514457349325219   
      
   Matematica:   
   ===========   
   In[21]:= N[Sin[2*10^30], 60]   
   Out[21]= 0.179500467514939087950617712316438095050980476996334842808367   
      
   Mupad:   
   ======   
   Digits:=60:   
   simplify(sin(2.0*10^30));   
   -0.6054240282319655434839500429688996518962085247039794921875   
      
   But when calling mupad from Matlab, now it gives different answer   
   (same as Maple and Mathematica)   
      
   >> evalin(symengine,'DIGITS := 60: simplify(sin(2.0*10^30))')   
   0.17950046751493908795061771231643809505098047699633484280836744   
   98514564171539337   
      
   But Matlab gives different answer   
   =================================   
   >> sin(2*10^30)   
      -0.018662125294758   
      
   Which is the correct result, and what is the algorithm used for such   
   evaluations when the argument of trig is large?   
      
   thanks,   
   --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