Add bcround, bcfloor, bcceil to BCMath.

From: Date: Tue, 26 Sep 2023 10:10:28 +0000
Subject: Add bcround, bcfloor, bcceil to BCMath.
Groups: php.internals 
Request: Send a blank email to internals+get-121146@lists.php.net to get a copy of this message
Hi, internals. I'm currently working on renovating the round() function. The current round() function rounds a value like 0.285 (0.28499....) to 0.29 using pre-round. This is a mistake for FP, so discussions are underway to abolish such pre-round behavior. However, there is definitely a user request to round 0.285 to 0.29, so I thought why not add a function similar to the round function to BCMath. Similarly, I'm considering adding similar functionality to floor() and ceil(). In rare cases, when dealing with very large values, these will return a different value than expected as a decimal number. I would love to hear everyone's opinions. Regards. Saki

« previous php.internals (#121146) next »