This site is supported by donations to The OEIS Foundation.
Template:Sin
From OeisWiki
The following documentation is located at Template:Sin/doc. [<Edit> Template:Sin/doc]
[⧼Purge⧽ Template:Sin]
[⧼Purge⧽ Template:Sin]
The {{sin}} circular function template returns the sine of , where is a real number expressing a circular angle in radians.
Note that you may also use the sin operator (used within the {{#expr: }} parser function extension, e.g. {{#expr: sin (pi/6) }}) which also takes a circular angle in radians as argument.
Contents
Usage
- {{sin|a real number}}
Valid input
- A real number (expressing a circular angle in radians) as argument.
Examples
Examples with valid input
Code Result {{sin|-5*pi/2}} -1 {{sin|-pi/2}} -1 {{sin|-pi/3}} -0.86602540378444 {{sin|-pi/4}} -0.70710678118655 {{sin|-pi/6}} -0.5 {{sin|0}} 0 {{sin|pi/6}} 0.5 {{sin|pi/4}} 0.70710678118655 {{sin|pi/3}} 0.86602540378444 {{sin|pi/2}} 1 {{sin|5*pi/2}} 1
Examples with invalid input (returns an error message)
Code Result {{sin|i}} Expression error: Unrecognized word "i".
Code
Currently (using built-in error message)
{{#expr: sin ({{{1}}}) }}
instead of (using custom error message)
{{ifnum| {{{1|NAN}}} | {{#expr: sin ({{{1}}}) }} | {{error| Sin error: Argument must be a real number (circular angle in radians) }} }}
See also