MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Anyone using the Units package extensively?

Degree is built in to Mathematica

Sin[60 Degree]


It will keep exact numbers exact

Sin[37 Degree]


N will force numerical evaluation



or you may get some exact numerical results by using FunctionExpand

%%//FunctionExpand // Simplify

(1/2^(1/3))*((1/32 + I/32)*((-(-1 + I*Sqrt[3])^(1/3))*
     (-I + Sqrt[3])*(Sqrt[2]*(-1 + Sqrt[5]) + 
      2*I*Sqrt[5 + Sqrt[5]]) + (-1 - I*Sqrt[3])^(1/3)*
     (I + Sqrt[3])*(I*Sqrt[2]*(-1 + Sqrt[5]) + 
      2*Sqrt[5 + Sqrt[5]])))

%//N // Chop


Bob Hanlon

In article <bua34p$img$1 at>, AES/newspost <siegman at>

<< In article <bu8iv9$au6$1 at>, William McHargue <A at B.C> wrote:

> Hello,
> I've been using Mathematica for engineering analysis and have come to
> carry units throughout my calculations. Does anyone else do this and
> would you like to exchange tips/tricks?
> Regards,

Can't say I do this extensively, but I routinely define

    deg = Pi/180.

and then use constructs like

    theta = 37 deg

    Sin[60 deg]


to make calculations and results more readable.

Would be glad to hear of other tricks and techniques

  • Prev by Date: RE: Padding arrays with reversed elements
  • Next by Date: Prob compiling MathLink code with Carbon
  • Previous by thread: Re: Anyone using the Units package extensively?
  • Next by thread: Re: Anyone using the Units package extensively?