Maths

Note: functions starting with “_” are internal-use only. This is done, because many trigonometry functions have symmetries. It allows to have several internal-use functions that are valid at a certain range and wrappers users will actually need.

f32 floorF32(f32 x)

A floor function for 32-bit floats.

Parameters
  • x – an input variable

Returns

the floor function result

Since

v0.1

f64 _Sine(f64 x)

An internal-use sine function implementation for 64-bit floats.

Calculates \(sin(x)\) for x in \([0; \frac{\pi}{4}]\).

Parameters
  • x – an input value

Returns

a sine function result

Since

v0.1

f32 _SineF32(f32 x)

An internal-use sine function implementation for 32-bit floats.

Calculates \(sin(x)\) for x in \([0; \frac{\pi}{4}]\).

Parameters
  • x – an input value

Returns

a sine function result

Since

v0.1

f64 _arc_sine(f64 x)

An internal-use arcsine function implementation for 64-bit floats.

Calculates \(arcsin(x)\) for x in \([0; 0.5]\).

Parameters
  • x – an input value

Returns

an arcsine function result

Since

v0.1

f32 _arc_sineF32(f32 x)

An internal-use arcsine function implementation for 32-bit floats.

Calculates \(arcsin(x)\) for x in \([0; 0.5]\).

Parameters
  • x – an input value

Returns

an arcsine function result

Since

v0.1

f64 _arc_tangent(f64 x)

An internal-use arctangent function implementation for 64-bit floats.

Calculates \(arctan(x)\) for x in \([0; 0.5]\).

Parameters
  • x – an input value

Returns

an arctan function result

Since

v0.1

f32 _arc_tangentF32(f32 x)

An internal-use arctangent function implementation for 32-bit floats.

Calculates \(arctan(x)\) for x in \([0; 0.5]\).

Parameters
  • x – an input value

Returns

an arctan function result

Since

v0.1

f64 _Cosine(f64 x)

An internal-use cosine function implementation for 64-bit floats.

Calculates \(cos(x)\) for x in \([0; \frac{\pi}{4}]\).

Parameters
  • x – an input value

Returns

a cosine function result

Since

v0.1

f32 _CosineF32(f32 x)

An internal-use cosine function implementation for 32-bit floats.

Calculates \(cos(x)\) for x in \([0; \frac{\pi}{4}]\).

Parameters
  • x – an input value

Returns

a cosine function result

Since

v0.1

f64 _Tangent(f64 x)

An internal-use tangent function implementation for 64-bit floats.

Calculates \(tan(x)\) for x in \([0; \frac{\pi}{4}]\).

Parameters
  • x – an input value

Returns

a tangent function result

Since

v0.1

f32 _TangentF32(f32 x)

An internal-use tangent function implementation for 32-bit floats.

Calculates \(tan(x)\) for x in \([0; \frac{\pi}{4}]\).

Parameters
  • x – an input value

Returns

a tangent function result

Since

v0.1

f64 sine(f64 x)

A sine function for 64-bit floats.

Parameters
  • x – an input variable

Returns

the sine function result

Since

v0.1

f32 sineF32(f32 x)

A sine function for 32-bit floats.

Parameters
  • x – an input variable

Returns

the sine function result

Since

v0.1

f64 cosine(f64 x)

A cosine function for 64-bit floats.

Parameters
  • x – an input variable

Returns

the cosine function result

Since

v0.1

f32 cosineF32(f32 x)

A cosine function for 32-bit floats.

Parameters
  • x – an input variable

Returns

the cosine function result

Since

v0.1

f64 tangent(f64 x)

A tangent function for 64-bit floats.

Parameters
  • x – an input variable

Returns

the tangent function result

Since

v0.1

f32 tangentF32(f32 x)

A tangent function for 32-bit floats.

Parameters
  • x – an input variable

Returns

the tangent function result

Since

v0.1

f64 arc_sine(f64 x)

A arcsine function for 64-bit floats.

Parameters
  • x – an input variable

Returns

the arcsine function result

Since

v0.1

f32 arc_sineF32(f32 x)

A arcsine function for 32-bit floats.

Parameters
  • x – an input variable

Returns

the arcsine function result

Since

v0.1

f64 arc_cosine(f64 x)

A arccosine function for 64-bit floats.

Parameters
  • x – an input variable

Returns

the arccosine function result

Since

v0.1

f32 arc_cosineF32(f32 x)

A arccosine function for 32-bit floats.

Parameters
  • x – an input variable

Returns

the arccosine function result

Since

v0.1

f64 arc_tangent(f64 x)

A arctangent function for 64-bit floats.

Parameters
  • x – an input variable

Returns

the arctangent function result

Since

v0.1

f32 arc_tangentF32(f32 x)

A arctangent function for 32-bit floats.

Parameters
  • x – an input variable

Returns

the arctangent function result

Since

v0.1

f64 arc_tangent2(f64 y, f64 x)

TODO

Since

v0.1

f32 arc_tangent2F32(f32 y, f32 x)

TODO

Since

v0.1

f64 exponential2(f64 x)

TODO

Since

v0.1

f32 exponential2F32(f32 x)

TODO

Since

v0.1

f64 logarithm2(f64 x)

Finds the power to which the number 2 must be raised to obtain the value x.

TODO: check if this explanation is valid.

\(logarithm2(x) = \log_2 x\)

Since

v0.1

f32 logarithm2F32(f32 x)

Finds the power to which the number 2 must be raised to obtain the value x.

TODO: check if this explanation is valid.

\(logarithm2F32(x) = \log_2 x\)

Since

v0.1

f64 power(f64 x, f64 y)

A power function for 64-bit floats.

\(power(x, y) = x ^ y\)

Parameters
  • x – an input variable, a base, a number to be raised

  • y – an input variable, an exponent, number used to raise the base

Returns

the power function result

Since

v0.1

f32 powerF32(f32 x, f32 y)

A power function for 32-bit floats.

\(powerF32(x, y) = x ^ y\)

Parameters
  • x – an input variable, a base, a number to be raised

  • y – an input variable, an exponent, number used to raise the base

Since

v0.1

f64 modulo(f64 x, f64 y)

A modulo function for 64-bit floats. Returns the remainder of a division, after one number is divided by another.

TODO is this modulo result signed?

\(modulo(x, y) = x \mod y\)

Parameters
  • x – an input variable, a dividend

  • y – an input variable, a divisor

Since

v0.1

f32 moduloF32(f32 x, f32 y)

A modulo function for 64-bit floats. Returns the remainder of a division, after one number is divided by another.

TODO is this modulo result signed?

\(moduloF32(x, y) = x \mod y\)

Parameters
  • x – an input variable, a dividend

  • y – an input variable, a divisor

Since

v0.1