1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- S Y S T E M . V A X _ F L O A T _ O P E R A T I O N S --
10 -- Copyright (C) 1997-2001 Free Software Foundation, Inc. --
12 -- GNAT is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 2, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
18 -- for more details. You should have received a copy of the GNU General --
19 -- Public License distributed with GNAT; see file COPYING. If not, write --
20 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
21 -- MA 02111-1307, USA. --
23 -- As a special exception, if other files instantiate generics from this --
24 -- unit, or you link this unit with other files to produce an executable, --
25 -- this unit does not by itself cause the resulting executable to be --
26 -- covered by the GNU General Public License. This exception does not --
27 -- however invalidate any other reasons why the executable file might be --
28 -- covered by the GNU Public License. --
30 -- GNAT was originally developed by the GNAT team at New York University. --
31 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
33 ------------------------------------------------------------------------------
35 -- This is a dummy body for use on non-Alpha systems so that the library
36 -- can compile. This dummy version uses ordinary conversions and other
37 -- arithmetic operations. it is used only for testing purposes in the
38 -- case where the -gnatdm switch is used to force testing of VMS features
39 -- on non-VMS systems.
41 with System.IO; use System.IO;
43 package body System.Vax_Float_Operations is
49 function Abs_F (X : F) return F is
58 function Abs_G (X : G) return G is
67 function Add_F (X, Y : F) return F is
76 function Add_G (X, Y : G) return G is
85 function D_To_G (X : D) return G is
94 procedure Debug_Output_D (Arg : D) is
103 procedure Debug_Output_F (Arg : F) is
112 procedure Debug_Output_G (Arg : G) is
121 Debug_String_Buffer : String (1 .. 32);
122 -- Buffer used by all Debug_String_x routines for returning result
124 function Debug_String_D (Arg : D) return System.Address is
125 Image_String : constant String := D'Image (Arg) & ASCII.NUL;
126 Image_Size : constant Integer := Image_String'Length;
129 Debug_String_Buffer (1 .. Image_Size) := Image_String;
130 return Debug_String_Buffer (1)'Address;
137 function Debug_String_F (Arg : F) return System.Address is
138 Image_String : constant String := F'Image (Arg) & ASCII.NUL;
139 Image_Size : constant Integer := Image_String'Length;
142 Debug_String_Buffer (1 .. Image_Size) := Image_String;
143 return Debug_String_Buffer (1)'Address;
150 function Debug_String_G (Arg : G) return System.Address is
151 Image_String : constant String := G'Image (Arg) & ASCII.NUL;
152 Image_Size : constant Integer := Image_String'Length;
155 Debug_String_Buffer (1 .. Image_Size) := Image_String;
156 return Debug_String_Buffer (1)'Address;
163 function Div_F (X, Y : F) return F is
172 function Div_G (X, Y : G) return G is
181 function Eq_F (X, Y : F) return Boolean is
190 function Eq_G (X, Y : G) return Boolean is
199 function F_To_G (X : F) return G is
208 function F_To_Q (X : F) return Q is
217 function F_To_S (X : F) return S is
226 function G_To_D (X : G) return D is
235 function G_To_F (X : G) return F is
244 function G_To_Q (X : G) return Q is
253 function G_To_T (X : G) return T is
262 function Le_F (X, Y : F) return Boolean is
271 function Le_G (X, Y : G) return Boolean is
280 function Lt_F (X, Y : F) return Boolean is
289 function Lt_G (X, Y : G) return Boolean is
298 function Mul_F (X, Y : F) return F is
307 function Mul_G (X, Y : G) return G is
316 function Neg_F (X : F) return F is
325 function Neg_G (X : G) return G is
334 procedure pd (Arg : D) is
336 Put_Line (D'Image (Arg));
343 procedure pf (Arg : F) is
345 Put_Line (F'Image (Arg));
352 procedure pg (Arg : G) is
354 Put_Line (G'Image (Arg));
361 function Q_To_F (X : Q) return F is
370 function Q_To_G (X : Q) return G is
379 function S_To_F (X : S) return F is
388 function Sub_F (X, Y : F) return F is
397 function Sub_G (X, Y : G) return G is
406 function T_To_D (X : T) return D is
408 return G_To_D (T_To_G (X));
415 function T_To_G (X : T) return G is
420 end System.Vax_Float_Operations;