Return a float representation (possibly approximate) of `int_val**-scale`
(int_val, scale)
| 2172 | |
| 2173 | |
| 2174 | def scaled_float(int_val, scale): |
| 2175 | """ |
| 2176 | Return a float representation (possibly approximate) of `int_val**-scale` |
| 2177 | """ |
| 2178 | assert isinstance(int_val, int) |
| 2179 | unscaled = decimal.Decimal(int_val) |
| 2180 | scaled = unscaled.scaleb(-scale) |
| 2181 | float_val = float(scaled) |
| 2182 | return float_val |
| 2183 | |
| 2184 | |
| 2185 | def integral_float_to_decimal_cast_cases(float_ty, max_precision): |
no test coverage detected