Trigonometric functions: Difference between revisions
Content added Content deleted
(sql pl) |
|||
Line 4,658: | Line 4,658: | ||
1.0471975511965976 59.99999999999999 |
1.0471975511965976 59.99999999999999 |
||
1.0471975511965976 59.99999999999999</pre> |
1.0471975511965976 59.99999999999999</pre> |
||
=={{header|Visual Basic|Visual Basic .NET}}== |
|||
{{trans|C#}} |
|||
<lang vbnet>Module Module1 |
|||
Sub Main() |
|||
Console.WriteLine("=== radians ===") |
|||
Console.WriteLine(" sin (pi/3) = {0}", Math.Sin(Math.PI / 3)) |
|||
Console.WriteLine(" cos (pi/3) = {0}", Math.Cos(Math.PI / 3)) |
|||
Console.WriteLine(" tan (pi/3) = {0}", Math.Tan(Math.PI / 3)) |
|||
Console.WriteLine("arcsin (1/2) = {0}", Math.Asin(0.5)) |
|||
Console.WriteLine("arccos (1/2) = {0}", Math.Acos(0.5)) |
|||
Console.WriteLine("arctan (1/2) = {0}", Math.Atan(0.5)) |
|||
Console.WriteLine() |
|||
Console.WriteLine("=== degrees ===") |
|||
Console.WriteLine(" sin (60) = {0}", Math.Sin(60 * Math.PI / 180)) |
|||
Console.WriteLine(" cos (60) = {0}", Math.Cos(60 * Math.PI / 180)) |
|||
Console.WriteLine(" tan (60) = {0}", Math.Tan(60 * Math.PI / 180)) |
|||
Console.WriteLine("arcsin (1/2) = {0}", Math.Asin(0.5) * 180 / Math.PI) |
|||
Console.WriteLine("arccos (1/2) = {0}", Math.Acos(0.5) * 180 / Math.PI) |
|||
Console.WriteLine("arctan (1/2) = {0}", Math.Atan(0.5) * 180 / Math.PI) |
|||
End Sub |
|||
End Module</lang> |
|||
{{out}} |
|||
<pre>=== radians === |
|||
sin (pi/3) = 0.866025403784439 |
|||
cos (pi/3) = 0.5 |
|||
tan (pi/3) = 1.73205080756888 |
|||
arcsin (1/2) = 0.523598775598299 |
|||
arccos (1/2) = 1.0471975511966 |
|||
arctan (1/2) = 0.463647609000806 |
|||
=== degrees === |
|||
sin (60) = 0.866025403784439 |
|||
cos (60) = 0.5 |
|||
tan (60) = 1.73205080756888 |
|||
arcsin (1/2) = 30 |
|||
arccos (1/2) = 60 |
|||
arctan (1/2) = 26.565051177078</pre> |
|||
=={{header|XPL0}}== |
=={{header|XPL0}}== |