Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations. Learn more →
Brick\Math Alternatives
Similar projects and alternatives to Brick\Math
-
-
Cloudways
Cloudways' Black Friday Offer - 1st Choice of Developers. Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.
-
-
-
-
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
-
-
psl
📚 PHP Standard Library - a modern, consistent, centralized, well-typed, non-blocking set of APIs for PHP programmers
-
-
-
-
PHP Mess Detector
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.
-
-
-
-
ip
Immutable value object for IPv4 and IPv6 addresses, including helper methods and Doctrine support. (by darsyn)
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Brick\Math discussion
Brick\Math reviews and mentions
-
Using Arbitrary Precision In PHP
The first library that allows to perform calculations with arbitrary precision is Brick Math in version 0.11.0. It's based on the GMP and BC Math extensions. They are not required, but if they are installed, the library will use them to perform calculations and make them faster. If none of them is installed, the library will use its own implementation of the algorithms.
-
PHP libraries and tools
brick/math: Arbitrary-precision arithmetic library for PHP
-
PHP is trolling me
Use strings. For PHP specifically, the Brick/Math library.
-
[ELI5] Why is it bad to compare floats directly for equality?
There are excellent wrappers for this like https://github.com/brick/math
-
Need Guidance for my Passionate Ecommerce Project
https://github.com/brick/math to handle bignumber and operations
-
How are you handling your money?
In Java and Ruby, BigDecimal is an inbuilt class that can be used. For PHP, you can checkout the Brick Math Library Basically, just find the arbitrary-precision Decimal type/Class/Library in your choice of language. Got another approach, please do let me know in comment section.
- Weekly "ask anything" thread
-
What are the latest thoughts on storing and working with very large and very small financial transactions?
I decided to use https://github.com/brick/math and store the amount as a string in the database. My project use NANO, so that's 30 decimal points to keep. Number type column is not the choice at all.
-
Vote for enums in PHP 8.1 has started — looking good so far!
There are many use cases where enums don't need to be backed by a scalar. I'm thinking of brick/math's RoundingMode for example: you use these in code, but never store/serialize them really.
-
(int) (round(19.33, 2) * 100) = 1932 - can someone please explain this to me?
Besides, using an arbitrary-precision library gives you an unlimited number of digits, and, in the case of brick/math, many more rounding modes to choose from. And predictable ones.
-
A note from our sponsor - Cloudways
platform.cloudways.com | 13 Jan 2025
Stats
brick/math is an open source project licensed under MIT License which is an OSI approved license.
The primary programming language of Brick\Math is PHP.