Cphalcon: [NFR] BCMath wrapper

Created on 22 Apr 2019  路  3Comments  路  Source: phalcon/cphalcon

Hello!

I suggest to add a bcmath wrapper in one of two ways:
1) Phalcon\Helper\Math class
2) Or extend the \Phalcon\Helper\Number class

This will allow you to perform mathematical operations with high accuracy at the framework level if it is relevant.

Please see my library for example: https://github.com/TimurFlush/Math

new feature request

Most helpful comment

I think this is a bad idea.

There is no need for a wrapper for very specific math functions in BCMath. Continuing to provide wrappers for very specific functionality just bloats the framework with endless if extension loaded checks ... which hurts performance and takes away from the core simplicity of Phalcon.

All 3 comments

It would be nice if Phalcon provided his own wrapper, because bcmath cannot automatically calculate the full accuracy of multiplication/division.
But that's not critical.

I think this is a bad idea.

There is no need for a wrapper for very specific math functions in BCMath. Continuing to provide wrappers for very specific functionality just bloats the framework with endless if extension loaded checks ... which hurts performance and takes away from the core simplicity of Phalcon.

@virgofx Please note that some methods in my library are not specific to BCMath. For example in similar to PDO

Was this page helpful?
0 / 5 - 0 ratings