log (argument -- naturalLogarithm)

Inputs

Outputs

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

Behavior

Example: 1.0, 0.0, and -1.0 as inputs

log of 1.0 is 0.0, of 0.0 is -inf, and of -1.0 is NaN, for Real32 and Real64 values.

{} () {} [
  "-- real32 --" printCompilerMessage
  1.0r32 log printStack _:;
  0.0r32 log printStack _:;
  -1.0r32 log printStack _:;

  "-- real64 --" printCompilerMessage
  1.0 log printStack _:;
  0.0 log printStack _:;
  -1.0 log printStack _:;
] "main" exportFunction

Expected Output During Compilation

-- real32 --
0.0r32
-infr32
nanr32
-- real64 --
0.0
-inf
nan

See also