Trigonometric functions#

Sine, \(x\) in degrees, \(\mathrm{sind}(x)\)#

math53.sind(x)#

Returns the sine of \(x\), with \(x\) in degrees, \(\mathrm{sind}(x)\). See also Wikipedia [1245], MathWorld [875], NIST [493].

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.Sind(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.Sind('0.51')
ereal('5.3518479027559984754E-1')

Inverse sine, input in degrees, \(\mathrm{asind}(x)\)#

math53.asind(x)#

where ctx is math53, mathc53, ctxcpp, ctxflint.

Returns the inverse sine of \(x\), \(\mathrm{asin}(x)\). See also Wikipedia [1261], MathWorld [872], NIST [488], Ehrhardt [297] (4.2.13), Mpmath [578].

Cosine, \(x\) in degrees, \(\mathrm{cosd}(x)\)#

math53.cosd(x)#

Returns the cosine of \(x\), with \(x\) in degrees, \(\mathrm{cosd}(x)\). See also Wikipedia [1248], MathWorld [860], NIST [493].

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.Cosd(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.Cosd('0.51')
ereal('5.3518479027559984754E-1')

Inverse cosine, input in degrees, \(\mathrm{acosd}(x)\)#

math53.acosd(x)#

where ctx is math53, mathc53, ctxcpp, ctxflint.

Returns the inverse cosine of \(x\), \(\mathrm{acos}(x)\). See also Wikipedia [1261], MathWorld [869], NIST [488], Ehrhardt [297] (4.2.3), Flint [744], Flint [734], Mpmath [569].

Tangent, with \(x\) in degrees, \(\mathrm{tand}(x)\)#

math53.tand(x)#

Returns the tangent of \(x\), with \(x\) in degrees, \(\mathrm{tand}tan(x)\). See also Wikipedia [1248], MathWorld [876], NIST [493].

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.Tand(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.Tand('0.51')
ereal('5.3518479027559984754E-1')

Inverse tangent, input in degrees, \(\mathrm{atand}(x)\)#

math53.atand(x)#

where ctx is math53, mathc53, ctxcpp or ctxflint.

Returns the inverse tangent of \(x\), \(\mathrm{atan}(x)\). See also Wikipedia [1261], MathWorld [873], NIST [488], Ehrhardt [297] (4.2.15), Flint [744], Flint [734], Mpmath [579].

Cotangent, with \(x\) in degrees, \(\mathrm{cotd}(x)\)#

math53.cotd(x)#

Returns the cotangent of \(x\), with \(x\) in degrees, \(\mathrm{cotd}(x)\). See also Wikipedia [1248], MathWorld [861], NIST [493].

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.Cotd(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.Cotd('0.51')
ereal('5.3518479027559984754E-1')

Inverse cotangent, input in degrees, \(\mathrm{acotd}(x)\)#

math53.acotd(x)#

Returns the inverse cotangent of \(x\), \(\mathrm{acot}(x)\). See also Wikipedia [1261], MathWorld [870], NIST [488], Ehrhardt [297] (4.2.5).

Auxiliary function, \(\mathrm{acos}(1-x)\)#

math53.acos1m(x)#

Returns \(\mathrm{acos}(1-x)\), \(0 \le x \le 2\), accurate also for \(x\) near 0.

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.Acos1m(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.Acos1m('0.51')
ereal('5.3518479027559984754E-1')

Haversine function \(\mathrm{hav}(x) = (1 - \cos(x))/2\)#

math53.hav(x)#

Returns the haversine function \(\mathrm{hav}(x) = (1 - \cos(x))/2 = \sin^2(x/2)\). See also MathWorld [984], Wikipedia [1346].

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.Haversine(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.Haversine('0.51')
ereal('5.3518479027559984754E-1')

Inverse haversine function \(\mathrm{archav}(x) = \mathrm{acos}(1-2x)\)#

math53.archav(z)#

Returns the inverse haversine function \(\mathrm{archav}(x) = \mathrm{acos}(1-2x) =2 \mathrm{asin}(\sqrt{x})\), \(0 \le x \le 1\). See also MathWorld [988], Wikipedia [1348].

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.ArcHaversine(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.ArcHaversine('0.51')
ereal('5.3518479027559984754E-1')

Versine function \(\mathrm{vers}(x) = 1 - \cos(x)\)#

math53.vers(x)#

Returns the versine function \(\mathrm{vers}(x) = 1 - \cos(x)\).

See also: https://en.wikipedia.org/wiki/Versine#Haversine

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.Versine(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.Versine('0.51')
ereal('5.3518479027559984754E-1')

Coversine, \(\mathrm{covers}(x) = 1 - \sin(x)\)#

math53.covers(x)#

Returns the \(\mathrm{covers}(x) = 1 - \sin(x)\).

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.Covers(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.Covers('0.51')
ereal('5.3518479027559984754E-1')

Versint function \(\mathrm{versint}(x) = x - \sin(x)\)#

math53.versint(x)#

Returns \(\displaystyle \mathrm{versint}(x) = \int_0^x \mathrm{vers}(t) \mathrm{d}t = x - \sin(x)\), accurate also near 0.

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.Versint(0.5)
ereal('5.2359877559829887307E-1')
>>> ereal.Versint('0.51')
ereal('5.3518479027559984754E-1')

Integral of cos powers, \(\mathrm{cosint}(n,x)\)#

math53.cosint(n, x)#

Returns \(\displaystyle \mathrm{IC}_n(x) = \int_0^x \cos^n(t) \, \mathrm{d}t\), the integral of the nth cos power, for \(n \ge 0\).

See also Ehrhardt [297] (3.10.13).

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.CosInt(3, 4)
ereal('5.2359877559829887307E-1')
>>> ereal.CosInt(3, 12)
ereal('5.3518479027559984754E-1')

Integral of sin powers, \(\mathrm{sinint}(n,x)\)#

math53.sinint(n, x)#

Returns sinint(n,x) = integral(sin(t)^n, t=0..x), n >= 0

Returns \(\displaystyle \mathrm{IS}_n(x) = \int_0^x \sin^n(t) \, \mathrm{d}t\), the integral of the nth sin power, for \(n \ge 0\).

See also Ehrhardt [297] (3.10.14).

An example in Python

>>> from xlcalcnet import ereal
>>> ereal.SinInt(3, 4)
ereal('5.2359877559829887307E-1')
>>> ereal.SinInt(3, 12)
ereal('5.3518479027559984754E-1')