Back to index

glibc  2.9
libm_error_codes.h
Go to the documentation of this file.
00001 /* file: libm_error_codes.h */
00002  
00003 
00004 /* 
00005 // Copyright (c) 2000 - 2004, Intel Corporation
00006 // All rights reserved.
00007 //
00008 // Contributed 2000 by the Intel Numerics Group, Intel Corporation
00009 //
00010 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions are
00012 // met:
00013 //
00014 // * Redistributions of source code must retain the above copyright
00015 // notice, this list of conditions and the following disclaimer.
00016 //
00017 // * Redistributions in binary form must reproduce the above copyright
00018 // notice, this list of conditions and the following disclaimer in the
00019 // documentation and/or other materials provided with the distribution.
00020 //
00021 // * The name of Intel Corporation may not be used to endorse or promote
00022 // products derived from this software without specific prior written
00023 // permission.
00024 
00025 //
00026 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00027 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00028 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00029 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00034 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 //
00038 // Intel Corporation is the author of this code, and requests that all
00039 // problem reports or change requests be submitted to it directly at
00040 // http://www.intel.com/software/products/opensource/libraries/num.htm.
00041 //
00042 
00043 // Abstract:
00044 // ========================================================================
00045 // This file contains the interface to the Intel exception dispatcher.
00046 //
00047 //
00048 // History:
00049 // ========================================================================
00050 // 12/15/2004 Initial version - extracted from libm_support.h
00051 //
00052 */
00053 
00054 #if !defined(__LIBM_ERROR_CODES_H__)
00055 #define __LIBM_ERROR_CODES_H__ 
00056 
00057 typedef enum
00058 {
00059   logl_zero=0,   logl_negative,                  /*  0,  1 */
00060   log_zero,      log_negative,                   /*  2,  3 */
00061   logf_zero,     logf_negative,                  /*  4,  5 */
00062   log10l_zero,   log10l_negative,                /*  6,  7 */
00063   log10_zero,    log10_negative,                 /*  8,  9 */
00064   log10f_zero,   log10f_negative,                /* 10, 11 */
00065   expl_overflow, expl_underflow,                 /* 12, 13 */
00066   exp_overflow,  exp_underflow,                  /* 14, 15 */
00067   expf_overflow, expf_underflow,                 /* 16, 17 */
00068   powl_overflow, powl_underflow,                 /* 18, 19 */
00069   powl_zero_to_zero,                             /* 20     */
00070   powl_zero_to_negative,                         /* 21     */
00071   powl_neg_to_non_integer,                       /* 22     */
00072   powl_nan_to_zero,                              /* 23     */
00073   pow_overflow,  pow_underflow,                  /* 24, 25 */
00074   pow_zero_to_zero,                              /* 26     */
00075   pow_zero_to_negative,                          /* 27     */
00076   pow_neg_to_non_integer,                        /* 28     */
00077   pow_nan_to_zero,                               /* 29     */
00078   powf_overflow, powf_underflow,                 /* 30, 31 */
00079   powf_zero_to_zero,                             /* 32     */
00080   powf_zero_to_negative,                         /* 33     */
00081   powf_neg_to_non_integer,                       /* 34     */
00082   powf_nan_to_zero,                              /* 35     */
00083   atan2l_zero,                                   /* 36     */
00084   atan2_zero,                                    /* 37     */
00085   atan2f_zero,                                   /* 38     */
00086   expm1l_overflow,                               /* 39     */
00087   expm1l_underflow,                              /* 40     */
00088   expm1_overflow,                                /* 41     */
00089   expm1_underflow,                               /* 42     */
00090   expm1f_overflow,                               /* 43     */
00091   expm1f_underflow,                              /* 44     */
00092   hypotl_overflow,                               /* 45     */
00093   hypot_overflow,                                /* 46     */
00094   hypotf_overflow,                               /* 47     */
00095   sqrtl_negative,                                /* 48     */
00096   sqrt_negative,                                 /* 49     */
00097   sqrtf_negative,                                /* 50     */
00098   scalbl_overflow, scalbl_underflow,             /* 51, 52  */
00099   scalb_overflow,  scalb_underflow,              /* 53, 54  */
00100   scalbf_overflow, scalbf_underflow,             /* 55, 56  */
00101   acosl_gt_one, acos_gt_one, acosf_gt_one,       /* 57, 58, 59 */
00102   asinl_gt_one, asin_gt_one, asinf_gt_one,       /* 60, 61, 62 */
00103   coshl_overflow, cosh_overflow, coshf_overflow, /* 63, 64, 65 */
00104   y0l_zero, y0l_negative,y0l_gt_loss,            /* 66, 67, 68 */
00105   y0_zero, y0_negative,y0_gt_loss,               /* 69, 70, 71 */
00106   y0f_zero, y0f_negative,y0f_gt_loss,            /* 72, 73, 74 */
00107   y1l_zero, y1l_negative,y1l_gt_loss,            /* 75, 76, 77 */
00108   y1_zero, y1_negative,y1_gt_loss,               /* 78, 79, 80 */
00109   y1f_zero, y1f_negative,y1f_gt_loss,            /* 81, 82, 83 */
00110   ynl_zero, ynl_negative,ynl_gt_loss,            /* 84, 85, 86 */
00111   yn_zero, yn_negative,yn_gt_loss,               /* 87, 88, 89 */
00112   ynf_zero, ynf_negative,ynf_gt_loss,            /* 90, 91, 92 */
00113   j0l_gt_loss,                                   /* 93 */
00114   j0_gt_loss,                                    /* 94 */
00115   j0f_gt_loss,                                   /* 95 */
00116   j1l_gt_loss,                                   /* 96 */
00117   j1_gt_loss,                                    /* 97 */
00118   j1f_gt_loss,                                   /* 98 */
00119   jnl_gt_loss,                                   /* 99 */
00120   jn_gt_loss,                                    /* 100 */
00121   jnf_gt_loss,                                   /* 101 */
00122   lgammal_overflow, lgammal_negative,lgammal_reserve, /* 102, 103, 104 */
00123   lgamma_overflow, lgamma_negative,lgamma_reserve,    /* 105, 106, 107 */
00124   lgammaf_overflow, lgammaf_negative, lgammaf_reserve,/* 108, 109, 110 */
00125   gammal_overflow,gammal_negative, gammal_reserve,    /* 111, 112, 113 */
00126   gamma_overflow, gamma_negative, gamma_reserve,      /* 114, 115, 116 */
00127   gammaf_overflow,gammaf_negative,gammaf_reserve,     /* 117, 118, 119 */
00128   fmodl_by_zero,                                 /* 120 */
00129   fmod_by_zero,                                  /* 121 */
00130   fmodf_by_zero,                                 /* 122 */
00131   remainderl_by_zero,                            /* 123 */
00132   remainder_by_zero,                             /* 124 */
00133   remainderf_by_zero,                            /* 125 */
00134   sinhl_overflow, sinh_overflow, sinhf_overflow, /* 126, 127, 128 */
00135   atanhl_gt_one, atanhl_eq_one,                  /* 129, 130 */
00136   atanh_gt_one, atanh_eq_one,                    /* 131, 132 */
00137   atanhf_gt_one, atanhf_eq_one,                  /* 133, 134 */
00138   acoshl_lt_one,                                 /* 135 */
00139   acosh_lt_one,                                  /* 136 */
00140   acoshf_lt_one,                                 /* 137 */
00141   log1pl_zero,   log1pl_negative,                /* 138, 139 */
00142   log1p_zero,    log1p_negative,                 /* 140, 141 */
00143   log1pf_zero,   log1pf_negative,                /* 142, 143 */
00144   ldexpl_overflow,   ldexpl_underflow,           /* 144, 145 */
00145   ldexp_overflow,    ldexp_underflow,            /* 146, 147 */
00146   ldexpf_overflow,   ldexpf_underflow,           /* 148, 149 */
00147   logbl_zero,   logb_zero, logbf_zero,           /* 150, 151, 152 */
00148   nextafterl_overflow,   nextafter_overflow,
00149   nextafterf_overflow,                           /* 153, 154, 155 */
00150   ilogbl_zero,  ilogb_zero, ilogbf_zero,         /* 156, 157, 158 */
00151   exp2l_overflow, exp2l_underflow,               /* 159, 160 */
00152   exp2_overflow,  exp2_underflow,                /* 161, 162 */
00153   exp2f_overflow, exp2f_underflow,               /* 163, 164 */
00154   exp10l_overflow, exp10_overflow,
00155   exp10f_overflow,                               /* 165, 166, 167 */
00156   log2l_zero,    log2l_negative,                 /* 168, 169 */
00157   log2_zero,     log2_negative,                  /* 170, 171 */
00158   log2f_zero,    log2f_negative,                 /* 172, 173 */
00159   scalbnl_overflow, scalbnl_underflow,           /* 174, 175 */
00160   scalbn_overflow,  scalbn_underflow,            /* 176, 177 */
00161   scalbnf_overflow, scalbnf_underflow,           /* 178, 179 */
00162   remquol_by_zero,                               /* 180 */
00163   remquo_by_zero,                                /* 181 */
00164   remquof_by_zero,                               /* 182 */
00165   lrintl_large, lrint_large, lrintf_large,       /* 183, 184, 185 */
00166   llrintl_large, llrint_large, llrintf_large,    /* 186, 187, 188 */
00167   lroundl_large, lround_large, lroundf_large,    /* 189, 190, 191 */
00168   llroundl_large, llround_large, llroundf_large, /* 192, 193, 194 */
00169   fdiml_overflow, fdim_overflow, fdimf_overflow, /* 195, 196, 197 */
00170   nexttowardl_overflow,   nexttoward_overflow,
00171   nexttowardf_overflow,                          /* 198, 199, 200 */
00172   scalblnl_overflow, scalblnl_underflow,         /* 201, 202 */
00173   scalbln_overflow,  scalbln_underflow,          /* 203, 204 */
00174   scalblnf_overflow, scalblnf_underflow,         /* 205, 206 */
00175   erfcl_underflow, erfc_underflow, erfcf_underflow, /* 207, 208, 209 */
00176   acosdl_gt_one, acosd_gt_one, acosdf_gt_one,    /* 210, 211, 212 */
00177   asindl_gt_one, asind_gt_one, asindf_gt_one,    /* 213, 214, 215 */
00178   atan2dl_zero, atan2d_zero, atan2df_zero,       /* 216, 217, 218 */
00179   tandl_overflow, tand_overflow, tandf_overflow, /* 219, 220, 221 */
00180   cotdl_overflow, cotd_overflow, cotdf_overflow, /* 222, 223, 224 */
00181   cotl_overflow, cot_overflow, cotf_overflow,    /* 225, 226, 227 */
00182   sinhcoshl_overflow, sinhcosh_overflow, sinhcoshf_overflow, /* 228, 229, 230 */
00183   annuityl_by_zero, annuity_by_zero, annuityf_by_zero, /* 231, 232, 233 */
00184   annuityl_less_m1, annuity_less_m1, annuityf_less_m1, /* 234, 235, 236 */
00185   annuityl_overflow, annuity_overflow, annuityf_overflow, /* 237, 238, 239 */
00186   annuityl_underflow, annuity_underflow, annuityf_underflow, /* 240, 241, 242 */
00187   compoundl_by_zero, compound_by_zero, compoundf_by_zero, /* 243, 244, 245 */
00188   compoundl_less_m1, compound_less_m1, compoundf_less_m1, /* 246, 247, 248 */
00189   compoundl_overflow, compound_overflow, compoundf_overflow, /* 249, 250, 251 */
00190   compoundl_underflow, compound_underflow, compoundf_underflow, /* 252, 253, 254 */
00191   tgammal_overflow, tgammal_negative, tgammal_reserve, /* 255, 256, 257 */
00192   tgamma_overflow, tgamma_negative, tgamma_reserve, /* 258, 259, 260 */
00193   tgammaf_overflow, tgammaf_negative, tgammaf_reserve, /* 261, 262, 263 */
00194   exp10l_underflow, exp10_underflow, exp10f_underflow, /* 264, 265, 266 */
00195   nextafterl_underflow, nextafter_underflow, 
00196   nextafterf_underflow,                                /* 267, 268, 269 */
00197   nexttowardl_underflow, nexttoward_underflow, 
00198   nexttowardf_underflow                                /* 270, 271, 272 */
00199 } error_types;
00200 
00201 #define LIBM_ERROR __libm_error_support
00202 
00203 extern void LIBM_ERROR(void*,void*,void*,error_types);
00204 #ifdef _LIBC
00205 libc_hidden_proto(LIBM_ERROR)
00206 #endif
00207 
00208 #define LIBM_ERROR1(x,r,e)  LIBM_ERROR(&(x), (void *)0, &(r), e)
00209 #define LIBM_ERROR2(x,y,r,e)       LIBM_ERROR(&(x), &(y), &(r), e)
00210 
00211 #endif // !defined(__LIBM_ERROR_CODES_H__)