1------------------------------------------------------------------------------
2--                                                                          --
3--                         GNAT RUN-TIME COMPONENTS                         --
4--                                                                          --
5--         A D A . N U M E R I C S . A U X _ S H O R T _ F L O A T          --
6--                                                                          --
7--                                 S p e c                                  --
8--                  (Short Float Wrapper in terms of Float)                 --
9--                                                                          --
10--          Copyright (C) 1992-2020, 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------------------------------------------------------------------------------
32
33--  This package provides the basic computational interface for the
34--  generic elementary functions. The functions in this unit are
35--  wrappers for those in the Float package.
36
37with Ada.Numerics.Aux_Float;
38
39package Ada.Numerics.Aux_Short_Float is
40   pragma Pure;
41
42   subtype T is Short_Float;
43   package Aux renames Ada.Numerics.Aux_Float;
44   subtype W is Aux.T;
45
46   --  Use the Aux implementation.
47
48   function Sin (X : T) return T
49   is (T (Aux.Sin (W (X))));
50
51   function Cos (X : T) return T
52   is (T (Aux.Cos (W (X))));
53
54   function Tan (X : T) return T
55   is (T (Aux.Tan (W (X))));
56
57   function Exp (X : T) return T
58   is (T (Aux.Exp (W (X))));
59
60   function Sqrt (X : T) return T
61   is (T (Aux.Sqrt (W (X))));
62
63   function Log (X : T) return T
64   is (T (Aux.Log (W (X))));
65
66   function Acos (X : T) return T
67   is (T (Aux.Acos (W (X))));
68
69   function Asin (X : T) return T
70   is (T (Aux.Asin (W (X))));
71
72   function Atan (X : T) return T
73   is (T (Aux.Atan (W (X))));
74
75   function Sinh (X : T) return T
76   is (T (Aux.Sinh (W (X))));
77
78   function Cosh (X : T) return T
79   is (T (Aux.Cosh (W (X))));
80
81   function Tanh (X : T) return T
82   is (T (Aux.Tanh (W (X))));
83
84   function Pow (X, Y : T) return T
85   is (T (Aux.Pow (W (X), W (Y))));
86
87end Ada.Numerics.Aux_Short_Float;
88