Files
IronCalc/docs/src/functions/math_and_trigonometry/sin.md
2024-12-29 13:28:56 +01:00

2.7 KiB

layout, outline, lang
layout outline lang
doc deep en-US

SIN function

::: warning Note: This draft page is under construction 🚧 :::

Overview

SIN is a function of the Math and Trigonometry category that calculates the trigonometric sine of an angle, returning a value in the range [-1, +1].

Usage

Syntax

SIN(angle) => sin

Argument descriptions

  • angle (number, required). The angle whose sine is to be calculated, expressed in radians. To convert between degrees and radians, use the relation below. Alternatively, use the DEGREES or RADIANS functions.

1~\:~\text{degree} = \dfrac{\pi}{180} = 0.01745329252~\text{radians}

Additional guidance

None.

Returned value

SIN returns a unitless number that is the trigonometric sine of the specified angle.

Error conditions

  • In common with many other IronCalc functions, SIN propagates errors that are found in its argument.
  • If no argument, or more than one argument, is supplied, then SIN returns the #ERROR! error.
  • If the value of the angle argument is not (or cannot be converted to) a number, then SIN returns the #VALUE! error.
  • For some argument values, SIN may return a #DIV/0! error.

Details

  • The SIN function utilizes the sin() method provided by the Rust Standard Library.
  • The figure below illustrates the output of the SIN function for angles x in the range -2$\pi$ to +2$\pi$ radians.
Graph showing sin(x) for x between -2π and +2π.

Examples

See some examples in IronCalc.