diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-07-30 07:32:58 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-07-30 07:32:58 +0900 |
| commit | 7f3246e4582a488327f2a9da01111db1a4a32b91 (patch) | |
| tree | c37f919e41949d1b482aaae4bedbdd2f65b5baef /src/BitOps/FloatTraits.php | |
| parent | 6f18d4c860f16f094e9b3dececeb47be2a94d585 (diff) | |
| download | php-waddiwasi-7f3246e4582a488327f2a9da01111db1a4a32b91.tar.gz php-waddiwasi-7f3246e4582a488327f2a9da01111db1a4a32b91.tar.zst php-waddiwasi-7f3246e4582a488327f2a9da01111db1a4a32b91.zip | |
chore: enable common ruleset of ecs
Diffstat (limited to 'src/BitOps/FloatTraits.php')
| -rw-r--r-- | src/BitOps/FloatTraits.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/BitOps/FloatTraits.php b/src/BitOps/FloatTraits.php index 31dcd26..2d11940 100644 --- a/src/BitOps/FloatTraits.php +++ b/src/BitOps/FloatTraits.php @@ -7,27 +7,37 @@ namespace Nsfisis\Waddiwasi\BitOps; final readonly class FloatTraits { public const int F32_EXPONENT_BITS = 8; + public const int F32_MANTISSA_BITS = 23; public const int F32_SIGN_MASK = 0b10000000_00000000_00000000_00000000; + public const int F32_EXPONENT_MASK = 0b01111111_10000000_00000000_00000000; + public const int F32_MANTISSA_MASK = 0b00000000_01111111_11111111_11111111; public const int F32_SIGN_UNSIGNED = 0; + 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_BIT_PATTERN = 0b01111111_10000000_00000000_00000000; public const int F64_EXPONENT_BITS = 11; + public const int F64_MANTISSA_BITS = 52; public const int F64_SIGN_MASK = PHP_INT_MIN; + public const int F64_EXPONENT_MASK = 0b01111111_11110000_00000000_00000000_00000000_00000000_00000000_00000000; + public const int F64_MANTISSA_MASK = 0b00000000_00001111_11111111_11111111_11111111_11111111_11111111_11111111; public const int F64_SIGN_UNSIGNED = 0; + public const int F64_SIGN_SIGNED = PHP_INT_MIN; + public const int F64_EXPONENT_NAN = 0b01111111_11110000_00000000_00000000_00000000_00000000_00000000_00000000; private function __construct() |
