Get the latest tech news

Fixed-point arithmetic as a replacement for soft floats


Pigweed Blog #4: Fixed-point arithmetic as a replacement for soft floats# Published on 2024-09-03 by Leonard Chan Fixed-point arithmetic is an alternative to floating-point arithmetic for representing fractional data values (0.5, -1.125, 10.75, etc.). Fixed-point types can be represented as scaled integers.

We’ve observed a~2x speed improvement in classification algorithms and a small decrease in binary size using fixed-point without sacrificing correctness. Platforms that don’t support hard floats normally need to make a call to a library function that implements the floating-point equivalents of these which can be large or CPU-intensive. It’s worth noting that individual fixed-point binary operations are slightly larger since they involve a bunch of shifts or saturation checks.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of replacement

replacement

Photo of point arithmetic

point arithmetic

Photo of soft floats

soft floats

Related news:

News photo

Microsoft Is Discontinuing HoloLens 2, With No Replacement

News photo

Show HN: Oodle – serverless, fully-managed, drop-in replacement for Prometheus

News photo

Intel customer scores Core i9-14900K as a replacement for degraded Core i9-13900K — another received a $599 check for a fully working Core i9-13900K