We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf9d323 commit 9adbff9Copy full SHA for 9adbff9
src/Type/Constant/ConstantFloatType.php
@@ -49,6 +49,10 @@ private function castFloatToString(float $value): string
49
$precisionBackup = ini_get('precision');
50
ini_set('precision', '-1');
51
try {
52
+ if (is_nan($value)) {
53
+ return 'NAN';
54
+ }
55
+
56
$valueStr = (string) $value;
57
if (is_finite($value) && !str_contains($valueStr, '.')) {
58
$valueStr .= '.0';
0 commit comments