12345module juptune.asn1.decode.bcd.encoding;
Result asDouble(
double number
);
Converts the raw bytes into native double.
ASN.1's PLUS-INFINITYis equal to +double.infinityin D.
ASN.1's MINUS-INFINITYis equal to -double.infinityin D.
This function uses checked maths in order to catch overflows (but not underflows... yet).
If you're getting the wrong value back, it's a lot more likely that this function is buggy rather than your input being incorrect, feel free to raise an issue since I'm not very good at proving my own maths.
CheckedError.overflowif there was an overflow when decoding the number.
Anything that Asn1Integer.asIntcan throw, as it is used internally to decode parts of the real value.
A Resultdepicting whether an error occured - the error string will contain verbose details.