note 29752 modified in function.expm1 by danbrown

From: Date: Tue, 09 Mar 2010 12:08:54 +0000
Subject: note 29752 modified in function.expm1 by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-166813@lists.php.net to get a copy of this message
Compare this to log1p (which is its inverse). Also, You may have to use a similar workaraound in case the underlying C library does not support expm1: <?php function expm1($x) { return ($x>-1.0e-6 && $x<1.0e-6) ? ($x + $x*$x/2) : (exp($x)-1); } ?> --was-- Compare this to log1p (which is its inverse). Also, You may have to use a similar workaraound in case the underlying C library does not support expm1: function expm1($x) { return ($x>-1.0e-6 && $x<1.0e-6) ? ($x + $x*$x/2) : (exp($x)-1); } http://php.net/manual/en/function.expm1.php

« previous php.notes (#166813) next »