Files
ww/test/wcc/data/r952_floatinfo_instances/case.ww
Hojun-Cho f6628b985e test: migrate 24 residual carriers into the fixture corpus
Audit-driven migrate-and-retire wave (one read-only auditor per
carrier batch, verdicts row-checked through the full corpus gate):
every retired carrier's assertions are now owned by declarative
fixtures or an existing owner. 238 new fixtures land (corpus 1,239 ->
1,477; cells 2,954), covering enum/str/slice/tagged array elements,
inferred-length arrays, global slice/str zero-init and literals,
global array/pointer field reads and stores, struct-literal slice
fields, struct returns, float arithmetic, size/int limits, sort and
log-vstream behavior, place-addressed stores, and append places.
Rejection rows STRENGTHEN the old nonzero-exit checks to required
diagnostic fragments; all byte-id claims fold into the blanket
test-data-byteid sweep (now 1,142 compared, 0 pinned-divergent).
Four carriers were fully redundant with existing fixtures/lang tests
(749, 722, 765, and 771's byteid rows) and retire without new rows.
Native carriers 171 -> 147 (residual 135 -> 111).
2026-08-08 01:29:15 +09:00

22 lines
919 B
Plaintext

//ww:run
package main;
import math;
fn rdbias(f: *math.floatinfo) int = { return f.expbias; };
fn rdmant(f: *math.floatinfo) u64 = { return f.mantbits; };
fn rdmask(f: *math.floatinfo) u64 = { return f.mantmask; };
fn rdebits(f: *math.floatinfo) u64 = { return f.expbits; };
fn rdemask(f: *math.floatinfo) u64 = { return f.expmask; };
export fn main() i32 = {
if (rdbias(&math.f64info) != 1023) { return 1; };
if (rdmant(&math.f64info) != 52u64) { return 2; };
if (rdmask(&math.f64info) != 0xFFFFFFFFFFFFFu64) { return 3; };
if (rdbias(&math.f32info) != 127) { return 4; };
if (rdmant(&math.f32info) != 23u64) { return 5; };
if (rdmask(&math.f32info) != 0x7FFFFFu64) { return 6; };
if (rdebits(&math.f64info) != 11u64) { return 7; };
if (rdemask(&math.f64info) != 0x7FFu64) { return 8; };
if (rdebits(&math.f32info) != 8u64) { return 9; };
if (rdemask(&math.f32info) != 0xFFu64) { return 10; };
return 0;
};