Hacker News new | ask | show | jobs
by Brananarchy 895 days ago
https://docs.rs/typenum/latest/typenum defines a "reasonable" implementation of integer arithmetic including addition, subtraction, multiplication, and division (and abs, and remainder, and a bunch of other "standard" integer ops).

I think that building rationals on top of it would be pretty easy, though not necessarily performant.