import mir.bignum.fixed: UInt; auto fp = Fp!128(UInt!128.fromHexString("afbbfae3cd0aff2714a1de7022b0029d")); assert(fp.exponent == 0); assert(fp.coefficient == UInt!128.fromHexString("afbbfae3cd0aff2714a1de7022b0029d")); fp = Fp!128(UInt!128.fromHexString("afbbfae3cd0aff2714a1de7022b0029d"), true); assert(fp.exponent == 0); assert(fp.coefficient == UInt!128.fromHexString("afbbfae3cd0aff2714a1de7022b0029d")); fp = Fp!128(UInt!128.fromHexString("ae3cd0aff2714a1de7022b0029d")); assert(fp.exponent == -20); assert(fp.coefficient == UInt!128.fromHexString("ae3cd0aff2714a1de7022b0029d00000")); fp = Fp!128(UInt!128.fromHexString("e7022b0029d")); assert(fp.exponent == -84); assert(fp.coefficient == UInt!128.fromHexString("e7022b0029d000000000000000000000")); fp = Fp!128(UInt!64.fromHexString("e7022b0029d")); assert(fp.exponent == -84); assert(fp.coefficient == UInt!128.fromHexString("e7022b0029d000000000000000000000")); fp = Fp!128(UInt!64.fromHexString("e7022b0029dd0aff"), true); assert(fp.exponent == -64); assert(fp.coefficient == UInt!128.fromHexString("e7022b0029dd0aff0000000000000000")); fp = Fp!128(UInt!64.fromHexString("e7022b0029d")); assert(fp.exponent == -84); assert(fp.coefficient == UInt!128.fromHexString("e7022b0029d000000000000000000000")); fp = Fp!128(UInt!192.fromHexString("ffffffffffffffffffffffffffffffff1000000000000000")); assert(fp.exponent == 64); assert(fp.coefficient == UInt!128.fromHexString("ffffffffffffffffffffffffffffffff")); fp = Fp!128(UInt!192.fromHexString("ffffffffffffffffffffffffffffffff8000000000000000")); assert(fp.exponent == 65); assert(fp.coefficient == UInt!128.fromHexString("80000000000000000000000000000000")); fp = Fp!128(UInt!192.fromHexString("fffffffffffffffffffffffffffffffe8000000000000000")); assert(fp.exponent == 64); assert(fp.coefficient == UInt!128.fromHexString("fffffffffffffffffffffffffffffffe")); fp = Fp!128(UInt!192.fromHexString("fffffffffffffffffffffffffffffffe8000000000000001")); assert(fp.exponent == 64); assert(fp.coefficient == UInt!128.fromHexString("ffffffffffffffffffffffffffffffff"));