From e7a5051a43f9adcc564745c9c62f471fbdf253fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 28 Mar 2014 06:39:38 +0100 Subject: Correct description of the REAL type REAL is implemented, sort of. But real numbers must be given in a string. --- lib/asn1/doc/src/asn1_ug.xml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/asn1/doc/src/asn1_ug.xml b/lib/asn1/doc/src/asn1_ug.xml index 497ea9bd2b..83de80e906 100644 --- a/lib/asn1/doc/src/asn1_ug.xml +++ b/lib/asn1/doc/src/asn1_ug.xml @@ -562,20 +562,18 @@ T6value3 = white
REAL -

In this version reals are not implemented. When they are, - the following - ASN.1 type is used:

+

The following ASN.1 type is used for real numbers:

 R1 ::= REAL
       
-

Can be assigned a value in Erlang as:

+

It can be assigned a value in Erlang as:

-R1value1 = 2.14,
+R1value1 = "2.14",
 R1value2 = {256,10,-2},
       

In the last line note that the tuple {256,10,-2} is the real number 2.56 in a special notation, which will encode faster than simply - stating the number as 2.56. The arity three tuple is + stating the number as "2.56". The arity three tuple is {Mantissa,Base,Exponent} i.e. Mantissa * Base^Exponent.

-- cgit v1.2.3