cvs: php4 /ext/standard math.c

From: Date: Sun, 30 Jul 2000 21:55:27 +0000
Subject: cvs: php4 /ext/standard math.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-993@lists.php.net to get a copy of this message
hholzgra Sun Jul 30 14:55:27 2000 EDT Modified files: /php4/ext/standard math.c Log: fix for bug #5672 Index: php4/ext/standard/math.c diff -u php4/ext/standard/math.c:1.34 php4/ext/standard/math.c:1.35 --- php4/ext/standard/math.c:1.34 Sun Jul 23 18:39:49 2000 +++ php4/ext/standard/math.c Sun Jul 30 14:55:27 2000 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: math.c,v 1.34 2000/07/24 01:39:49 david Exp $ */ +/* $Id: math.c,v 1.35 2000/07/30 21:55:27 hholzgra Exp $ */ #include "php.h" #include "php_math.h" @@ -56,9 +56,8 @@ } /* }}} */ -/* {{{ proto int ceil(double number) +/* {{{ proto double ceil(double number) Returns the next highest integer value of the number */ - PHP_FUNCTION(ceil) { zval **value; @@ -70,7 +69,7 @@ convert_scalar_to_number_ex(value); if ((*value)->type == IS_DOUBLE) { - RETURN_LONG((long)ceil((*value)->value.dval)); + RETURN_DOUBLE(ceil((*value)->value.dval)); } else if ((*value)->type == IS_LONG) { RETURN_LONG((*value)->value.lval); } @@ -79,7 +78,7 @@ } /* }}} */ -/* {{{ proto int floor(double number) +/* {{{ proto double floor(double number) Returns the next lowest integer value from the number */ PHP_FUNCTION(floor) { @@ -92,7 +91,7 @@ convert_scalar_to_number_ex(value); if ((*value)->type == IS_DOUBLE) { - RETURN_LONG((long)floor((*value)->value.dval)); + RETURN_DOUBLE(floor((*value)->value.dval)); } else if ((*value)->type == IS_LONG) { RETURN_LONG((*value)->value.lval); }

« previous php.cvs (#993) next »