TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mediant32: An Alternative to FP32 and BF16 for Error-Aware Compute

3 pointsby muragekibichoabout 1 month ago

1 comment

muragekibichoabout 1 month ago
Just sharing some notes I compiled while building Mediant32, an alternative to fixed-point and floating-point for error-aware fraction computations. I was experimenting with continued fractions, the Stern-Brocot tree, and the field of rationals for my programming language. My overarching goal was to find out if I could efficiently represent floats using integer fractions. Along the way, I compiled these notes to share all the algorithms I found for working with powers, inverses, square roots and logarithms (all without converting to floating point) I call it Mediant32 and the number system features: 1. Integer-only inference. (Zero floating point ops) 2. Error aware training and inference. (You can accumulate errors as you go) 3. Built-in quantization for individual matrix elements. (You're working with fractions so you can choose numerators and denominators that align with your goals)