brick / math

Arbitrary-precision arithmetic library for PHP
MIT License
1.78k stars 75 forks source link

BigNumber::of performance update #77

Closed SebastienDug closed 7 months ago

SebastienDug commented 8 months ago
  1. Split regex for Rational and Numerical
  2. Exception method is static to the class instead of being created dynamically for each call to BigNumber::of
  3. Added flag to pregMatch to return no matches as NULL instead of manipulating empty string and converting it to null
  4. leanCleanup introduced as there was a concatenation of sign to pass to the cleanup function which then removes the sign from the string
SebastienDug commented 7 months ago

Hello again,

Sorry for the delay, The changes requested have been applied and the branch has been synched.

Thanks, Sebastien Duguay

BenMorel commented 7 months ago

Thank you, @SebastienDug!

BenMorel commented 7 months ago

Released as 0.12.1.

SebastienDug commented 7 months ago

Good to hear. I will reach out if we find other issues we could improve upon.

Thanks, Sebastien Duguay