For the complete documentation index, see llms.txt. This page is also available as Markdown.

SU.Math.log

SU Library: ab Version 0.7.0

SU.Math.log(value, base)

Gibt den natürlichen Logarithmus (Basis e) oder den Logarithmus zu einer optionalen Basis zurück.

Parameter

  • value: number – Positive reelle Zahl (größer als 0)

  • base: number (optional) – Basis des Logarithmus (Standard: e)

Rückgabewert

  • number – Der Logarithmus von value

  • -inf (SU.Math.isInf): Bei Eingabe von 0

  • nan (not a number, SU.Math.isNan): Bei negativen Eingaben

Beispiel

local naturalLog = SU.Math.log(2.71828)    -- liefert ca. 1.0
local customLog  = SU.Math.log(8, 2)        -- liefert ca. 3.0

Last updated