Guest User

Untitled

a guest
Mar 22nd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. << Quaternions`;
  2. Exp[Quaternion[1, 0, 0, 0]]
  3.  
  4. During evaluation of In[81]:= Power::infy: Infinite expression 1/0 encountered. >>
  5.  
  6. During evaluation of In[81]:= Power::infy: Infinite expression 1/0 encountered. >>
  7.  
  8. During evaluation of In[81]:= Power::infy: Infinite expression 1/0 encountered. >>
  9.  
  10. During evaluation of In[81]:= General::stop: Further output of Power::infy will be suppressed during this calculation. >>
  11.  
  12. During evaluation of In[81]:= $RecursionLimit::reclim: Recursion depth of 1024 exceeded. >>
  13.  
  14. During evaluation of In[81]:= $RecursionLimit::reclim: Recursion depth of 1024 exceeded. >>
  15.  
  16. During evaluation of In[81]:= $RecursionLimit::reclim: Recursion depth of 1024 exceeded. >>
  17.  
  18. During evaluation of In[81]:= General::stop: Further output of $RecursionLimit::reclim will be suppressed during this calculation. >>
  19.  
  20. During evaluation of In[81]:= $IterationLimit::itlim: Iteration limit of 4096 exceeded. >>
  21.  
  22. During evaluation of In[81]:= Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered. >>
  23.  
  24. In[84]:= ScalarQ[x_] = True;
  25. Exp[Quaternion[a, b, c, d]]
  26.  
  27. Out[85]= Quaternion[E^a Cos[Sqrt[b^2 + c^2 + d^2]], (
  28. b E^a Sin[Sqrt[b^2 + c^2 + d^2]])/Sqrt[b^2 + c^2 + d^2], (
  29. c E^a Sin[Sqrt[b^2 + c^2 + d^2]])/Sqrt[b^2 + c^2 + d^2], (
  30. d E^a Sin[Sqrt[b^2 + c^2 + d^2]])/Sqrt[b^2 + c^2 + d^2]]
  31.  
  32. Quaternion /:
  33. Sign[a:Quaternion[__?ScalarQ]]:= a / Abs[a]
  34.  
  35. Quaternion /:
  36. Sign[a:Quaternion[__?ScalarQ]]:= If[Abs[a]==0, 0, a / Abs[a]]
  37.  
  38. (* fix bug 66775 -- charlesp *)
  39.  
  40. SignIJK[Quaternion[a_?ScalarQ, b_?ScalarQ, c_?ScalarQ, d_?ScalarQ]] :=
  41. Sign[Quaternion[0, b, c, d]]
Add Comment
Please, Sign In to add comment