Why are the results of:
double a = 0.0/0.0;
double b = 0/0.0;
= NaN
But the results of for example:
double e = 0.1/0.0;
double e = 12.0/0.0;
double f = 1.0/0.0;
= Infinity
I understand that double
or float
divisions are somehow a little bit different. I am pretty happy with the resulting NaN because the result is not defined when something is divided by zero. But why they defined that the result of something greater than zero divided by zero is Infitity? Has this something todo with the method they use to perform the division of floating points?