"The words in the " { $vocab-link "math.libm" } " vocabulary call C standard library math functions. They are used to implement words in the " { $vocab-link "math.functions" } " vocabulary."
{ $warning
"These functions are unsafe. The compiler special-cases them to operate on floats only. They can be called directly, however there is little reason to do so, since they only implement real-valued functions, and in some cases place restrictions on the domain:"
-{ $example "USE: math.functions" "2.0 acos ." "C{ 0.0 1.316957896924817 }" }
+{ $example "USE: math.functions" "2.0 acos ." "C{ 0.0 1.3169578969248166 }" }
{ $unchecked-example "USE: math.libm" "2.0 facos ." "0/0." } }
"Trigonometric functions:"
{ $subsections
"Creates a 45 degree counter clock-wise rotation matrix and applies it to a vector:"
{ $example
"USING: math.affine-transforms math.functions prettyprint ;\n45 deg>rad <rotation> { 0 4 } a.v ."
- "{ -2.82842712474619 2.82842712474619 }"
+ "{ -2.82842712474619 2.8284271247461903 }"
}
"Applies a combined scaling and translation transform to a vector:"
{ $example