Proof by Ivy (Floating Point Formatting, Part 4)
research.swtch.comΒ·2d
🎯Bit Vectors
Preview
Report Post

Fast Unrounded Scaling: Proof by Ivy

Russ Cox January 19, 2026 research.swtch.com/fp-proof

Posted on Monday, January 19, 2026. PDF

My post β€œFloating-Point Printing and Parsing Can Be Simple And Fast” depends on fast unrounded scaling, defined as:

⟨x⟩=⌊2xβŒ‹||(2xβ‰ βŒŠ2xβŒ‹)uscale(x,e,p)=⟨xΒ·2eΒ·10p⟩

The unrounded form of xβˆˆβ„, ⟨x⟩, is the integer value of ⌊xβŒ‹ concatenated with two more bits: first, the β€œΒ½ bit” from the binary representation of x (the bit representing 2βˆ’1; 1 if xβˆ’βŒŠxβŒ‹β‰₯Β½; or equivalently, ⌊2xβŒ‹mod2); and second, a β€œsticky bit” that is 1 if any bits beyond the Β½ bit were 1.

These are all equivalent definitions, using the convention that a boolean condition is 1 for true, 0 for false:

⟨x⟩=…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help