2016-10-26 François Dumont <fdumont@gcc.gnu.org>
[official-gcc.git] / gcc / ada / a-numaux-libc-x86.ads
blob3b793c6240ecf14d577232fd01c05e651125ba7f
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
5 -- A D A . N U M E R I C S . A U X --
6 -- --
7 -- S p e c --
8 -- (C Library Version for x86) --
9 -- --
10 -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
11 -- --
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 3, 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. --
18 -- --
19 -- As a special exception under Section 7 of GPL version 3, you are granted --
20 -- additional permissions described in the GCC Runtime Library Exception, --
21 -- version 3.1, as published by the Free Software Foundation. --
22 -- --
23 -- You should have received a copy of the GNU General Public License and --
24 -- a copy of the GCC Runtime Library Exception along with this program; --
25 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
26 -- <http://www.gnu.org/licenses/>. --
27 -- --
28 -- GNAT was originally developed by the GNAT team at New York University. --
29 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 -- --
31 ------------------------------------------------------------------------------
33 -- This version is for the x86 using the 80-bit x86 long double format
35 package Ada.Numerics.Aux is
36 pragma Pure;
38 pragma Linker_Options ("-lm");
40 type Double is digits 18;
42 -- We import these functions directly from C. Note that we label them
43 -- all as pure functions, because indeed all of them are in fact pure.
45 function Sin (X : Double) return Double;
46 pragma Import (C, Sin, "sinl");
47 pragma Pure_Function (Sin);
49 function Cos (X : Double) return Double;
50 pragma Import (C, Cos, "cosl");
51 pragma Pure_Function (Cos);
53 function Tan (X : Double) return Double;
54 pragma Import (C, Tan, "tanl");
55 pragma Pure_Function (Tan);
57 function Exp (X : Double) return Double;
58 pragma Import (C, Exp, "expl");
59 pragma Pure_Function (Exp);
61 function Sqrt (X : Double) return Double;
62 pragma Import (C, Sqrt, "sqrtl");
63 pragma Pure_Function (Sqrt);
65 function Log (X : Double) return Double;
66 pragma Import (C, Log, "logl");
67 pragma Pure_Function (Log);
69 function Acos (X : Double) return Double;
70 pragma Import (C, Acos, "acosl");
71 pragma Pure_Function (Acos);
73 function Asin (X : Double) return Double;
74 pragma Import (C, Asin, "asinl");
75 pragma Pure_Function (Asin);
77 function Atan (X : Double) return Double;
78 pragma Import (C, Atan, "atanl");
79 pragma Pure_Function (Atan);
81 function Sinh (X : Double) return Double;
82 pragma Import (C, Sinh, "sinhl");
83 pragma Pure_Function (Sinh);
85 function Cosh (X : Double) return Double;
86 pragma Import (C, Cosh, "coshl");
87 pragma Pure_Function (Cosh);
89 function Tanh (X : Double) return Double;
90 pragma Import (C, Tanh, "tanhl");
91 pragma Pure_Function (Tanh);
93 function Pow (X, Y : Double) return Double;
94 pragma Import (C, Pow, "powl");
95 pragma Pure_Function (Pow);
97 end Ada.Numerics.Aux;