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.
