|
|
1 //! @file a68g-lib.h 2 //! @author J. Marcel van der Veer 3 4 //! @section Copyright 5 //! 6 //! This file is part of Algol68G - an Algol 68 compiler-interpreter. 7 //! Copyright 2001-2026 J. Marcel van der Veer [algol68g@algol68genie.nl]. 8 9 //! @section License 10 //! 11 //! This program is free software; you can redistribute it and/or modify it 12 //! under the terms of the GNU General Public License as published by the 13 //! Free Software Foundation; either version 3 of the License, or 14 //! (at your option) any later version. 15 //! 16 //! This program is distributed in the hope that it will be useful, but 17 //! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 18 //! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 19 //! more details. You should have received a copy of the GNU General Public 20 //! License along with this program. If not, see [http://www.gnu.org/licenses/]. 21 22 //! @section Synopsis 23 //! 24 //! Internal math routines. 25 26 #if !defined (__A68G_LIB_H__) 27 #define __A68G_LIB_H__ 28 29 #define A68G_INVALID(c)\ 30 if (c) {\ 31 errno = EDOM;\ 32 return 0;\ 33 } 34 35 #define A68G_OVERFLOW(c)\ 36 if (c) {\ 37 errno = ERANGE;\ 38 return 0;\ 39 } 40 41 #define A68G_MAX_FAC 170 42 43 INT_T a68g_add_int (INT_T, INT_T); 44 INT_T a68g_mod_int (INT_T, INT_T); 45 INT_T a68g_mul_int (INT_T, INT_T); 46 INT_T a68g_m_up_n (INT_T, INT_T); 47 INT_T a68g_over_int (INT_T, INT_T); 48 INT_T a68g_round (REAL_T); 49 INT_T a68g_sub_int (INT_T, INT_T); 50 REAL_T a68g_abs_real (REAL_T); 51 REAL_T a68g_acosdg_real (REAL_T); 52 REAL_T a68g_acosh_real (REAL_T); 53 REAL_T a68g_acotdg_real (REAL_T); 54 REAL_T a68g_acot_real (REAL_T); 55 REAL_T a68g_acsc_real (REAL_T); 56 REAL_T a68g_acscdg_real (REAL_T); 57 REAL_T a68g_asec_real (REAL_T); 58 REAL_T a68g_asecdg_real (REAL_T); 59 REAL_T a68g_asindg_real (REAL_T); 60 REAL_T a68g_asinh_real (REAL_T); 61 REAL_T a68g_atan2_real (REAL_T, REAL_T); 62 REAL_T a68g_atandg_real (REAL_T); 63 REAL_T a68g_atanh_real (REAL_T); 64 REAL_T a68g_beta_real (REAL_T, REAL_T); 65 REAL_T a68g_choose_real (INT_T, INT_T); 66 REAL_T a68g_cas_real (REAL_T); 67 REAL_T a68g_cosdg_real (REAL_T); 68 REAL_T a68g_cospi_real (REAL_T); 69 REAL_T a68g_cot_realdg_real (REAL_T); 70 REAL_T a68g_cot_realpi (REAL_T); 71 REAL_T a68g_cot_real (REAL_T); 72 REAL_T a68g_csc_real (REAL_T); 73 REAL_T a68g_cscdg_real (REAL_T); 74 REAL_T a68g_sec_real (REAL_T); 75 REAL_T a68g_secdg_real (REAL_T); 76 REAL_T a68g_div_int (INT_T, INT_T); 77 REAL_T a68g_exp_real (REAL_T); 78 REAL_T a68g_fact_real (INT_T); 79 REAL_T a68g_fdiv_real (REAL_T, REAL_T); 80 REAL_T a68g_hypot_real (REAL_T, REAL_T); 81 REAL_T a68g_int_real (REAL_T); 82 REAL_T a68g_inverfc_real (REAL_T); 83 REAL_T a68g_inverf_real (REAL_T); 84 REAL_T a68g_ln1p_real (REAL_T); 85 REAL_T a68g_ln1p_real (REAL_T); 86 REAL_T a68g_ln_beta_real (REAL_T, REAL_T); 87 REAL_T a68g_ln_choose_real (INT_T, INT_T); 88 REAL_T a68g_ln_fact_real (INT_T); 89 REAL_T a68g_ln_real (REAL_T); 90 REAL_T a68g_mininf_real (void); 91 REAL_T a68g_max_real (REAL_T, REAL_T); 92 REAL_T a68g_min_real (REAL_T, REAL_T); 93 REAL_T a68g_nan_real (void); 94 REAL_T a68g_posinf_real (void); 95 REAL_T a68g_psi_real (REAL_T); 96 REAL_T a68g_sign_real (REAL_T); 97 REAL_T a68g_sindg_real (REAL_T); 98 REAL_T a68g_sinpi_real (REAL_T); 99 REAL_T a68g_tandg_real (REAL_T); 100 REAL_T a68g_tanpi_real (REAL_T); 101 REAL_T a68g_x_up_n_real (REAL_T, INT_T); 102 REAL_T a68g_x_up_y (REAL_T, REAL_T); 103 REAL_T a68g_beta_inc_real (REAL_T, REAL_T, REAL_T); 104 DOUBLE_T a68g_beta_inc_double (DOUBLE_T, DOUBLE_T, DOUBLE_T); 105 DOUBLE_T a68g_cot_double (DOUBLE_T); 106 DOUBLE_T a68g_csc_double (DOUBLE_T); 107 DOUBLE_T a68g_cscdg_double (DOUBLE_T); 108 DOUBLE_T a68g_sec_double (DOUBLE_T); 109 DOUBLE_T a68g_secdg_double (DOUBLE_T); 110 DOUBLE_T a68g_acot_double (DOUBLE_T); 111 DOUBLE_T a68g_acsc_double (DOUBLE_T); 112 DOUBLE_T a68g_acscdg_double (DOUBLE_T); 113 DOUBLE_T a68g_asec_double (DOUBLE_T); 114 DOUBLE_T a68g_asecdg_double (DOUBLE_T); 115 DOUBLE_T a68g_sindg_double (DOUBLE_T); 116 DOUBLE_T a68g_cas_double (DOUBLE_T); 117 DOUBLE_T a68g_cosdg_double (DOUBLE_T); 118 DOUBLE_T a68g_tandg_double (DOUBLE_T); 119 DOUBLE_T a68g_asindg_double (DOUBLE_T); 120 DOUBLE_T a68g_acosdg_double (DOUBLE_T); 121 DOUBLE_T a68g_atandg_double (DOUBLE_T); 122 DOUBLE_T a68g_cotdg_double (DOUBLE_T); 123 DOUBLE_T a68g_acotdg_double (DOUBLE_T); 124 DOUBLE_T a68g_sinpi_double (DOUBLE_T); 125 DOUBLE_T a68g_cospi_double (DOUBLE_T); 126 DOUBLE_T a68g_tanpi_double (DOUBLE_T); 127 DOUBLE_T a68g_cotpi_double (DOUBLE_T); 128 129 #endif
© 2001-2026 J.M. van der Veer
jmvdveer@algol68genie.nl