4 ms·
Because int -> float is well defined. If you cast an int to a float, you’re getting a value that represents the first six significant figures of the original in
by adastra22 1y ago
Because int -> float is well defined. If you cast an int to a float, you’re getting a value that represents the first six significant figures of the original integer. Always.
The precision of casting float to int, on the other hand, depends on the input.