Re: [RFC] [Discussion] Adding bcround, bcfloor and bcceil to BCMath

From: Date: Tue, 03 Oct 2023 10:22:30 +0000
Subject: Re: [RFC] [Discussion] Adding bcround, bcfloor and bcceil to BCMath
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-121216@lists.php.net to get a copy of this message
On Tue, Oct 3, 2023, 4:13 PM Saki Takamachi <saki@sakiot.com> wrote: > yes, they do, as do almost all floating points implementation. > > Memory limited float values and their respective operations are still > useful in many areas, but financial values and the likes. Scaled integers > are the way for accuracy. > > > Also, side note, gmp recommends to rely on > https://www.mpfr.org/ for > accurate FP operations > > > Hi > > This seems to be a floating point number with extremely high precision > compared to regular long doubles. However, as you say, even though the > accuracy is very high, errors still occur. (the error is so small that it > almost never becomes a problem.) > > By its very nature, BCMath does not introduce any errors. It is debatable > whether floating point calculations in GMP can play the role of BCMath. > so does gmp. The point made about gmp earlier is more about the sustainability of gmp vs bcmath.

« previous php.internals (#121216) next »