PHP log1p() Function Last Updated : 28 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The log1p() is an inbuilt PHP function that returns log(1+number), & when the value of the number is close to zero, then it will compute the way that will provide the accurate result. Syntax: log1p(float $num): floatParameter: This function accepts only a single parameter: num: This parameter specifies the argument to the process.Return value: This function returns log(1+number). The result will be in the floating point. Example 1: The following example demonstrates the log1() function. PHP <?php echo log1p(33)."\n" ; echo log1p(33/2) ; ?> Output: 3.5263605246162 2.8622008809295 Example 2: The following example demonstrates the log1() function. PHP <?php echo log1p(99-50)."\n"; echo log1p(100+2); ?> Output: 3.9120230054281 4.6347289882296 Reference: https://www.php.net/manual/en/function.log1p.php Comment More infoAdvertise with us Next Article PHP log(), log10() Functions N neeraj3304 Follow Improve Article Tags : PHP PHP-math PHP-function Similar Reads PHP log(), log10() Functions Logarithm is the counter operation to exponentiation. The logarithm of a number is in fact the exponent to which the other number i.e. the base must be raised to produce that number. If the Euler's Number 'e' is used as the base of any logarithmic operation it is then known as Natural Logarithmic Op 2 min read PHP | gmp_or() Function The gmp_or() is an inbuilt function in PHP which is used to calculate the bitwise OR of two GMP numbers(GNU Multiple Precision : For large numbers). Syntax: gmp_or($num1, $num2) Parameters: This function accepts two GMP numbers, $num1, $num2 as mandatory parameters as shown in the above syntax. Thes 2 min read PHP | gmp_com() Function The gmp_com() is an inbuilt function in PHP which is used to calculate the one's complement of a GMP number(GNU Multiple Precision : For large numbers). Syntax: gmp_com($num) Parameters: This function accepts a GMP number $num as a mandatory parameter as shown in the above syntax. This parameter can 2 min read PHP | gmp_cmp() Function The gmp_cmp() is an inbuilt function in PHP which is used to compare two GMP numbers(GNU Multiple Precision : For large numbers). Syntax: gmp_cmp($num1, $num2) Parameters: This function accepts two GMP numbers $num1 and $num2 as mandatory parameters as shown in the above syntax for comparing. These 2 min read PHP | gmp_and() Function The gmp_and() is an inbuilt function in PHP which is used to calculate the bitwise AND of two GMP numbers(GNU Multiple Precision : For large numbers). Syntax: gmp_and($num1, $num2) Parameters: This function accepts two GMP numbers, $num1, $num2 as mandatory parameters as shown in the above syntax. T 2 min read PHP | gmp_xor() Function The gmp_xor() is an in-built function in PHP which is used to calculate the XOR of 2 GMP numbers (GNU Multiple Precision : For large numbers). Syntax: gmp_xor( $num1, $num2 ) Parameters: This function accepts two GMP numbers $num1 and $num2 as mandatory parameters shown in the above syntax. These pa 2 min read Like