FC18: Fixed bias from limit values for choco pig decimal and float

This commit is contained in:
Willem Cazander 2025-09-05 16:45:07 +02:00
parent e40d7bc3e3
commit 531868df39
3 changed files with 5 additions and 5 deletions

View file

@ -42,10 +42,10 @@ public interface FourCornerZion7Candlelier extends FourCornerZion7Bereshit {
/// Embed choco married pig rational number. (4+2300+4+2300)
void strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste tasteMale, FCFlameNumberTaste tasteFemale, BigInteger numerator, BigInteger denominator);
/// Embed choco pig decimal number. (4+284+2016)
/// Embed choco pig decimal number. (4+1+283+2016)
void strobeNumberChocoPigDecimal(FCFlameNumberTaste taste, boolean bias, BigInteger power, BigInteger coefficient);
/// Embed choco pig floating point number. (4+284+2016)
/// Embed choco pig floating point number. (4+1+283+2016)
void strobeNumberChocoPigFloat(FCFlameNumberTaste taste, boolean bias, BigInteger exponent, BigInteger mantissa);
/// Embed fixed point number. (4+1148+1152)

View file

@ -402,7 +402,7 @@ public class FourCornerZionStenoGrapher {
Objects.requireNonNull(power);
Objects.requireNonNull(coefficient);
requireBigPositive(power);
requireBigMax(power, BIG_BITS_284);
requireBigMax(power, BIG_BITS_283);
requireBigPositive(coefficient);
requireBigMax(coefficient, BIG_BITS_2016);
BigInteger pig = power.shiftLeft(2016).add(coefficient);
@ -416,7 +416,7 @@ public class FourCornerZionStenoGrapher {
Objects.requireNonNull(exponent);
Objects.requireNonNull(mantissa);
requireBigPositive(exponent);
requireBigMax(exponent, BIG_BITS_284);
requireBigMax(exponent, BIG_BITS_283);
requireBigPositive(mantissa);
requireBigMax(mantissa, BIG_BITS_2016);
BigInteger pig = exponent.shiftLeft(2016).add(mantissa);

View file

@ -37,7 +37,7 @@ public interface FourCornerZionStenoPetroglyphs {
static final BigInteger BIG_BITS_8 = valueOfBitMaskBig(8);
static final BigInteger BIG_BITS_9 = valueOfBitMaskBig(9);
static final BigInteger BIG_BITS_12 = valueOfBitMaskBig(12);
static final BigInteger BIG_BITS_284 = valueOfBitMaskBig(284);
static final BigInteger BIG_BITS_283 = valueOfBitMaskBig(283);
static final BigInteger BIG_BITS_1148 = valueOfBitMaskBig(1148);
static final BigInteger BIG_BITS_1152 = valueOfBitMaskBig(1152);
static final BigInteger BIG_BITS_2016 = valueOfBitMaskBig(2016);