sin (angle -- sine)

Inputs

Outputs

sin accepts Real32 and Real64 objects. The input is dereferenced and must be non-NIL.

Behavior

Example: sine at 0 and ±π/2

sin gives 0.0 at 0, 1.0 at π/2, and -1.0 at -π/2 for Real32 and Real64 angles.

{} () {} [
  "-- 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