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-- (C Math Library Version, Long Long Float) -- 9-- -- 10-- Copyright (C) 1992-2021, 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 generic 34-- elementary functions. The C library version interfaces with the routines 35-- in the C mathematical library, and is thus quite portable. 36 37with Ada.Numerics.Aux_Linker_Options; 38pragma Warnings (Off, Ada.Numerics.Aux_Linker_Options); 39 40package Ada.Numerics.Aux_Long_Long_Float is 41 pragma Pure; 42 43 subtype T is Long_Long_Float; 44 45 -- We import these functions directly from C. Note that we label them 46 -- all as pure functions, because indeed all of them are in fact pure. 47 48 function Sin (X : T) return T with 49 Import, Convention => Intrinsic, External_Name => "sinl"; 50 51 function Cos (X : T) return T with 52 Import, Convention => Intrinsic, External_Name => "cosl"; 53 54 function Tan (X : T) return T with 55 Import, Convention => Intrinsic, External_Name => "tanl"; 56 57 function Exp (X : T) return T with 58 Import, Convention => Intrinsic, External_Name => "expl"; 59 60 function Sqrt (X : T) return T with 61 Import, Convention => Intrinsic, External_Name => "sqrtl"; 62 63 function Log (X : T) return T with 64 Import, Convention => Intrinsic, External_Name => "logl"; 65 66 function Acos (X : T) return T with 67 Import, Convention => Intrinsic, External_Name => "acosl"; 68 69 function Asin (X : T) return T with 70 Import, Convention => Intrinsic, External_Name => "asinl"; 71 72 function Atan (X : T) return T with 73 Import, Convention => Intrinsic, External_Name => "atanl"; 74 75 function Sinh (X : T) return T with 76 Import, Convention => Intrinsic, External_Name => "sinhl"; 77 78 function Cosh (X : T) return T with 79 Import, Convention => Intrinsic, External_Name => "coshl"; 80 81 function Tanh (X : T) return T with 82 Import, Convention => Intrinsic, External_Name => "tanhl"; 83 84 function Pow (X, Y : T) return T with 85 Import, Convention => Intrinsic, External_Name => "powl"; 86 87end Ada.Numerics.Aux_Long_Long_Float; 88