Hacker News new | ask | show | jobs
by Dylan16807 738 days ago
> Should the int be converted to a double before the operation, should the double be converted to int before the operation, or should the result be converted to an int or a double?

Isn't it pretty evident that implicit conversions should only go from integer to floating point?

> precision loss by implicit conversion

That's a reasonable worry, but "Int" in general is only safe to store 32 bits, and 32 bit integers will losslessly convert to doubles.