cvs: php3 /functions math.c
| From: | Hartmut Holzgraefe | Date: | Tue, 01 Aug 2000 15:09:48 +0000 |
| Subject: | cvs: php3 /functions math.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1008@lists.php.net to get a copy of this message | ||
hholzgra Tue Aug 1 08:09:48 2000 EDT
Modified files:
/php3/functions math.c
Log:
fix for bug report #4246
Index: php3/functions/math.c
diff -u php3/functions/math.c:1.53 php3/functions/math.c:1.54
--- php3/functions/math.c:1.53 Sun Jul 9 07:14:47 2000
+++ php3/functions/math.c Tue Aug 1 08:09:48 2000
@@ -28,7 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: math.c,v 1.53 2000/07/09 14:14:47 eschmid Exp $ */
+/* $Id: math.c,v 1.54 2000/08/01 15:09:48 hholzgra Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "phpmath.h"
@@ -67,7 +67,7 @@
}
/* }}} */
-/* {{{ proto int ceil(double number)
+/* {{{ proto double ceil(double number)
Returns the next highest integer value of the number */
void php3_ceil(INTERNAL_FUNCTION_PARAMETERS) {
pval *value;
@@ -82,7 +82,7 @@
}
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);
@@ -92,7 +92,7 @@
}
/* }}} */
-/* {{{ proto int floor(double number)
+/* {{{ proto double floor(double number)
Returns the next lowest integer value from the number */
void php3_floor(INTERNAL_FUNCTION_PARAMETERS) {
pval *value;
@@ -107,7 +107,7 @@
}
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);