Pollita [EMAIL PROTECTED] wrote:
log(0) in any base (except 0, which would be silly) is an undefined
number.
Yes, that's what the teachers told us before they admitted the existance
of infinity.
the libc log() function will return an exceedingly small number
to avoid causing widepsread
I wrote:
% cat log.c
#include stdio.h
#include math.h
int main()
{
printf(%g\n,log(0));
}
% gcc log.c -o log -lm
% ./log
-inf
That's on Linux. On Tru64, it prints:
-1.79769e+308
Apparently, there's a compiler switch to make it behave like on Linux:
% cc -ieee log.c -o log
Hi,
php4-STABLE-200211152030 dumps core on Tru64/Alpha with
ext/standard/tests/math/log.phpt:
EXPECTED OUTPUT
On failure, please mail result to [EMAIL PROTECTED]
200
50
50
50
50
50
50
50
50
50
ACTUAL OUTPUT
On failure, please mail result to [EMAIL PROTECTED]
200
FAILED
Looking
log(0) in any base (except 0, which would be silly) is an undefined
number. the libc log() function will return an exceedingly small number
to avoid causing widepsread panic when log(0) is attempted
(-1.7976931348623E+308 shown below). The test function for log:
$x2 = (int) pow($base, log($x,