Skip to content

Commit 65334e1

Browse files
changed float32 range based on neo4j docs
1 parent ef1cf2c commit 65334e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/protocol/v6/structures/Vector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static function encode(array $data): self
7373
$packFormat = 'q';
7474
}
7575
} elseif ($allFloats) {
76-
if ($minValue >= 1.18e-38 && $maxValue <= 3.40e+38) { // Single precision float (FLOAT_32)
76+
if ($minValue >= 1.4e-45 && $maxValue <= 3.4028235e+38) { // Single precision float (FLOAT_32)
7777
$marker = 0xC6;
7878
$packFormat = 'G';
7979
} else { // Double precision float (FLOAT_64)

0 commit comments

Comments
 (0)