This site is supported by donations to The OEIS Foundation.


From OeisWiki
Jump to: navigation, search

The {{atan}} circular function template returns the arc tangent (a circular angle in radians) of , where is a real number.

Note that you may also use the atan operator (used within the {{#expr: }} parser function extension, e.g. {{#expr: atan 1 }}) which also returns a circular angle in radians.


{{atan|a real number}}

Valid input

A real number.


Examples with valid input

Code Result
{{atan|- (3^(1/2))}} -1.0471975511966
{{atan|-1}} -0.78539816339745
{{atan|- 1 / 3^(1/2)}} -0.5235987755983
{{atan|0}} 0
{{atan|1 / 3^(1/2)}} 0.5235987755983
{{atan|1}} 0.78539816339745
{{atan|3^(1/2)}} 1.0471975511966

Examples with invalid input (returns an error message)

Code Result
{{atan|i}} Expression error: Unrecognized word "i".


Currently (using built-in error message)

{{#expr: atan ({{{1}}}) }}

instead of (using custom error message)

{{ifnum| {{{1|NAN}}}
| {{#expr: atan ({{{1}}}) }}
| {{error| Atan error: Argument must be a real number }}

See also