The snax/math.snx module
Since snax doesn't currently support generics, all math functions
come in a number of variants for the different numerical types.
For example, to calculate the sin(x)
, you must choose between
the 32 and 64 bit float variants: sinf32(x)
and sinf64(x)
,
depending on the type of x
.
Floating Point Functions
Trigonometric Functions
Snax currently supports sin
and cos
functions for 32 and 64 bit floats.
These functions are implemented using Bhaskara I's approximation and will differ slightly from the output of trigonometric functions from other languages.