1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Added test

This commit is contained in:
Saki Takamachi
2024-05-18 07:08:39 +09:00
committed by Derick Rethans
parent e5cb9d7df9
commit 0a8fbef996

View File

@@ -0,0 +1,21 @@
--TEST--
GH-14140: Floating point bug in range operation on Apple Silicon hardware
--FILE--
<?php
/*
* This is a problem that occurs not only in Apple silicon, but also in the Arm
* processor environment in general, which uses clang as the compiler.
*/
print_r(range(-0.03, 0.03, 0.01));
?>
--EXPECT--
Array
(
[0] => -0.03
[1] => -0.02
[2] => -0.01
[3] => 0
[4] => 0.01
[5] => 0.02
[6] => 0.03
)