log1p


expn apg

RETURN the log(1 + number), computed in a way that is accurate even when the value of number is close to zero.

Compatible with LOCALE only, up to PHP 7.4.XX.




This function return the natural logarithm of ( 1 + $num ).


<?php

float log1p 
float $num )


where,

$num The argument to process

?>
 

$num


The argument to process.



  1 EXERCISE   

<table width="100%" border="1" cellspacing="5" cellpadding="5">
<tr><td colspan="4">NATURAL LOGARITHM VALUES</td></tr>
<tr><td>CONSTANT</td><td>VALUE</td><td>OPERATION</td><td>RESULT</td></tr>
<?php

// setlocale(LC_ALL, 'es_AR', 'es-AR');

$log1p_a = [ 'PHP_INT_MIN' => PHP_INT_MIN,
            
'PHP_FLOAT_MIN' => PHP_FLOAT_MIN,
            
'0' => 0'e' => M_E
            
'PHP_INT_MAX' => PHP_INT_MAX
            
'PHP_FLOAT_EPSILON' => PHP_FLOAT_EPSILON
            
'PHP_FLOAT_MAX' => PHP_FLOAT_MAX ];
            
foreach(
$log1p_a as $wis_a => $val_a)


echo 
'<td>' $wis_a '</td>';
echo 
'<td>' $val_a '</td>';
echo 
'<td>log1p( ' $val_a ' )</td><td>' log1p($val_a) . '</td></tr>';

}

?>
<td colspan="4">ed48</td></tr></table><br>