752
you are viewing a single comment's thread
view the rest of the comments
[-] Grandwolf319@sh.itjust.works 16 points 2 days ago* (last edited 2 days ago)

Cause fractions can be figured out in context. You can store the numerators and have the denominator as a constant in the code.

[-] frezik@lemmy.blahaj.zone 11 points 2 days ago

You can also have a type which does it. Raku has a Rational type for this.

[-] Kacarott@aussie.zone 3 points 2 days ago

Python has the Fraction type, and there are many more

[-] dontsayaword@piefed.social 4 points 2 days ago

Part of my first programming courses in the 90s in C were creating a native fraction type.

this post was submitted on 09 Oct 2025
752 points (99.3% liked)

Programmer Humor

26827 readers
2270 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS