2014-11-18 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / ada / a-numaux-vxworks.ads
blob5fdf778b345777de43ffa2f513f9860d7a178358
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, VxWorks) --
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 -- Version for use on VxWorks (where we have no libm.a library), so the pragma
34 -- Linker_Options ("-lm") is omitted in this version.
36 package Ada.Numerics.Aux is
37 pragma Pure;
39 type Double is digits 15;
40 -- Type Double is the type used to call the C routines
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, "sin");
47 pragma Pure_Function (Sin);
49 function Cos (X : Double) return Double;
50 pragma Import (C, Cos, "cos");
51 pragma Pure_Function (Cos);
53 function Tan (X : Double) return Double;
54 pragma Import (C, Tan, "tan");
55 pragma Pure_Function (Tan);
57 function Exp (X : Double) return Double;
58 pragma Import (C, Exp, "exp");
59 pragma Pure_Function (Exp);
61 function Sqrt (X : Double) return Double;
62 pragma Import (C, Sqrt, "sqrt");
63 pragma Pure_Function (Sqrt);
65 function Log (X : Double) return Double;
66 pragma Import (C, Log, "log");
67 pragma Pure_Function (Log);
69 function Acos (X : Double) return Double;
70 pragma Import (C, Acos, "acos");
71 pragma Pure_Function (Acos);
73 function Asin (X : Double) return Double;
74 pragma Import (C, Asin, "asin");
75 pragma Pure_Function (Asin);
77 function Atan (X : Double) return Double;
78 pragma Import (C, Atan, "atan");
79 pragma Pure_Function (Atan);
81 function Sinh (X : Double) return Double;
82 pragma Import (C, Sinh, "sinh");
83 pragma Pure_Function (Sinh);
85 function Cosh (X : Double) return Double;
86 pragma Import (C, Cosh, "cosh");
87 pragma Pure_Function (Cosh);
89 function Tanh (X : Double) return Double;
90 pragma Import (C, Tanh, "tanh");
91 pragma Pure_Function (Tanh);
93 function Pow (X, Y : Double) return Double;
94 pragma Import (C, Pow, "pow");
95 pragma Pure_Function (Pow);
97 end Ada.Numerics.Aux;