| 1 |
------------------------------------------------------------------------------ |
| 2 |
-- -- |
| 3 |
-- GNAT RUN-TIME COMPONENTS -- |
| 4 |
-- -- |
| 5 |
-- A D A . N U M E R I C S . A U X . L O N G _ L O N G _ F L O A T -- |
| 6 |
-- -- |
| 7 |
-- S p e c -- |
| 8 |
-- (Instrinsic Version, Long Long Float) -- |
| 9 |
-- -- |
| 10 |
-- Copyright (C) 1992-2025, 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. With the intrinsic version, the |
| 35 |
-- compiler can use its knowledge of the functions to select the most |
| 36 |
-- suitable implementation. It is thus quite portable. These |
| 37 |
-- interfaces are suitable for cases in which Long Long Float and C's |
| 38 |
-- long double share the same representation. |
| 39 |
|
| 40 |
with Ada.Numerics.Aux_Linker_Options; |
| 41 |
pragma Warnings (Off, Ada.Numerics.Aux_Linker_Options); |
| 42 |
|
| 43 |
package Ada.Numerics.Aux_Long_Long_Float is |
| 44 |
pragma Pure; |
| 45 |
|
| 46 |
subtype T is Long_Long_Float; |
| 47 |
|
| 48 |
-- We import these functions as intrinsics. Note that we label them |
| 49 |
-- all as pure functions, because indeed all of them are in fact pure. |
| 50 |
|
| 51 |
function Sin (X : T) return T with |
| 52 |
Import, Convention => Intrinsic, External_Name => "sinl"; |
| 53 |
|
| 54 |
function Cos (X : T) return T with |
| 55 |
Import, Convention => Intrinsic, External_Name => "cosl"; |
| 56 |
|
| 57 |
function Tan (X : T) return T with |
| 58 |
Import, Convention => Intrinsic, External_Name => "tanl"; |
| 59 |
|
| 60 |
function Exp (X : T) return T with |
| 61 |
Import, Convention => Intrinsic, External_Name => "expl"; |
| 62 |
|
| 63 |
function Sqrt (X : T) return T with |
| 64 |
Import, Convention => Intrinsic, External_Name => "sqrtl"; |
| 65 |
|
| 66 |
function Log (X : T) return T with |
| 67 |
Import, Convention => Intrinsic, External_Name => "logl"; |
| 68 |
|
| 69 |
function Acos (X : T) return T with |
| 70 |
Import, Convention => Intrinsic, External_Name => "acosl"; |
| 71 |
|
| 72 |
function Asin (X : T) return T with |
| 73 |
Import, Convention => Intrinsic, External_Name => "asinl"; |
| 74 |
|
| 75 |
function Atan (X : T) return T with |
| 76 |
Import, Convention => Intrinsic, External_Name => "atanl"; |
| 77 |
|
| 78 |
function Sinh (X : T) return T with |
| 79 |
Import, Convention => Intrinsic, External_Name => "sinhl"; |
| 80 |
|
| 81 |
function Cosh (X : T) return T with |
| 82 |
Import, Convention => Intrinsic, External_Name => "coshl"; |
| 83 |
|
| 84 |
function Tanh (X : T) return T with |
| 85 |
Import, Convention => Intrinsic, External_Name => "tanhl"; |
| 86 |
|
| 87 |
function Pow (X, Y : T) return T with |
| 88 |
Import, Convention => Intrinsic, External_Name => "powl"; |
| 89 |
|
| 90 |
end Ada.Numerics.Aux_Long_Long_Float; |