A numbers float file adapts decimal literals to a fixed operand or slot, and refuses to promote a computed int to a float implicitly: there it is almost always float bits. Explicit float(x) is always allowed. render3d's numbers are float, converted by tools/migrate/floatbits.py - a whole-program inference of which ints carried IEEE bits (union-find over flows, calls, returns, buffers, nested buffers and lexical scopes) and a rewriter to operators, Math.* and float literals, with float_bits / float_from_bits left only where bits really cross (runtime scratch buffers, mixed buffers). Seed regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
905 B
905 B
bump: minor
type: feat
A numbers float file is strict about where its numbers come from. Two rules, both found
converting a renderer and a game from float bits in an int to real floats:
- A decimal literal takes the kind of what it meets.
factor == 0.0against afixedparameter,half(3.0)into afixedone andvar z: fixed = -1.5arefixedliterals there, rather than afixedand afloatthat do not mix. - A computed integer never becomes a float implicitly.
count < limitwith aninton one side and afloaton the other is an error that asks forfloat(x): in a file whose numbers are floats, anintmeeting one is almost always raw bits, and promoting it compares the bits as a number. It caught a uniform fed an integer as float bits, and a test comparing a tint's bits with its value. Integer constants still promote, andfloat(x)is always allowed.