Hi Jordan,

> To me, while being 100x to 1000x more performant at arithmetic is certainly 
> reason enough on its own, the fact that MPFR (for example) has C 
> implementations for more complex operations that can be utilized is the real 
> selling point. The ext-stats extension hasn't been maintained since 7.4. And 
> trig is critical for a lot of stats functions. A fairly common use of stats, 
> even in applications you might not expect it, is to generate a Gaussian 
> Random Number. That is, generate a random number where if you continued 
> generating random numbers from the same generator, they would form a normal 
> distribution (a bell curve), so the random number is weighted according to 
> the distribution.
> 
> The simplest way to do that is with the sin() and cos() functions (picking a 
> point on a circle). But a lot of really useful such mathematics are mainly 
> provided by libraries that ALSO provide arbitrary precision. So for instance, 
> the Gamma Function is another very common function in statistics. To me, 
> implementing a bundled or core type that utilizes MPFR (or something similar) 
> is as much about getting access to THESE mathematical functions as it is the 
> arbitrary precision aspect.

As you say, BCMath is really barebones and slower than other libraries. It 
would be nice if there was a universal math extension that could handle all use 
cases, but unfortunately there isn't one today.

The biggest problem is right there: there are several math functions, and they 
have slightly different characteristics.

If could combine all of these to create a new math function without sacrificing 
the benefits of each, do you think that would be possible? (It doesn't matter 
what libraries or technologies use internally.)

To be honest, whenever I bring up the topic of BCMath on the mailing list, 
there are always references to speed and other libraries, so many people 
probably want that, but unfortunately, we probably don't have a common idea 
about the specifics.

If what I write is off-topic and not appropriate for this thread, I can start a 
new thread.

Regards.

Saki

Reply via email to