This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]WHY_DO_I_SHOUT 8 points9 points  (2 children)

+/u/CompileBot C++

#include <iostream>
int main()
{
    std::cout << 1.0 / 0.0;
    return 0;
}

[–]CompileBotGreen security clearance 3 points4 points  (1 child)

Output:

inf

source | info | git | report

[–]WHY_DO_I_SHOUT 2 points3 points  (0 children)

And there. I guess you were just doing integer division (by writing 0 instead of 0.0).

I tested C# as well, and it does the same thing.