diff options
author | Andreas Müller <andreas.mueller@ost.ch> | 2021-12-24 09:48:45 +0100 |
---|---|---|
committer | Andreas Müller <andreas.mueller@ost.ch> | 2021-12-24 09:48:45 +0100 |
commit | b79719066bcc0360e6a1abc3e5e90cc92d01cfed (patch) | |
tree | d6fd9d30dbb5fd9c4fd0e8931456f3b50d157e1f /buch/chapters | |
parent | more trigo stuff (diff) | |
download | SeminarSpezielleFunktionen-b79719066bcc0360e6a1abc3e5e90cc92d01cfed.tar.gz SeminarSpezielleFunktionen-b79719066bcc0360e6a1abc3e5e90cc92d01cfed.zip |
Trigotabelle
Diffstat (limited to 'buch/chapters')
-rw-r--r-- | buch/chapters/030-geometrie/trigo/3.bc | 260 | ||||
-rw-r--r-- | buch/chapters/030-geometrie/trigonometrisch.tex | 3 |
2 files changed, 263 insertions, 0 deletions
diff --git a/buch/chapters/030-geometrie/trigo/3.bc b/buch/chapters/030-geometrie/trigo/3.bc new file mode 100644 index 0000000..2ee9026 --- /dev/null +++ b/buch/chapters/030-geometrie/trigo/3.bc @@ -0,0 +1,260 @@ +# +# 3.bc -- compute values of trigonometric functions to an arbitrary +# number of digits for all multiples of 1 degree using only +# basic arithmetic operations and square roots +# +# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +# +scale=67 + +s00=0 +c00=1 + +s45=sqrt(2)/2 +c45=s45 + +s30=0.5 +c30=sqrt(3)/2 + +s15=sqrt(0.5-0.5*c30) +c15=sqrt(0.5+0.5*c30) + +s36=sqrt((5-sqrt(5))/8) +c36=sqrt((3+sqrt(5))/8) + +s72=2*s36*c36 +c72=c36^2-s36^2 + +s18=sqrt(0.5-0.5*c36) +c18=sqrt(0.5+0.5*c36) + +s09=sqrt(0.5-0.5*c18) +c09=sqrt(0.5+0.5*c18) + +s03=s18*c15-c18*s15 +c03=c18*c15+s18*s15 + +s06=s15*c09-c15*s09 +c06=c15*c09+s15*s09 + +s12=s30*c18-c30*s18 +c12=c30*c18+s30*s18 + +s21=s30*c09-c30*s09 +c21=c30*c09+s30*s09 + +s24=s15*c09+c15*s09 +c24=c15*c09-s15*s09 + +s27=s45*c18-c45*s18 +c27=c45*c18+s45*s18 + +s33=s45*c12-c45*s12 +c33=c45*c12+s45*s12 + +s39=s30*c09+c30*s09 +c39=c30*c09-s30*s09 + +s42=s30*c12+c30*s12 +c42=c30*c12-s30*s12 + +s=3.1415926535/180 +c=sqrt(1-s*s) + +s=s-(4*s*s*s-3*s+s03)/(12*s*s-3) +s=s-(4*s*s*s-3*s+s03)/(12*s*s-3) +s=s-(4*s*s*s-3*s+s03)/(12*s*s-3) +s=s-(4*s*s*s-3*s+s03)/(12*s*s-3) +s=s-(4*s*s*s-3*s+s03)/(12*s*s-3) +s=s-(4*s*s*s-3*s+s03)/(12*s*s-3) +s01=s + +c=c-(4*c*c*c-3*c-c03)/(12*c*c-3) +c=c-(4*c*c*c-3*c-c03)/(12*c*c-3) +c=c-(4*c*c*c-3*c-c03)/(12*c*c-3) +c=c-(4*c*c*c-3*c-c03)/(12*c*c-3) +c=c-(4*c*c*c-3*c-c03)/(12*c*c-3) +c=c-(4*c*c*c-3*c-c03)/(12*c*c-3) +c01=c + +s02=s03*c01-c03*s01 +c02=c03*c01+s03*s01 + +s04=s03*c01+c03*s01 +c04=c03*c01-s03*s01 + +s05=s06*c01-c06*s01 +c05=c06*c01+s06*s01 + +s07=s06*c01+c06*s01 +c07=c06*c01-s06*s01 + +s08=s09*c01-c09*s01 +c08=c09*c01+s09*s01 + +s10=s09*c01+c09*s01 +c10=c09*c01-s09*s01 + +s11=s12*c01-c12*s01 +c11=c12*c01+s12*s01 + +s13=s12*c01+c12*s01 +c13=c12*c01-s12*s01 + +s14=s15*c01-c15*s01 +c14=c15*c01+s15*s01 + +s16=s15*c01+c15*s01 +c16=c15*c01-s15*s01 + +s17=s18*c01-c18*s01 +c17=c18*c01+s18*s01 + +s19=s18*c01+c18*s01 +c19=c18*c01-s18*s01 + +s20=s21*c01-c21*s01 +c20=c21*c01+s21*s01 + +s22=s21*c01+c21*s01 +c22=c21*c01-s21*s01 + +s23=s24*c01-c24*s01 +c23=c24*c01+s24*s01 + +s25=s24*c01+c24*s01 +c25=c24*c01-s24*s01 + +s26=s27*c01-c27*s01 +c26=c27*c01+s27*s01 + +s28=s27*c01+c27*s01 +c28=c27*c01-s27*s01 + +s29=s30*c01-c30*s01 +c29=c30*c01+s30*s01 + +s31=s30*c01+c30*s01 +c31=c30*c01-s30*s01 + +s32=s33*c01-c33*s01 +c32=c33*c01+s33*s01 + +s34=s33*c01+c33*s01 +c34=c33*c01-s33*s01 + +s35=s36*c01-c36*s01 +c35=c36*c01+s36*s01 + +s37=s36*c01+c36*s01 +c37=c36*c01-s36*s01 + +s38=s39*c01-c39*s01 +c38=c39*c01+s39*s01 + +s40=s39*c01+c39*s01 +c40=c39*c01-s39*s01 + +s41=s42*c01-c42*s01 +c41=c42*c01+s42*s01 + +s43=s42*c01+c42*s01 +c43=c42*c01-s42*s01 + +s44=s45*c01-c45*s01 +c44=c45*c01+s45*s01 + +s00 +s01 +s02 +s03 +s04 +s05 +s06 +s07 +s08 +s09 +s10 +s11 +s12 +s13 +s14 +s15 +s16 +s17 +s18 +s19 +s20 +s21 +s22 +s23 +s24 +s25 +s26 +s27 +s28 +s29 +s30 +s31 +s32 +s33 +s34 +s35 +s36 +s37 +s38 +s39 +s40 +s41 +s42 +s43 +s44 +s45 + +c00 +c01 +c02 +c03 +c04 +c05 +c06 +c07 +c08 +c09 +c10 +c11 +c12 +c13 +c14 +c15 +c16 +c17 +c18 +c19 +c20 +c21 +c22 +c23 +c24 +c25 +c26 +c27 +c28 +c29 +c30 +c31 +c32 +c33 +c34 +c35 +c36 +c37 +c38 +c39 +c40 +c41 +c42 +c43 +c44 +c45 + diff --git a/buch/chapters/030-geometrie/trigonometrisch.tex b/buch/chapters/030-geometrie/trigonometrisch.tex index be51e89..51a8254 100644 --- a/buch/chapters/030-geometrie/trigonometrisch.tex +++ b/buch/chapters/030-geometrie/trigonometrisch.tex @@ -732,6 +732,9 @@ Mit einer einzigen Anwendung des Additionstheorems kann man jetzt aus den Werten der Tabelle~\ref{buch:geometrie:trigo:tabelle} die Werte von Sinus und Kosinus für jedes ganzzahlige Vielfache von $1^\circ$ berechnen. +Das Skript \texttt{3.bc} im Repository führt dies durch und demonstriert, +dass für die Berechnung aller Werte nur die arithmetischen Operationen +und Quadratwurzeln nötig sind. \begin{table} \centering \begin{tabular}{|>{$}c<{$}|>{$}r<{$}|>{$}r<{$}|} |