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

Programmer Humor

26817 readers
3871 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] Grandwolf319@sh.itjust.works 16 points 1 day ago* (last edited 1 day ago) (3 children)

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 1 day ago (2 children)

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

[–] dontsayaword@piefed.social 4 points 1 day ago

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

load more comments (1 replies)
load more comments (1 replies)