Hasty Briefsbeta

双语

More Floating Point Alternatives

2 days ago
  • The text introduces five alternative ways to represent numbers in software, all slower than hardware floating point.
  • First alternative: Decimal floating point uses base 10 and is standardized in IEEE 754, with examples like Python's decimal or Java's BigDecimal.
  • Second alternative: Fractions allow exact rational arithmetic, e.g., Python's fractions module or Lisp's built-in support.
  • Third alternative: Symbolic computation represents exact values like sqrt(2) instead of approximations, used in computer algebra systems.
  • Fourth alternative: Interval arithmetic stores numbers as ranges to precisely track error bars, being the least mainstream.
  • Fifth alternative: Binary-coded decimal was used on 1960s IBM computers and persists in financial formats like ISO 8583.