Re: Native decimal scalar support and object types in BcMath - do we want both?
| From: | Barney Laurance | Date: | Mon, 08 Apr 2024 11:31:34 +0000 |
| Subject: | Re: Native decimal scalar support and object types in BcMath - do we want both? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123039@lists.php.net to get a copy of this message | ||
On 2024-04-08 12:17, Arvids Godjuks wrote:
Why not have decimal be represented as 2 64-bit ints at the engine levelJust to clarify this point, what's the formula to convert back and forth between a decimal and two integers? Are you thinking like scientific notation: decimal = coefficient * 10^exponent. 64 bits for the exponent seems excessive, and it might be nice to have more for the coefficient but maybe that doesn't matter too much.