bit_truncate_float#
- caput.util.truncate.bit_truncate_float(val: numpy.float32, err: numpy.float32) numpy.float32[source]#
Truncate using a fixed error.
- Parameters:
- val
float32 The value to truncate.
- err
float32 The absolute precision to allow.
- val
- Returns:
- truncated
float32 The truncated value.
- truncated
- Raises:
ValueErrorIf err is a NaN.