this post was submitted on 26 Feb 2024
748 points (95.7% liked)

Programmer Humor

19817 readers
1000 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
[โ€“] [email protected] 2 points 10 months ago* (last edited 10 months ago) (1 children)

I feel like that's adding overhead to every operation to catch the few operations that could result in a nan.

But I guess you could provide alternative safe versions of float operations to account for this. Which may be what you meant thinking about it lol

[โ€“] [email protected] 1 points 10 months ago

I would want the safe version to be the default, but yeah, both should exist. ๐Ÿ™ƒ