this post was submitted on 17 Jan 2024
679 points (98.8% liked)

Programmer Humor

19331 readers
20 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] kromem@lemmy.world 38 points 9 months ago (1 children)

Inefficient solution.

You should simplify it to just ask the model if the last bit of the binary representation of the integer is a 1 or a 0.

[–] Natanael@slrpnk.net 6 points 9 months ago (2 children)

They don't process inputs as binary (they use clusters of symbols, i.e. letter groups) so that's not guaranteed to work

[–] AeonFelis@lemmy.world 3 points 9 months ago

You can ask it if the last digit is odd or even, then.

[–] kromem@lemmy.world 0 points 9 months ago (1 children)
[–] Natanael@slrpnk.net 5 points 9 months ago (1 children)

I did realize that too was a joke, still wanted to point that out

[–] kromem@lemmy.world 0 points 9 months ago

Well, in the sake of pointing things out, GPT-4 can actually correctly answer the prompt, because it arrives at it in the opposite direction. It can tell the integer is even or odd and knows that even or odd integers in binary end in 0 or 1 respectively.