Skip to content
HN On Hacker News ↗

floating point alternatives

▲ 53 points • 51 comments • by vismit2000 • 3w ago • HN discussion ↗

Pangram verdict · v3.3

We believe that this entire text is human-written.

0 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 1 of 1
SEGMENTS · AI 0 of 1
WORD COUNT 179
PEAK AI % 0% · §1
Analyzed
Sep 22
backend: pangram/v3.3
Segments scanned
1 windows
avg 179 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 179 words · 1 segments analyzed

Human AI-generated
§1 Human · 0%

read the transcript! there are many alternative ways to represent numbers These are all implemented in software (not hardware) so they’re a lot slower, and different languages have different libraries. alternative 1: decimal floating point This is like regular floating point, but in base 10 instead of base 2. It’s also standardized in IEEE 754. Examples: Python’s decimal module or Java’s BigDecimal alternative 2: fractions This lets you do exact calculations with fractions (1/10 + 2/10 = 3/10) Examples: Python’s fractions module in the standard library, Lisps have first-class support alternative 3: symbolic computation For example, sqrt(2) instead of 1.414. You’ll see this in computer algebra systems like Mathematica, Maple, or sympy. alternative 4: interval arithmetic The idea is to store every number as a range so that you can precisely track your error bars. Probably the least mainstream of these alternatives. alternative 5: binary-coded decimal This is how floating point numbers (and integers) were stored on IBM computers in the 60s, and you can still occasionally see it today in old formats like ISO 8583 for financial transactions.