math tan for math

Returns the tangent of the number.

Signature

> math tan --degrees

Parameters

  • --degrees (-d): Use degrees instead of radians

Input/output types:

inputoutput
list<number>list<number>
numbernumber

Examples

Apply the tangent to π/4

> 3.141592 / 4 | math tan | math round --precision 4
1

Apply the tangent to a list of angles in degrees

> [-45 0 45] | math tan -d
╭───┬───────╮
│ 0-1.00 │
│ 10.00 │
│ 21.00 │
╰───┴───────╯

Tips: Command math tan was not included in the official binaries by default, you have to build it with --features=extra flag