mirror of https://gerrit.osmocom.org/asn1c
60 lines
2.0 KiB
Groff
60 lines
2.0 KiB
Groff
|
|
-- OK: Everything is fine
|
|
|
|
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
|
|
-- .spelio.software.asn1c.test (9363.1.5.1)
|
|
-- .154
|
|
|
|
ModuleREALWithComponents
|
|
{ iso org(3) dod(6) internet(1) private(4) enterprise(1)
|
|
spelio(9363) software(1) asn1c(5) test(1) 154 }
|
|
DEFINITIONS ::= BEGIN
|
|
|
|
UnconstrainedREAL ::= REAL
|
|
|
|
WeirdlyConstrainedREAL ::= REAL (3, ...) -- Not really constrained
|
|
|
|
Indirect-IEEE-binary32 ::= UnconstrainedREAL (WITH COMPONENTS {
|
|
mantissa (-16777215..16777215),
|
|
base (2), exponent (-149..104)})
|
|
|
|
-- X.696 (08/2005) #12.2 and #12.3
|
|
|
|
-- IEEE 754 encoding single precision
|
|
IEEE-binary32-w ::= REAL (WITH COMPONENTS {
|
|
mantissa (-16777215..16777215),
|
|
base (2), exponent (-149..104)})
|
|
|
|
IEEE-binary32-0w ::= REAL (0 | WITH COMPONENTS {
|
|
mantissa (-16777215..16777215),
|
|
base (2), exponent (-149..104)})
|
|
|
|
IEEE-binary32-w0 ::= REAL (WITH COMPONENTS {
|
|
mantissa (-16777215..16777215),
|
|
base (2), exponent (-149..104)} | 0)
|
|
|
|
-- IEEE 754 encoding double precision
|
|
IEEE-binary64-w ::= REAL (WITH COMPONENTS {
|
|
mantissa (-9007199254740991..9007199254740991),
|
|
base (2), exponent (-1074..971)})
|
|
|
|
IEEE-binary64-0w ::= REAL (0 | WITH COMPONENTS {
|
|
mantissa (-9007199254740991..9007199254740991),
|
|
base (2), exponent (-1074..971)})
|
|
|
|
IEEE-binary64-w0 ::= REAL (WITH COMPONENTS {
|
|
mantissa (-9007199254740991..9007199254740991),
|
|
base (2), exponent (-1074..971)} | 0)
|
|
|
|
Test ::= SEQUENCE {
|
|
indirect-ieee-binary32 Indirect-IEEE-binary32,
|
|
ieee-binary32-w IEEE-binary32-w,
|
|
ieee-binary32-0w IEEE-binary32-0w,
|
|
ieee-binary32-w0 IEEE-binary32-w0,
|
|
ieee-binary64-w IEEE-binary64-w,
|
|
ieee-binary64-0w IEEE-binary64-0w,
|
|
ieee-binary64-w0 IEEE-binary64-w0
|
|
}
|
|
|
|
END
|