$nav ===== Function: llLog10 ===== float llLog10(float arg) Returns the logarithm in base ten of the argument. ===== Parameters ===== === arg === The $lty[float] value whose logarithm in base 10 is to be calculated. ===== Return value ===== Returns a $lty[float] with the logarithm in base 10 of the argument. ===== Notes ===== * In order to make sense, the argument must be greater than 0.0; a value of 0.0 or less yields 0.0. * The function returns $pinf if the input is $pinf, and 0.0 if the input is $minf or $nan. * To calculate the natural logarithm, $lfn[llLog] can be used. * To calculate the logarithm in any other base, there is a recipe in the Notes section of $lfn[llLog]. * There is no built-in inverse of this function. To raise 10 to a power, you can use ''llPow(10, power)''. But if you want to raise 10 to an integer constant, better use scientific notation, for example ''1e32'' means 10 to the 32nd power (1032). See $lty[float] for a description of scientific notation. ===== Short examples ===== float f; f = llLog10(10); // sets f to 1 f = llLog10(1); // sets f to 0 f = llLog10(2); // sets f to 0.301030 approx. f = llLog10(0.5); // sets f to -0.301030 approx. f = llLog10(-1); // sets f to 0 ===== See also ===== * $lfn[llLog] to calculate the natural logarithm. * $lfn[llPow] to raise a number to a power (also called antilogarithm). * $lty[float] type and associated caveats and limitations.