Compare commits

..

2 commits

Author SHA1 Message Date
unplanned
f13ee9a68c math.big: stronger asserts to reduce risks of aliasing 2025-12-04 01:12:59 +01:00
unplanned
c785964cd0 big.Mutable.setString optimization and simplification 2025-12-04 01:12:55 +01:00

View file

@ -17,6 +17,7 @@ const Endian = std.builtin.Endian;
const Signedness = std.builtin.Signedness;
const native_endian = builtin.cpu.arch.endian();
// Comptime-computed constants for supported bases (2 - 36)
// all values are set to 0 for bases 0 - 1, to make it possible to
// access a constant for a given base b using `constants.value[b]`
@ -38,6 +39,7 @@ const constants: Constants = blk: {
break :blk Constants{ .big_bases = bases, .digits_per_limb = digits_per_limb };
};
/// Returns the number of limbs needed to store `scalar`, which must be a
/// primitive integer or float value.
/// Note: A comptime-known upper bound of this value that may be used