diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-16 16:24:40 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-16 16:47:52 +0900 |
| commit | d8992fd631ed66b85e784e7dd3fca77ce979c00a (patch) | |
| tree | 0d2c3b7f37fc707567638e8a2a6b5d2bb91063ed /docs/dev/regex-porting.md | |
| parent | 2faccc227b65ab9dea0f80cd008cbf22ca4c5142 (diff) | |
| download | php-shirabe-d8992fd631ed66b85e784e7dd3fca77ce979c00a.tar.gz php-shirabe-d8992fd631ed66b85e784e7dd3fca77ce979c00a.tar.zst php-shirabe-d8992fd631ed66b85e784e7dd3fca77ce979c00a.zip | |
fix(php-src): round dtoa ties to even and port gcvt mode 2
Rust's shortest float formatting rounds a tie away from zero where
zend_dtoa mode 0 rounds to even, so digits taken straight from `{:e}`
diverged from PHP on values such as -166050639803968.125.
Take only the digit count from `{:e}` and re-format at that fixed
precision, which rounds the exact decimal value half to even. The same
routine supplies the fixed-precision mode `php_gcvt` previously refused
with an assert, so both modes now share one path.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'docs/dev/regex-porting.md')
0 files changed, 0 insertions, 0 deletions
