Skip to content

Commit 0a8fbef

Browse files
SakiTakamachiderickr
authored andcommitted
Added test
1 parent e5cb9d7 commit 0a8fbef

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ext/standard/tests/array/gh14140.phpt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
GH-14140: Floating point bug in range operation on Apple Silicon hardware
3+
--FILE--
4+
<?php
5+
/*
6+
* This is a problem that occurs not only in Apple silicon, but also in the Arm
7+
* processor environment in general, which uses clang as the compiler.
8+
*/
9+
print_r(range(-0.03, 0.03, 0.01));
10+
?>
11+
--EXPECT--
12+
Array
13+
(
14+
[0] => -0.03
15+
[1] => -0.02
16+
[2] => -0.01
17+
[3] => 0
18+
[4] => 0.01
19+
[5] => 0.02
20+
[6] => 0.03
21+
)

0 commit comments

Comments
 (0)