Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 400 and 402]

(no description)

File Size: 102 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Logarithms:: (3 methods):
  withBase()
  base10()
  natural()


Class: Logarithms  - X-Ref

withBase($number, $base = 10)   X-Ref
LOG_BASE.

Returns the logarithm of a number to a specified base. The default base is 10.

Excel Function:
LOG(number[,base])

param: mixed $number The positive real number for which you want the logarithm
param: mixed $base The base of the logarithm. If base is omitted, it is assumed to be 10.
return: array|float|string The result, or a string containing an error

base10($number)   X-Ref
LOG10.

Returns the result of builtin function log after validating args.

param: mixed $number Should be numeric
return: array|float|string Rounded number

natural($number)   X-Ref
LN.

Returns the result of builtin function log after validating args.

param: mixed $number Should be numeric
return: array|float|string Rounded number