Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1994
*January
*February
*March
*April
*May
*June
*July
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1994

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

Search the Archive

Re: Stupid Mma Tricks

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re: Stupid Mma Tricks
  • From: keiper (Jerry Keiper)
  • Date: Sat, 12 Mar 1994 15:25:14 -0600

   > You also get exact answer for other multiples of pi/12 and other trig  
   > functions. However sin(pi/8), sin(pi/24), etc. received no such special  
   > attention -- they remain unevaluated. Apparently somebody thinks
   > Pi/12 ( = 15  degrees) is special.

   > Then it struck me. What if all exact trig values are calculated
   > through some kinky algorithm that deals strictly with multiples
   > of pi/12, so that e.g. when  you find sin(pi/3), it is handled
   > as sin(4 pi/12)? Perhaps Mathematica calculates the fourth power
   > of the 2x2 rotation matrix for an angle of pi/12,  then extracts
   > the values of sin(pi/3) and cos(pi/3) from that matrix?

   > Would somebody please confirm or deny this ugly rumor?

It is generally accepted that Pi/6 and Pi/4 are sufficiently special
that the trig functions should evaluate at them.  Because nothing
is calculated (the values are stored in a table) it was convenient
to have a table with no holes in it.  GCD[1/6, 1/4] is 1/2 so the
tables are set up in increments of Pi/12.  The argument of the
function is multiplied by 12/Pi (and reduced by symmetries, etc)
to give the index into the tables.  Multiples of Pi/8 and Pi/5
don't fit into the tables.  Of course we could set it up in increments
of Pi/120 to include these values, too ...

Jerry B. Keiper
keiper at wri.com
Wolfram Research, Inc.





  • Prev by Date: Integral of unbounded function.
  • Next by Date: triple integral
  • Previous by thread: Stupid Mma Tricks
  • Next by thread: Arbitrary Precision Calculation Of Pi