460
you are viewing a single comment's thread
view the rest of the comments
[-] pivot_root@lemmy.world 1 points 1 week ago

you'd end up using modulus and move on quickly.

But where's the fun in that?

There are so many better ~~for obfuscation~~ ways of checking for oddness!

(a & 1) > 0
a.toString()[a.toString().length()-1] - '1' == 0
iseven(a)?(1==0):(1!=0)
this post was submitted on 15 Jul 2025
460 points (94.7% liked)

Programmer Humor

37361 readers
88 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS