Skip to content

ext/bcmath: Performance improvement bcsqrt() #18771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
removed nearzero.c
  • Loading branch information
SakiTakamachi committed Jun 11, 2025
commit aef9c1732021d4ed51578912091b32c5e98874a5
1 change: 0 additions & 1 deletion ext/bcmath/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ if test "$PHP_BCMATH" != "no"; then
libbcmath/src/long2num.c
libbcmath/src/init.c
libbcmath/src/int2num.c
libbcmath/src/nearzero.c
libbcmath/src/neg.c
libbcmath/src/num2long.c
libbcmath/src/num2str.c
Expand Down
2 changes: 1 addition & 1 deletion ext/bcmath/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (PHP_BCMATH == "yes") {
ADD_SOURCES("ext/bcmath/libbcmath/src", "add.c div.c init.c neg.c \
raisemod.c sub.c compare.c divmod.c int2num.c long2num.c \
num2long.c recmul.c sqrt.c zero.c doaddsub.c \
floor_or_ceil.c nearzero.c num2str.c raise.c rmzero.c str2num.c \
floor_or_ceil.c num2str.c raise.c rmzero.c str2num.c \
round.c convert.c", "bcmath");

AC_DEFINE('HAVE_BCMATH', 1, "Define to 1 if the PHP extension 'bcmath' is available.");
Expand Down
2 changes: 0 additions & 2 deletions ext/bcmath/libbcmath/src/bcmath.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ bool bc_is_zero(bc_num num);

bool bc_is_zero_for_scale(bc_num num, size_t scale);

bool bc_is_near_zero(bc_num num, size_t scale);

bool bc_is_neg(bc_num num);

void bc_rm_trailing_zeros(bc_num num);
Expand Down
57 changes: 0 additions & 57 deletions ext/bcmath/libbcmath/src/nearzero.c

This file was deleted.