Autor Beitrag
Mitmischer 1703
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 754
Erhaltene Danke: 19

Win 7, Debian
Delphi Prism, Delphi 7, RAD Studio 2009 Academic, C#, C++, Java, HTML, PHP
BeitragVerfasst: Sa 12.01.08 15:44 
Hallo zusammen!

Ich programmiere gerade einen Taschenrechner.

Wie kann man Wurzel ziehen, sinus und cosinus berechnen?


Moderiert von user profile iconChristian S.: Topic aus Off Topic verschoben am Sa 12.01.2008 um 15:54

_________________
Die Lösung ist nicht siebzehn.
Tilo
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1098
Erhaltene Danke: 13

Win7 geg. WInXP oder sogar Win98
Rad2007
BeitragVerfasst: Sa 12.01.08 15:53 
Wurzel->power (Umwandlung Potenz<>Wurzel!)
Sinus und Cosinus sind in der Unit math definiert.
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: Sa 12.01.08 16:20 
sqrt(x)
sin(x)
cos(x)

wie gesagt, 'math' einbinden...
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Sa 12.01.08 17:37 
Um die beiden Postings ganz elegant zu vereinen:
power(base, exponent) = Potenzieren
sqrt(x) = Quadratwurzel
Andere Wurzeln: z.B. statt dritte Wurzel einfach hoch 1/3
sin(x), cos(x), tan(x) usw., ganz selbsterklärend.
Genauso gibt es log etc. Für die trigonometrischen Funktionen, Logarithmen etc. aber die Unit maths einbinden.

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell