Skip to main content
2 votes
0 answers
521 views

There is a server on Ubuntu 18. Worth nginx and php 7.4 I need to install php7.4-bcmath Command: "sudo apt-get install php7.4-bcmath" keeps giving error: Reading package lists... Done ...
1 vote
0 answers
177 views

I'm trying to use the PHP bcmath library to handle the problem of rounding errors in PHP. My code: $usdPerCoin = 2755905; $amountToConvert = 1000; function toFixed(string $number, int $precision = 8):...
0 votes
0 answers
368 views

If I use a bcmath function, they all take values as strings and return a string. I have several functions that use bcmath in order to work on monetary values. The database stores these values as a ...
0 votes
0 answers
397 views

So I am trying to install the bcmath module and it seems to have worked but when I check my phpinfo it says it is not on there. This is the output I get when I do php -m [PHP Modules] bcmath bz2 ...
0 votes
0 answers
261 views

I'm trying to do precise arithmetics calculations inside a Twig template, but I am struggling with floating point's precision error and I can't find a way to solve this. Is there a way to solve this ...
1 vote
0 answers
446 views

I've got a project on an Ubutu server. I keep getting the following error \FatalThrowableError: Call to undefined function bandwidthThrottle\tokenBucket\util\bcsub() in vendor/bandwidth-throttle/...
2 votes
0 answers
2k views

I have installed the php bcmath module for 7.2 via the command: yum install php-bcmath I can see that it's there, but it's not in the php ini file when I check with command php -i How can I enable ...
1 vote
0 answers
3k views

I am working on a Laravel project using the auth scaffolding. When trying the link "forgot your password" with a valid mail address, I get the following error: The BCMath functions must be enabled to ...
0 votes
0 answers
498 views

I have 2 versions of php5.6 installed in my Ubuntu16.0.4. One is ZTS(Zend Thread Safety) enabled and another does not have zts. I want to install bcmath module to php-zts version. I used "apt install ...
0 votes
0 answers
627 views

I have a problem in my php code where it didn't sum two floating point numbers. For this below code snippet it shows the output of "0.00108225". print_r(bcadd(0.00108225, 0.00008892,8)); It shows ...
0 votes
0 answers
89 views

When using bcpowmod, I sometimes get back a string with a floating point value in it. It only does this sometimes when running the function through WAMP server. Other times, it works as expected, ...
0 votes
0 answers
72 views

Take a look at this example in regular math: <?php $rate = 788.159; $amount = 1182.2385; var_dump($amount*(1/$rate)); and the answer is as expected: float(1.5) however when same is done ...
0 votes
0 answers
395 views

I've never used the bcmath figures before and having been doing a bit of reading about comparing and manipulating floating point numbers and this has led me to the bcmath functions. I understand you ...
0 votes
0 answers
132 views

Have a PHP script - using all the correct bcmath functions, and fully understand the issues with floats. I'm also using decimal columns, because, I was under the impression, those are stored as a ...
1 vote
0 answers
165 views

My version of PHP, 5.3.8, doesn't contain BC-Math, which is needed for many cryptocurrency functions. Google hasn't been particularly helpful for links on how to install this particularly library, so ...

15 30 50 per page