xref: /PHP-7.3/Zend/tests/bug42143.phpt (revision b746e698)
1--TEST--
2bug #42143 (The constant NAN is reported as 0 on Windows build)
3--CREDITS--
4Venkat Raman Don
5--FILE--
6<?php
7echo "Testing NAN:\n";
8echo "NAN= ";
9var_dump(NAN);
10var_dump(tan(-1) == 123);
11var_dump(cos(-100) == "PHP String");
12var_dump(deg2rad(-5.6) == null);
13var_dump(sqrt(-0.1) == false);
14var_dump(sqrt(cos(M_PI)) == 0.1);
15var_dump(NAN);
16var_dump(is_nan(sqrt(-1.005)) == false);
17var_dump(is_nan(floor(1)) == true);
18var_dump(log10(-1) == log(-1));
19var_dump(log10(-1) != log10(-1));
20var_dump(is_finite(log10(-1)) == false);
21var_dump(NAN == NAN);
22?>
23--EXPECT--
24Testing NAN:
25NAN= float(NAN)
26bool(false)
27bool(false)
28bool(false)
29bool(false)
30bool(false)
31float(NAN)
32bool(false)
33bool(false)
34bool(false)
35bool(true)
36bool(true)
37bool(false)
38