Re: Proposal: Arbitrary precision native scalar type

From: Date: Sun, 28 Apr 2024 06:28:33 +0000
Subject: Re: Proposal: Arbitrary precision native scalar type
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-123222@lists.php.net to get a copy of this message
On Sat, Apr 27, 2024 at 11:04 PM Alexander Pravdin <alex.pravdin@interi.co> wrote: > > All builtin functions that currently accept float also accept decimal. > So users don't need to care about separate function sets, and PHP > developers don't need to maintain separate sets of functions. If any > of the parameters is decimal, they return decimal. Float parameters > are converted to decimals implicitly according to the conversion rules > mentioned above. > > So, as I mentioned months ago, this is the reason that having actually looked into implementing things like this, I was interested in using a library. Proposing this is fine. But doing a fully custom implementation that includes this? You're going to implement sin and cos and atan for 128-bit decimals? When we could use an open source library that has a compatible license instead and is proven to work for these already instead, likely with better performance as well? This is likely to be more work than doing a type backed by a library while also being less capable. I know that your shift in proposal here is not aimed at me, and also I'm not a voter so in that sense it doesn't matter. But if this is what the proposal ends up being, I'll probably just continue on the research for an actual arbitrary precision implementation based on MPFR instead of helping with this implementation. Jordan

« previous php.internals (#123222) next »