sin (angle -- sine)
Inputs
angle: Real angle in radians.
Outputs
sine: Sine in the same real schema.
sin accepts Real32 and Real64 objects. The input is dereferenced and must be non-NIL.
Behavior
- A known input is evaluated at compile time.
- An unknown input produces an unknown value of the same real schema.
Example
{} () {} [
"-- real32 --" printCompilerMessage
0.0r32 sin printStack _:;
1.5707964r32 sin printStack _:;
-1.5707964r32 sin printStack _:;
"-- real64 --" printCompilerMessage
0.0 sin printStack _:;
1.5707963267948966 sin printStack _:;
-1.5707963267948966 sin printStack _:;
] "main" exportFunction
Expected Output During Compilation
-- real32 --
0.0r32
1.0r32
-1.0r32
-- real64 --
0.0
1.0
-1.0
See also
^builtin(base exponent -- power)Raises one Real object to another of the same schema and keeps that real schema in the result.castbuiltin(object schema -- convertedValue)Casts a Cond or numeric object to the numeric schema selected by theschemainput.ceilbuiltin(object -- ceilingValue)Rounds a Real object upward and keeps the same real schema.cosbuiltin(angle -- cosine)Computes the cosine of a Real object and keeps the same real schema.floorbuiltin(object -- floorValue)Rounds a Real object downward and keeps the same real schema.logbuiltin(argument -- naturalLogarithm)Computes the natural logarithm of a Real object and keeps the same real schema.log10builtin(argument -- decimalLogarithm)Computes the base-10 logarithm of a Real object and keeps the same real schema.negbuiltin(object -- negatedValue)Negates a signed Int or Real object and keeps the same schema.sqrtbuiltin(radicand -- squareRoot)Computes the square root of a Real object and keeps the same real schema.