A bin16/bin32 holds what its width holds: a value is rounded to it where it lands (DECISIONS 2026-09-14).
bin_widths.zg
# A bin16/bin32 holds what its width holds: a value is rounded to it where it lands# (DECISIONS 2026-09-14). `print` shows what is stored, `print.useful` the shortest text that# gives the value back at its own width.MAIN{let'f':bin32=0.1;let'h':bin16=0.1;let'd':bin64=0.1;std::print.stored['f',newln];# 0.100000001490116119384765625std::print.stored['h',newln];# 0.0999755859375std::print.stored['d',newln];std::print.useful['f'," ",'h'," ",'d',newln];# all three: 0.1let'big':bin16=65519.0;# rounds down to bin16's largest, 65504let'g':=to.bin32["0.1"]otherwise0.0;# a conversion lands at bin32 toostd::print.stored['big'," ",'g',newln];# bin32 math rounds after every step, as the hardware does (owner, 2026-09-24: a):# 16777216 plus 1 rounds back to 16777216 at bin32, while bin64 holds 16777218let'x':bin32=16777216.0;let'y':bin32='x'plus1.0plus1.0;let'x64':bin64=16777216.0;let'y64':bin64='x64'plus1.0plus1.0;std::print.useful['y'," ",'y64',newln];# a literal is rounded once, from its digits, straight to its width (never to 64 bits first)let'top':bin32=340282356779733661637539395458142568447.0;# just under the limit: bin32's largestlet'near':bin32=1.00000005960464477539062500001;# just past a halfway point: rounds upstd::print.stored['top'," ",'near',newln];# text is rounded once from its digits toolet't16':=to.bin16["65519.99999999999999999"]otherwise-1.0;# just under the limit: 65504let't32':=to.bin32["1.00000005960464477539062500001"]otherwise-1.0;let'tiny':=to.bin16["2.98023223876953126e-8"]otherwise-1.0;# just past half the smallest stepstd::print.stored['t16'," ",'t32'," ",'tiny',newln];}