Re: Floating point problem on FreeBSD

From: Date: Mon, 12 Jun 2000 14:33:00 +0000
Subject: Re: Floating point problem on FreeBSD
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-21102@lists.php.net to get a copy of this message
Just thought I'd let you know that the below code executes fine with FreeBSD 4.0. i.e. printf wraps to a negative val. On Sun, 11 Jun 2000, Andi Gutmans wrote: > Hi, > > The following code causes a SIGFPE on FreeBSD: > #include <stdio.h> > > main() > { > double d; > long i; > > d = 4000000000.0; > i = (long) d; > printf ("%ld\n", i); > } > > It seems to work on Linux and I suppose on other UNIX systems. > > Any idea what the best way is to handle it in PHP? > > Andi > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > Randy Jonasz Software Engineer Click2net Inc. Web: http://www.click2net.com Phone: (905) 271-3550 "You cannot possibly pay a philosopher what he's worth, but try your best" -- Aristotle

« previous php.dev (#21102) next »