Convert this value to floating-point. This always succeeds, although some loss of precision may occur if M.sizeof <= N.sizeof.
1 import checkedint.throws : SafeInt; // use IntFlagPolicy.throws 2 3 SafeInt!int n = 92; 4 auto f = cast(double)n; 5 static assert(is(typeof(f) == double)); 6 assert(f == 92.0);
See Implementation
Convert this value to floating-point. This always succeeds, although some loss of precision may occur if M.sizeof <= N.sizeof.