aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-04-07 22:43:57 +0900
committernsfisis <nsfisis@gmail.com>2025-04-07 22:43:57 +0900
commit20d59037a9e860ec5c114154e47c91fa48a01771 (patch)
treea8efecc4cfd11820b0b88a30a329a108265f5d9f
parent28b496687c0eb36a035a8686794fa45434957e28 (diff)
downloadphp-waddiwasi-20d59037a9e860ec5c114154e47c91fa48a01771.tar.gz
php-waddiwasi-20d59037a9e860ec5c114154e47c91fa48a01771.tar.zst
php-waddiwasi-20d59037a9e860ec5c114154e47c91fa48a01771.zip
refactor: rename constant
-rw-r--r--src/BitOps/BinaryConversion.php4
-rw-r--r--src/BitOps/FloatTraits.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/BitOps/BinaryConversion.php b/src/BitOps/BinaryConversion.php
index ae4e403..34d4ca6 100644
--- a/src/BitOps/BinaryConversion.php
+++ b/src/BitOps/BinaryConversion.php
@@ -279,7 +279,7 @@ final readonly class BinaryConversion
// Infinity
if ($e >= 128) {
- return FloatTraits::getF32SignBit($sign) | FloatTraits::F32_INFINITY_BITS;
+ return FloatTraits::getF32SignBit($sign) | FloatTraits::F32_INFINITY_BIT_PATTERN;
}
// Mantissa
@@ -303,7 +303,7 @@ final readonly class BinaryConversion
$e += 1;
// Infinity
if ($e >= 128) {
- return FloatTraits::getF32SignBit($sign) | FloatTraits::F32_INFINITY_BITS;
+ return FloatTraits::getF32SignBit($sign) | FloatTraits::F32_INFINITY_BIT_PATTERN;
}
}
diff --git a/src/BitOps/FloatTraits.php b/src/BitOps/FloatTraits.php
index 75eebcb..31dcd26 100644
--- a/src/BitOps/FloatTraits.php
+++ b/src/BitOps/FloatTraits.php
@@ -17,7 +17,7 @@ final readonly class FloatTraits
public const int F32_SIGN_SIGNED = 0b10000000_00000000_00000000_00000000;
public const int F32_EXPONENT_NAN = 0b01111111_10000000_00000000_00000000;
- public const int F32_INFINITY_BITS = 0b01111111_10000000_00000000_00000000;
+ public const int F32_INFINITY_BIT_PATTERN = 0b01111111_10000000_00000000_00000000;
public const int F64_EXPONENT_BITS = 11;
public const int F64_MANTISSA_BITS = 52;