History log of /PHP-8.4/ext/bcmath/libbcmath/src/bcmath.h (Results 1 – 25 of 50)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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 ...


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1
# bcb89c75 16-Jul-2021 Christoph M. Becker

Fix #78238: BCMath returns "-0"

There is no negative zero in the decimal system, so we must suppress
the sign.

Closes GH-7250.


12