TAN/de
From MCS Wiki AVR
< TAN(Difference between revisions)
(→See Also) |
(→Example) |
||
Line 50: | Line 50: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Beispiel</span> = |
<br/><source lang="bascomavr"> | <br/><source lang="bascomavr"> | ||
$regfile = "m48def.dat" ' specify the used micro | $regfile = "m48def.dat" ' specify the used micro | ||
− | $crystal = 8000000 ' | + | $crystal = 8000000 ' Taktrate |
− | $baud = 19200 ' | + | $baud = 19200 ' Baudrate |
$hwstack = 32 ' default use 32 for the hardware stack | $hwstack = 32 ' default use 32 for the hardware stack | ||
$swstack = 10 ' default use 10 for the SW stack | $swstack = 10 ' default use 10 for the SW stack | ||
Line 63: | Line 63: | ||
Dim S As Single , X As Single | Dim S As Single , X As Single | ||
− | S = 0.5 : X = Tan(s) : Print X ' | + | S = 0.5 : X = Tan(s) : Print X ' Ausgabe: 0.546302195 |
− | S = 0.5 : X = Sin(s) : Print X ' | + | S = 0.5 : X = Sin(s) : Print X ' Ausgabe: 0.479419108 |
− | S = 0.5 : X = Cos(s) : Print X ' | + | S = 0.5 : X = Cos(s) : Print X ' Ausgabe: 0.877588389 |
End | End | ||
</source><br/>{{Languages}} | </source><br/>{{Languages}} | ||
[[Category:BASCOM Language Reference/de]] | [[Category:BASCOM Language Reference/de]] |
Latest revision as of 00:06, 22 February 2013
Contents |
Funktion
Gibt den Tangens einer Gleitkommazahl zurück
Syntax
var = TAN( source )
Anmerkungen
Var |
Numerische Variable für die Aufnahme des Tangens-Wertes. |
Source |
Single- oder Double-Variable der Zahl von der der Tangens berechnet werden soll. |
Alle trigonometrischen Funktionen arbeiten mit Radian. Benutzen Sie deg2rad und rad2deg um zwischen Radian und Grad umzurechnen.
Siehe auch
RAD2DEG , DEG2RAD , ATN , COS , SIN , ATN2
Beispiel
$regfile = "m48def.dat" ' specify the used micro $crystal = 8000000 ' Taktrate $baud = 19200 ' Baudrate $hwstack = 32 ' default use 32 for the hardware stack $swstack = 10 ' default use 10 for the SW stack $framesize = 40 ' default use 40 for the frame space Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0 Dim S As Single , X As Single S = 0.5 : X = Tan(s) : Print X ' Ausgabe: 0.546302195 S = 0.5 : X = Sin(s) : Print X ' Ausgabe: 0.479419108 S = 0.5 : X = Cos(s) : Print X ' Ausgabe: 0.877588389 End
Languages | English • Deutsch |
---|