Commit Graph

64 Commits

Author SHA1 Message Date
Jeroen van Wolffelaar
0916fd50c0 5th and probably/hopefully last run of conv_z_macros 2001-09-26 09:21:58 +00:00
Hartmut Holzgraefe
03f7406711 proto fixes "double" -> "float" 2001-09-21 21:59:27 +00:00
Sascha Schumann
f45555e62f Rework some string-to-number and vice-versa functions to work smarter
(e.g. without using functions that use slow locales, without allocating
 extra memory and with fewer integer/float operations)
2001-09-20 08:22:44 +00:00
Sascha Schumann
e261d310a0 quickly fix newly introdued off-by-one 2001-09-19 11:03:58 +00:00
Sascha Schumann
e4ace6cde6 Rewrite _php_match_basetozval to need only one multiplication
per iteration and avoid the U?LONG_MAX hassle.
2001-09-19 10:57:50 +00:00
Sterling Hughes
563c0670e5 another attempt at fixing compile warnings... 2001-09-18 20:05:05 +00:00
Sterling Hughes
8092460830 hopefully fix win32 compile warnings
# I really wish i had a box to compile php with win32 on
2001-09-18 05:48:49 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Stanislav Malyshev
0a143cf655 Add _php_math_zvaltobase and _php_math_basetozval
This allows to use bindec, etc. functions to convert numbers longer
than fits in long, using floats instead.
Note: the functions like decbin still don't use the zval-ed functions,
so they work only on longs yet.
2001-09-03 16:26:31 +00:00
Jeroen van Wolffelaar
2b6bafb269 Remove cbrt also, and mark logm1 and exp1p as expermintal 2001-08-15 19:08:59 +00:00
Jeroen van Wolffelaar
d62fbbd5a8 MF407 2001-08-15 19:01:32 +00:00
Zeev Suraski
c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
Jeroen van Wolffelaar
ec140f4f67 Bugfix in abs(), abs(LONG_MIN) was bogus 2001-08-05 20:27:03 +00:00
Stanislav Malyshev
c7d7834a43 Check that _php_math_basetolong result fits long (by request from Troels Arvin) 2001-08-05 14:40:14 +00:00
Zeev Suraski
1159c84ab7 - TSRMLS_FETCH work
- whitespace fixes
2001-08-05 01:43:02 +00:00
Jeroen van Wolffelaar
68df8ea465 Another bugfix in pow. Special cases, with 10 times the same thing are
_so_ error_prone... :(
2001-08-04 20:58:47 +00:00
Rasmus Lerdorf
7d5999fb4d Kill a warning 2001-08-04 20:52:35 +00:00
Jeroen van Wolffelaar
b245789bdb Bugfix. All tests pass now on my system 2001-08-04 18:29:37 +00:00
Jeroen van Wolffelaar
8803bbaa80 - A little bit cleaning of pow(), and 12 bytes less memory (wow) 2001-08-04 13:11:17 +00:00
Jeroen van Wolffelaar
dc4adaa231 #- HTML-safe error for pow() 2001-08-03 23:27:23 +00:00
Jeroen van Wolffelaar
7733d95770 - New pow() function. It now gives warnings on wrong input, and
returns integer result when possible
@- New pow() implementation, which returns an integer when possible,
@  and warnings on wrong input (jeroen)
2001-08-03 22:19:11 +00:00
Frank M. Kromann
2794a0e69a These new math functions are not supported on Win32 2001-08-01 16:55:24 +00:00
Andrei Zmievski
fa6b5cdde7 - Added a few new math functions from Jesus Castagnetto.
- Converted to Z_* macros.
@- Added a few new math functions. (Jesus)
2001-08-01 13:48:14 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Thies C. Arntzen
825457ae64 update my email. 2000-10-29 09:14:55 +00:00
Frank M. Kromann
d313ad8bf5 Making _php_math_longtobase() and _php_math_basetolong() callable from DLL and SO modules 2000-10-27 20:26:16 +00:00
Stanislav Malyshev
08e1c852aa Fix decbin 2000-09-17 21:11:55 +00:00
Hartmut Holzgraefe
0df7721842 fix for bug #5672 2000-07-30 21:55:27 +00:00
David Croft
83513d9580 Changed lots of PHP 3 licence headers to PHP 4, mainly in .h files.
Added a few RCS $Id$ tags.

# Note: I have avoided changing any .h files if the corresponding .c file
# had not already been changed as I am not sure if there are any legal
# issues here. So some extensions still have PHP 3 headers.
2000-07-24 01:40:02 +00:00
Rasmus Lerdorf
e3fd1edc49 Make it possible to specify an empty string as a thousands-seperator
in number_format()
@ Make it possible to specify an empty string as a thousands-seperator
@ in number_format()
2000-07-14 18:46:13 +00:00
Egon Schmid
11b749e047 Corrected a mispelled word. 2000-07-09 14:14:51 +00:00
Sascha Schumann
d1c1e99d98 Rename phpmath.h to php_math.h. 2000-06-13 16:31:57 +00:00
Andrei Zmievski
c85390a691 (php_math_number_format) Simplifying the logic also fixed bugs #4954
and #4998.
2000-06-13 04:31:02 +00:00
Egon Schmid
e465e94a12 Fixed a proto. 2000-06-12 15:17:08 +00:00
Andi Gutmans
3701bc4207 - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch 2000-06-05 19:47:54 +00:00
Zeev Suraski
ab36e22aeb Small optimization 2000-06-02 12:24:24 +00:00
Zeev Suraski
e043439ff6 Update the license with the new clause 6 2000-05-18 15:34:45 +00:00
Andrei Zmievski
c97760776b (PHP round) Fix proto. 2000-05-18 12:29:58 +00:00
Egon Schmid
7dd8b901e6 Second parameter is optional. 2000-05-17 18:17:07 +00:00
Andrei Zmievski
e2e6363488 Let's cast it. 2000-05-17 12:51:37 +00:00
Andrei Zmievski
08ff225a46 @- Improved round() to allow specification of rounding precision.
@  (Andrei, Todd Kirby <kirbyt@yahoo.com>)
2000-05-17 12:50:04 +00:00
Andi Gutmans
f2ff9eeef5 @ Fix bug in number_format (Jon Forsberg) 2000-04-15 13:53:32 +00:00
Hartmut Holzgraefe
744fe82e0a added the other usefull constants besides M_PI from math.h
as PHP constants
2000-04-08 23:53:19 +00:00
Sascha Schumann
bb09ee9505 Use sprintf everywhere and define sprintf to php_sprintf, if sprintf is broken. 2000-03-12 17:18:21 +00:00
Sascha Schumann
caeaaf4d98 Fix build on systems which lack snprintf or vsnprintf.
PR: #3786
2000-03-12 15:47:34 +00:00
Egon Schmid
70893ff7af Only two lines are allowed here. 2000-03-01 19:56:46 +00:00
Hartmut Holzgraefe
33cb181af2 round(-0.1) will now return 0 instead of -0 2000-03-01 19:36:37 +00:00
Egon Schmid
fe615efb5c More protos. 2000-02-24 08:39:02 +00:00