#
825509ee |
| 27-Sep-2024 |
Christoph M. Becker |
Drop superfluous LONG_MAX/LONG_MIN fallback definitions (GH-15667) Both macros are supposed to be defined in limits.h (C99) and as such it is superfluous to provide fallback definitions.
Drop superfluous LONG_MAX/LONG_MIN fallback definitions (GH-15667) Both macros are supposed to be defined in limits.h (C99) and as such it is superfluous to provide fallback definitions. Even worse, because these fallback definitions didn't cater to LP64, ILP64 and SILP64 data models (and maybe some rather uncommon ones), but just assumed ILP32, they are confusing.
show more ...
|
#
306dedcf |
| 17-Sep-2024 |
Jorg Adam Sowa |
ext/bcmath: bcpow() performance improvement (#15790) * Added function for squaring to improve performance of power calculation * Aligned backslashes * Removed unnecessary c
ext/bcmath: bcpow() performance improvement (#15790) * Added function for squaring to improve performance of power calculation * Aligned backslashes * Removed unnecessary comments * Extracted common part of multiplication and square functions * Added comment to bc_fast_square * Improved wording of bc_mul_finish_from_vector * Reused new function name * Replaced macro with function
show more ...
|
#
fad899e5 |
| 04-Sep-2024 |
Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com> |
[RFC] Support object types in BCMath (#13741) Added BcMath\Number class. It is an immutable object, has methods that are equivalent to existing BCMath calculation functions, and can also
[RFC] Support object types in BCMath (#13741) Added BcMath\Number class. It is an immutable object, has methods that are equivalent to existing BCMath calculation functions, and can also be calculated using operators. The existing BCMath function returned a string for each calculation, but this class returns an object. RFC: https://wiki.php.net/rfc/support_object_type_in_bcmath, https://wiki.php.net/rfc/fix_up_bcmath_number_class --------- Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
show more ...
|
#
a27878cf |
| 30-Aug-2024 |
Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com> |
Fixed LONG_MAX in BCMath ext (#15663)
|
#
8c704ab4 |
| 18-Aug-2024 |
Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com> |
ext/bcmath: Optimize `bcdiv` processing (#14660) Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Co-authored-by: Gina Peter Banyard <girgias@php.net>
|
#
be4b10e9 |
| 11-Jul-2024 |
Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com> |
Added scale to bc_compare argument (#14802) In the original specification, the scale of bc_num was directly changed and compared. This becomes a problem when objects are support
Added scale to bc_compare argument (#14802) In the original specification, the scale of bc_num was directly changed and compared. This becomes a problem when objects are supported, so we will modify it to compare without changing bc_num.
show more ...
|
#
ec54edb9 |
| 30-May-2024 |
Gina Peter Banyard |
ext/bcmath: Use an enum for comparison result (#14374) Improve logic of callers of bc_compare
|
#
d775ba88 |
| 20-May-2024 |
Gina Peter Banyard |
ext/bcmath: Fix [-Wenum-int-mismatch] compiler warning
|
#
70acd6e9 |
| 05-May-2024 |
Gina Peter Banyard |
ext/bcmath: Remove unused ODD() macro function
|
#
bf3c4870 |
| 04-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Avoid needless memsets by creating a variant of bc_new_num that doesn't memset (#14133) Also avoid some memsets where we do call bc_new_num. After: ``` 1.2066178321838 1
Avoid needless memsets by creating a variant of bc_new_num that doesn't memset (#14133) Also avoid some memsets where we do call bc_new_num. After: ``` 1.2066178321838 1.5389559268951 1.6050860881805 ``` Before: ``` 1.3858470916748 1.6806011199951 1.9091980457306 ```
show more ...
|
#
a728e541 |
| 04-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove some dead code from BCMath (#14130) * Remove unused output.c code * Remove unused ignore_last parameter from _bc_do_compare()
|
#
cad0e555 |
| 03-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Faster validation logic in bc_str2num() (#14115) Using SIMD to accelerate the validation. Using the benchmark from #14076. After: ``` 1.3504369258881 1.62063217
Faster validation logic in bc_str2num() (#14115) Using SIMD to accelerate the validation. Using the benchmark from #14076. After: ``` 1.3504369258881 1.6206321716309 1.6845638751984 ``` Before: ``` 1.4750170707703 1.9039781093597 1.9632289409637 ```
show more ...
|
#
039344cf |
| 01-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Avoid extra inits while flooring or ceiling
|
#
34b2116e |
| 01-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Avoid unnecessary destruction in bc_mul()
|
#
0cd952d8 |
| 01-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Avoid unnecessary destruction in bc_sub()
|
#
959e1154 |
| 01-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Avoid unnecessary destruction in bc_add()
|
#
4964c5cb |
| 01-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Move bc_copy_num to header to allow inlining
|
#
d2d4596f |
| 01-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use an unsigned number for the refcount of bcmath objects
|
#
5dc11de5 |
| 01-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Merge n_value and n_ptr
|
#
a481556d |
| 29-Apr-2024 |
Saki Takamachi |
Refactor BCMath (#14076) Optimized the order of structure members and the process of converting strings to bc_num structures. closes #14076
|
#
53593927 |
| 30-Apr-2024 |
Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com> |
[RFC] Add bcfloor, bcceil and bcround to BCMath (#13096) Implementation for the "Adding bcround, bcfloor and bcceil to BCMath" RFC: https://wiki.php.net/rfc/adding_bcround_bcfloor_bcceil_to_
[RFC] Add bcfloor, bcceil and bcround to BCMath (#13096) Implementation for the "Adding bcround, bcfloor and bcceil to BCMath" RFC: https://wiki.php.net/rfc/adding_bcround_bcfloor_bcceil_to_bcmath * Separated round mode into separate header file Co-authored-by: Gina Peter Banyard <girgias@php.net>
show more ...
|
#
e56ed6e1 |
| 13-Aug-2023 |
Jorg Adam Sowa |
BCmath extension code reformatting (#11896) Re-formats the BCmath extension to have consistent formatting. Mostly, it adds the spaces in calculations to have them more readable.
BCmath extension code reformatting (#11896) Re-formats the BCmath extension to have consistent formatting. Mostly, it adds the spaces in calculations to have them more readable. Also: - removes unused headers - removes few variables which are used only once in the code Co-authored-by: George Peter Banyard <girgias@php.net>
show more ...
|
#
68247c02 |
| 24-Jul-2023 |
George Peter Banyard |
Refactor BCMath bundledlib and extension (#10774) * ext/bcmath: coding style: use indentation And add braces to block statements, as the current code was pretty much unreadable with
Refactor BCMath bundledlib and extension (#10774) * ext/bcmath: coding style: use indentation And add braces to block statements, as the current code was pretty much unreadable with how inconsistent it was. * ext/bcmath: Remove some useless header inclusions * ext/bcmath: Use standard C99 bool type instead of char * ext/bcmath: Include specific headers instead of config.h * Restructure definitions to reduce header inclusions * Use size_t as a more appropriate type * Remove unused variable full_scale * Refactor bc_raisemod() to get rid of Zend dependencies This separates the concerns of throwing exceptions back into the PHP_FUNCTION instead of being the responsibility of the library * Refactor bc_raise() to get rid of Zend dependencies This separates the concerns of throwing exceptions back into the PHP_FUNCTION instead of being the responsibility of the library * Refactor bc_divmod() and bc_modulo() to return bool Return false on division by 0 attempt instead of -1 and true on success instead of 0 * Refactor bc_divide() to return bool Return false on division by 0 attempt instead of -1 and true on success instead of 0
show more ...
|
#
82e761ea |
| 01-Jun-2023 |
George Peter Banyard |
Fix [-Wenum-int-mismatch] compiler warnings (#11352)
|
#
f13d541c |
| 28-Feb-2023 |
George Peter Banyard |
Fix GCC 12 compiler warnings (#10713) * Fix -Wunused-but-set-variable compiler warning in ext/mysqli * Fix -Wstrict-prototypes compiler warning in ext/mysqlnd * Fix -Wstric
Fix GCC 12 compiler warnings (#10713) * Fix -Wunused-but-set-variable compiler warning in ext/mysqli * Fix -Wstrict-prototypes compiler warning in ext/mysqlnd * Fix -Wstrict-prototypes compiler warning in ext/soap * Fix -Wunused-but-set-variable compiler warning in ext/exif However, this code looks really sketchy... * Fix -Wstrict-prototypes compiler warning in ext/openssl * Fix -Wstrict-prototypes compiler warning in ext/dba Add void to our bundled libraries * Refactor bundled BCMath library Fix -Wdeprecated-non-prototype compiler warnings Use bool instead of char/int Cleanup some useless header includes
show more ...
|