summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src/num2str.c
Commit message (Collapse)AuthorAgeFilesLines
* Promote some warnings in BCMath to ErrorsGeorge Peter Banyard2020-09-111-1/+0
| | | | | | Also do a bit of refactoring at the same time. Closes GH-6105
* [ci skip] Rename libbcmath license file to LICENSEPeter Kokot2019-05-071-1/+1
| | | | | | - More common filename accross the PHP repository - Additionally, this patch replaces some legacy form feed (FF or ^L) characters (for printers) to LF (\n) newline character.
* Clean up unnecessary ternary expressions and simplify some returnsGabriel Caruso2018-12-031-1/+1
| | | | | | | - Simplify conditions - Use ZEND_HASH_APPLY_* instead of hard-coded booleans - Use ZEND_NORMALIZE_BOOL - Drop sign in favor of ZEND_NORMALIZE_BOOL
* Remove HAVE_ASSERT_HPeter Kokot2018-09-091-1/+0
| | | | | | | | | | | | | | | | The `<assert.h>` header file is part of the standard C89 headers [1] and on older systems there needed to be also a manual check if header is present. Since PHP requires at least C89 manual check and the `HAVE_ASSERT_H` symbol defined by Autoconf in configure.ac can be both removed [2]. This patch also removes unused <assert.h> includes where c files don't use the `assert()` macro. Refs: [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.2 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
* Fixed bug #66364 (BCMath bcmul ignores scale parameter)Christoph M. Becker2017-09-081-5/+8
| | | | | | | | | | | | | We change `bcmul()` and `bcpow()` so that the result has exactly the requested scale (i.e. decimal places) to make them consistent with the other BCMath functions. This also changes our stance regarding bug #52748, which had been classified as documentation problem. We do not manipulate the numbers themselves (anymore), but rather introduce `bc_num2str_ex()` which accepts a scale parameter that overrides the scale of the number by omitting extraneous decimals and adding zeros, respectively. This also allows us to get rid of `split_bc_num()`, which fixes bug #75164 as well.
* Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-2/+2
| | | | semantick changes).
* trailing whitespace removalStanislav Malyshev2015-01-101-1/+1
|
* master renames phase 1Anatol Belski2014-08-251-2/+2
|
* Refactor bcmathXinchen Hui2014-05-051-28/+30
|
* use safe_emalloc()Antony Dovgal2007-07-101-2/+2
|
* - Add bcmath to the standard UNIX buildZeev Suraski2000-11-261-2/+2
| | | | | - Change a couple of malloc()'s and free()'s to emalloc()'s and efree()'s
* At long last, import the bcmath library, by Phil NelsonZeev Suraski2000-11-221-0/+79