Rational numbers for Java, why not?
A while back I built a science library supporting both physical and abstract dimensions. Almost immediately I discovered working with floating point numbers suck in that space and BigDecimal isn't much better in terms of managing scale wrt margin of error across calculations, Java doesn't make this easy. Rationals are in my view much better suited for science/math in that information cannot be unintentionally lost when using them. So I made a Rational for Java, and in the process _forced_ Java to work better with science and math.
Does the same job
all alternatives →- MOMathcha – Online Mathematics Editor2017 · mathcha.io · ▲358
- IAInsect – a high-precision scientific calculator with physical units2017 · insect.sh · ▲354
- CACalcuLaTeX, a pretty-printing calculator language2021 · mkhan45.github.io · ▲230
- SPSimple pendulum simulation with rational trigonometry2016 · grondilu.github.io · ▲52
Context: I'm looking at Norman Wildberger's rational trigonometry[1], and here I was wondering how useful it is in physics. So I thought about testing it with the famous simple pendulum exercise. It's not obvious we get any FPS gain, but still I find it cool to even be able to get the same result differently. 1. https://en.wikipedia.org/wiki/Rational_trigonometry
- MIMath I'm creating, Space Numbers2024 · github.com · ▲5
Hi HN! I had a math idea whose thread I've been pulling on, and ended up creating this concept of Space Numbers. To read about it, see the pdf at the linked repo: https://github.com/abidsikder/space-numbers I'd appreciate feedback and ideas about the concepts, as well as further mathematical topics to take a look at that might be related, thank you all!!

More life & fun this month
the category →- TL
Life & fun · 10d ago · louisabraham.github.io

Photosynthesis fires two of your iPhone
Life & fun · 28d ago · photosynthesis.camera
SoloUno▲310Take control of hair pulling, nail biting & skin picking
Life & fun · 28d ago · solouno.io

Scroll through all 43,252,003,274,489,856,000 reachable Rubik's Cube permutations.
Life & fun · 26d ago · everycube.alen.is


Hi HN, I built Eigendrum, a web tool that solves the 2D wave equation for arbitrary shapes so you can hear what they sound like as drums. How it works: * Solves -∇²u = λu using finite element analysis (Kφ = λMφ) on a triangle mesh. * Validated to <0.1% error against closed-form solutions for circles (Bessel zeros) and rectangles. * Sound model factors in strike location, Rayleigh damping, and mallet width. * Includes Kac drums I & II to demonstrate identical sound spectra from different geometries. * No frameworks, build steps, or dependencies. Repo and tests:…
Life & fun · 26d ago · baselashraf81.github.io