Skip to content

Commit f7723c7

Browse files
committed
64桁に合わせるように調整
1 parent 600c16a commit f7723c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PHPJava/Utils/BinaryTools.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ public final static function andBits ($value1, $value2, $bytes) {
299299

300300
public final static function convertDoubleToIEEE754 ($doubleValue, $rounded = 8) {
301301

302-
$doubleValue = base_convert($doubleValue, 10, 2);
303-
302+
$doubleValue = sprintf('%063s', base_convert($doubleValue, 10, 2));
303+
304304
$sign = $doubleValue[0];
305305
$exponent = substr($doubleValue, 1, 10);
306306
$fraction = substr($doubleValue, 11);

0 commit comments

Comments
 (0)