1
0
mirror of synced 2025-01-18 17:14:13 +01:00

fix: std::pow on macOS not supporting i128

This commit is contained in:
WerWolv 2022-05-29 20:52:22 +02:00
parent 4701b1b67c
commit 6a6b6b94cf

View File

@ -1220,7 +1220,7 @@ namespace hex::plugin::builtin {
const auto exponentBias = (u128(1) << (exponentBitCount - 1)) - 1;
const long double signValue = signBits == 0 ? 1 : -1;
const long double exponentValue = exponentBits == 0 ? 0 : std::pow<long double>(2, i128(exponentBits) - i128(exponentBias));
const long double exponentValue = exponentBits == 0 ? 0 : std::pow<long double>(2, i64(i128(exponentBits) - i128(exponentBias)));
const long double mantissaValue = [mantissaBitPosition] {
long double mantissa = 1.0;
for (i32 bit = 0; bit < mantissaBitCount; bit++) {