Parent: [3445a0] (diff)

Child: [28b809] (diff)

Download this file

IEEE.def    48 lines (38 with data), 2.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
DEFINITION MODULE IEEE;
(*========================================================================*)
(* HINWEIS : Bitte nur die Datei IEEE.def.m2pp editieren *)
(*========================================================================*)
(* Es sind 2 Versionen enthalten die mit *)
(* *)
(* m2pp -D __{Parameter}__ < IEEE.mod.m2pp > IEEE.mod *)
(* *)
(* mit Parameter = {LITTLEENDIAN|BIGENDIAN} erzeugt werden koennen. *)
(* *)
(* There are two version contained, one for little and one for big endian *)
(* machines which can be produced by the m2pp command line given above *)
(*------------------------------------------------------------------------*)
(* IEEE positive infinity (NAN) and infinity (INF) constants for *)
(* IEEE 754 machines. *)
(*------------------------------------------------------------------------*)
(* Implementation : Michael Riedl *)
(* Licence : GNU Lesser General Public License (LGPL) *)
(*------------------------------------------------------------------------*)
(* $Id: IEEE.def.m2pp,v 1.1 2018/05/26 16:35:35 mriedl Exp mriedl $ *)
FROM SYSTEM IMPORT CARD8;
TYPE LongReal = RECORD
CASE : BOOLEAN OF
|TRUE : C8 : ARRAY [0..7] OF CARD8;
|FALSE: R8 : LONGREAL;
END;
END;
(* LITTLE ENDIAN *)
(* Not accepted by XDS
*
* CONST INF = {000H,000H,000H,000H,000H,000H,0F0H,07FH };
* NAN = {000H,000H,000H,000H,000H,000H,0F8H,07FH };
*)
CONST inf = LongReal{TRUE,{000H,000H,000H,000H,000H,000H,0F0H,07FH}};
nan = LongReal{TRUE,{000H,000H,000H,000H,000H,000H,0F8H,07FH}};
INF = inf.R8;
NAN = nan.R8;
END IEEE.