So, what is your standard "division by 0" solution?

I usually check before any division if the number equals 0,

if (number == 0) {
number = 1;
}

That's what I do.

What do you do? Throw exception?

Attached: Yu_gi_oh__Zero_Division_by_Pendragon9.jpg (333x493, 18K)

Other urls found in this thread:

libdivide.com/
gist.github.com/edwinb/0047a2aff46a0f49c881
github.com/ridiculousfish/libdivide/blob/master/libdivide.h#L134
gnu.org/software/libc/manual/html_node/Program-Error-Signals.html
rohitab.com/structured-exception-handling-in-assembly-language
twitter.com/SFWRedditVideos

Fuck off

of course i throw an exception giving out a wrong answer is absolutely retarded

>Having operations that naturally lend themselves for errors
>Allowing the exact single case of problematic input that fucks shit up
>Not throwing an exception on the exceptional case these operations somehow get to happen anyway despite your safeguards
>Instead, you fucking change variables under the hood unknown to everyone not looking the code
Your kind of pajeet solutions usually result in planes crashing

This is bait

just don't use division, problem solved

Add some epsilon just to be sure

Attached: USB.jpg (750x300, 111K)

Recursive substraction of integers?

That's even more retarded

use l’hopital’s rule

libdivide.com/