Issue #2812: std::bigint: BigInt::parse reads back the decimal text to_text writes

Open and answer this issue on GitHub.

ready, solver · opened 2026-11-23 · updated 2026-11-23 · 0 comments

Filed by the driver from the Found: of the run of issue-2749 (#2749); decided by the solver supervisor on 2026-11-23 as an obvious extension. It is the inverse of to_text(), read the way text::parse_i64 reads, with null for no number as ADR-293 D1 says.

Decision

Part I 2.2 (docs/specification/10-nikaia-light.md, the BigInt paragraph, commit 93705904a) now says:

BigInt::parse(text) -> BigInt? reads that text back: the digits as text::parse_i64 reads them, with no limit on their number, and null where they write no number.

That means one optional leading - or +, then at least one ASCII digit and nothing else. Anything else gives null: an empty text, a sign alone, a space, any other character.

Found

On develop c7a59cf67, use std::bigint / fn main() throws { let b: bigint::BigInt = bigint::BigInt::parse("123456789012345678901234567890") ?? bigint::BigInt::of(0); println(b.to_text()) } gives error[NK1245]: The compiler can't tell what type bigint::BigInt::parse("123456789012345678901234567890") is. and exits 1. The cause is certain: crates/nikaia-std/src/bigint.nika has no parse (its makers are of and from_wide, at lines 258-263).

To build

Done when

The probe above prints 123456789012345678901234567890 and exits 0, and the new test is green. #2749 (BigInt Farkas multipliers in the certificate) waits for this.

Back to Open Issues