Re: TIB: Trig. program. displays answers in radical and pi form!


[Prev][Next][Index][Thread]

Re: TIB: Trig. program. displays answers in radical and pi form!




At 06:13 AM 2/8/98 -0800, you wrote:
>p.s. if anyone knows how i could display the answer in radical form any
>way other than matching it with the list of answers, for example how to
>make it know that 3.605551275 = \/(13) other than saying "if ans =
>3.605551275 : then : disp(\/(13))" please let me know.  this would be a
>tremendous improvement to the prog.

Actually you can use trig. identities for known identities to find unknown
values precisely:

sin X = Opposite/Hypotenuse
cos X = Adjacent/Hypotenuse
tan X = Opposite/Adjacent
(sin X)^2 + (cos X)^2 = 1
sin (2X) = 2sin Xcos X
cos (2X) = (cos X)^2 - (sin X)^2
cos (2X) = 2(cos X)^2 - 1
cos (2X) = 1 - 2(sin X)^2
sin (A + B) = sin Acos B + cos Asin B
sin (A - B) = sin Acos B - cos Asin B
cos (A + B) = cos Acos B - sin Asin B
cos (A - B) = cos Acos B + sin Asin B
tan (A + B) = (tan A + tan B)/(1 - tan Atan B)
tan (A - B) = (tan A - tan B)/(1 + tan Atan B)

Using the various identities and knowledge from pre-calc (actually learned
the stuff in FST (Functions, Statistics, and Trig.)) you can calculate ANY
angle from known angles by combining various indentities together.  Anyone
up to the challenge of making the ultimate routine to convert any input
angle into a radical expression?  Everything's here that you need...just
takes TIME to write it (which we don't have much left of because of WWIII
starting within the month).


                 Thomas J. Hruska -- thruska@tir.com
Shining Light Productions -- "Meeting the needs of fellow programmers"
         http://www.geocities.com/SiliconValley/Heights/8504
                    http://shinelight.home.ml.org


Follow-Ups: References: