Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions Asn1Real.asDouble

1
2
3
4
5

Documentation

Converts the raw bytes into native double.

Notes

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.

Params

Throws

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.

Returns

A Resultdepicting whether an error occured - the error string will contain verbose details.