summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src/bcmath.h
Commit message (Collapse)AuthorAgeFilesLines
* Promote some warnings in BCMath to ErrorsGeorge Peter Banyard2020-09-111-3/+0
| | | | | | Also do a bit of refactoring at the same time. Closes GH-6105
* Warn about non well-formed arguments in bcmathvladyslavstartsev2019-05-141-1/+1
| | | | | Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com> Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
* [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.
* Merge branch 'pull-request/2742'Christoph M. Becker2017-09-181-1/+2
|\ | | | | | | | | * pull-request/2742: Fixed bug #66364 (BCMath bcmul ignores scale parameter)
| * Fixed bug #66364 (BCMath bcmul ignores scale parameter)Christoph M. Becker2017-09-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fixed bug #75169 (BCMath errors/warnings bypass error handling)Christoph M. Becker2017-09-091-2/+0
|/ | | | | | | | | | | | | | | Instead of writing warning messages to `stderr`, we employ PHP's error handling to raise `E_WARNING` even for the single case where `bc_rt_error()` has been called, since that did not actually error out. We choose to call `php_error_docref()` directly in libbcmath, since there is no upstream, and since other PHP core functionality is already used in our bundled libbcmath. Accordingly, we remove `rt.c` so it will not be accidentally used in the future. Besides adapting a few existing tests, we add new tests so that the warnings are tested at least once. We also get rid of the Windows specific tests, since the warning behavior is now supposed to be platform-agnostic.
* Remove unused memberChristoph M. Becker2017-09-081-1/+0
| | | | | | | | | | | | The `n_next` member of struct `bc_struct` is unused; the only code that would use this member has been disabled since libbcmath has been bundled nearly 17 years ago. Apparently, `n_next` has been designed to build a linked list of free numbers, but it is doubtful whether that would be an improvement over relying on the efficiency of the ZendMM, so we remove the remaining support altogether. The ABI break probably affects nobody, but would be okay for a new minor version according to our release process, anyway.
* fix clang compatAnatol Belski2016-08-271-1/+1
|
* trailing whitespace removalStanislav Malyshev2015-01-101-1/+1
|
* first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-12/+12
|
* Refactor bcmathXinchen Hui2014-05-051-1/+1
|
* config.h is in this directory, not in ext/bcmath root, fixes re-compilation ↵Kalle Sommer Nielsen2009-06-031-1/+1
| | | | for me
* - Revert bad fixJani Taskinen2008-08-151-1/+1
|
* - no config.h in ext/Pierre Joye2008-08-151-1/+1
|
* revert config header changeRob Richards2007-09-111-1/+1
|
* point to valid config headerRob Richards2007-09-081-1/+1
|
* - Brought ext/bcmath to the new millenniumfoobar2003-12-091-2/+6
| | | | | # consistency..
* missing config.h includefoobar2003-12-011-0/+4
|
* - Fixed bug #26462 (phpize + ext/bcmath -> compile error)foobar2003-11-291-2/+1
|
* - Let's be consistent with these..foobar2003-02-171-2/+2
|
* Made bcmath extension thread safe.Sander Roobol2002-11-221-18/+15
| | | | | @Made bcmath extension thread safe. (Sander)
* - Revert previous patchAndi Gutmans2002-11-201-4/+4
|
* - Intermediate commit which works on making bcmath thread-safe.Andi Gutmans2002-11-201-4/+4
|
* WhitespaceZeev Suraski2001-08-111-2/+2
|
* At long last, import the bcmath library, by Phil NelsonZeev Suraski2000-11-221-0/+158