ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
Logarithms.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
PhpOffice\PhpSpreadsheet\Calculation\MathTrig
;
4
5
use
PhpOffice\PhpSpreadsheet\Calculation\Exception
;
6
7
class
Logarithms
8
{
22
public
static
function
withBase
($number,
$base
= 10)
23
{
24
try
{
25
$number =
Helpers::validateNumericNullBool
($number);
26
Helpers::validatePositive
($number);
27
$base
=
Helpers::validateNumericNullBool
(
$base
);
28
Helpers::validatePositive
(
$base
);
29
}
catch
(
Exception
$e) {
30
return
$e->getMessage();
31
}
32
33
return
log($number,
$base
);
34
}
35
45
public
static
function
base10
($number)
46
{
47
try
{
48
$number =
Helpers::validateNumericNullBool
($number);
49
Helpers::validatePositive
($number);
50
}
catch
(
Exception
$e) {
51
return
$e->getMessage();
52
}
53
54
return
log10($number);
55
}
56
66
public
static
function
natural
($number)
67
{
68
try
{
69
$number =
Helpers::validateNumericNullBool
($number);
70
Helpers::validatePositive
($number);
71
}
catch
(
Exception
$e) {
72
return
$e->getMessage();
73
}
74
75
return
log($number);
76
}
77
}
PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Helpers\validateNumericNullBool
static validateNumericNullBool($number)
Many functions accept null/false/true argument treated as 0/0/1.
Definition:
Helpers.php:27
PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms
Definition:
Logarithms.php:7
PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms\withBase
static withBase($number, $base=10)
LOG_BASE.
Definition:
Logarithms.php:22
$base
$base
Definition:
index.php:4
PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms\natural
static natural($number)
LN.
Definition:
Logarithms.php:66
PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms\base10
static base10($number)
LOG10.
Definition:
Logarithms.php:45
Exception
PhpOffice\PhpSpreadsheet\Calculation\MathTrig
Definition:
Absolute.php:3
php
PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Helpers\validatePositive
static validatePositive($number, ?string $except=null)
Confirm number > 0.
Definition:
Helpers.php:83
Exception
libs
composer
vendor
phpoffice
phpspreadsheet
src
PhpSpreadsheet
Calculation
MathTrig
Logarithms.php
Generated on Thu Feb 27 2025 19:01:23 for ILIAS by
1.8.13 (using
Doxyfile
)