⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libm_error.c

📁 glibc 2.9,最新版的C语言库函数
💻 C
📖 第 1 页 / 共 5 页
字号:
    case sinhcoshf_overflow:    case annuityl_overflow:    case annuity_overflow:    case annuityf_overflow:    case compoundl_overflow:    case compound_overflow:    case compoundf_overflow:    case tgammal_overflow:    case tgamma_overflow:    case tgammaf_overflow:    {         ERRNO_RANGE; break;    }    case powl_underflow:    case expl_underflow:    case exp10l_underflow:    case exp2l_underflow:    case scalbl_underflow:    case scalbnl_underflow:    case scalblnl_underflow:    case ldexpl_underflow:    case erfcl_underflow:    case annuityl_underflow:    case compoundl_underflow:    {       /* Test for zero by testing 64 significand bits for zero. An integer          test is needed so denormal flag is not set by a floating-point test */       if ( INPUT_RESI64 == 0 ) ERRNO_RANGE;       break;    }    case pow_underflow:    case exp_underflow:    case exp10_underflow:    case exp2_underflow:    case scalb_underflow:    case scalbn_underflow:    case scalbln_underflow:    case ldexp_underflow:    case erfc_underflow:    case annuity_underflow:    case compound_underflow:    {       /* Test for zero by testing exp and significand bits for zero. An integer          test is needed so denormal flag is not set by a floating-point test */       if ( (INPUT_RESI64 << 1) == 0 ) ERRNO_RANGE;       break;    }    case powf_underflow:    case expf_underflow:    case exp10f_underflow:    case exp2f_underflow:    case scalbf_underflow:    case scalbnf_underflow:    case scalblnf_underflow:    case ldexpf_underflow:    case erfcf_underflow:    case annuityf_underflow:    case compoundf_underflow:    {       /* Test for zero by testing exp and significand bits for zero. An integer          test is needed so denormal flag is not set by a floating-point test */       if ( (INPUT_RESI64 << 33) == 0 ) ERRNO_RANGE;       break;    }    case logl_negative:    case log_negative:    case logf_negative:    case log10l_negative:    case log10_negative:    case log10f_negative:    case log2l_negative:    case log2_negative:    case log2f_negative:    case log1pl_negative:    case log1p_negative:    case log1pf_negative:    case sqrtl_negative:    case sqrt_negative:    case sqrtf_negative:    case atan2l_zero:    case atan2_zero:    case atan2f_zero:    case powl_zero_to_negative:    case powl_neg_to_non_integer:    case pow_zero_to_negative:    case pow_neg_to_non_integer:    case powf_zero_to_negative:    case powf_neg_to_non_integer:    case fmodl_by_zero:    case fmod_by_zero:    case fmodf_by_zero:    case atanhl_gt_one:    case atanh_gt_one:    case atanhf_gt_one:    case acosl_gt_one:    case acos_gt_one:    case acosf_gt_one:    case asinl_gt_one:    case asin_gt_one:    case asinf_gt_one:    case logbl_zero:    case logb_zero:    case logbf_zero:    case acoshl_lt_one:    case acosh_lt_one:    case acoshf_lt_one:    case y0l_zero:    case y0_zero:    case y0f_zero:    case y1l_zero:    case y1_zero:    case y1f_zero:    case ynl_zero:    case yn_zero:    case ynf_zero:    case y0l_negative:    case y0_negative:    case y0f_negative:    case y1l_negative:    case y1_negative:    case y1f_negative:    case ynl_negative:    case yn_negative:    case ynf_negative:    case acosdl_gt_one:    case acosd_gt_one:    case acosdf_gt_one:    case asindl_gt_one:    case asind_gt_one:    case asindf_gt_one:    case atan2dl_zero:    case atan2d_zero:    case atan2df_zero:    case annuityl_by_zero:    case annuity_by_zero:    case annuityf_by_zero:    case annuityl_less_m1:    case annuity_less_m1:    case annuityf_less_m1:    case compoundl_by_zero:    case compound_by_zero:    case compoundf_by_zero:    case compoundl_less_m1:    case compound_less_m1:    case compoundf_less_m1:    case tgammal_negative:    case tgamma_negative:    case tgammaf_negative:    {         ERRNO_DOMAIN; break;    }    default:      break;   }   return;}/***********************//* _POSIX_ Path        *//***********************/else if(_LIB_VERSIONIMF==_POSIX_){switch(input_tag)  {  case gammal_overflow:  case lgammal_overflow:  case tgammal_overflow:  {       RETVAL_HUGE_VALL; ERRNO_RANGE; break;  }  case gamma_overflow:  case lgamma_overflow:  case tgamma_overflow:  {       RETVAL_HUGE_VALD; ERRNO_RANGE; break;  }  case gammaf_overflow:  case lgammaf_overflow:  case tgammaf_overflow:  {       RETVAL_HUGE_VALF; ERRNO_RANGE; break;  }  case gammal_negative:  case gamma_negative:  case gammaf_negative:  case lgammal_negative:  case lgamma_negative:  case lgammaf_negative:  case tgammal_negative:  case tgamma_negative:  case tgammaf_negative:  {       ERRNO_DOMAIN; break;  }  case ldexpl_overflow:  case ldexpl_underflow:  case ldexp_overflow:  case ldexp_underflow:  case ldexpf_overflow:  case ldexpf_underflow:  case scalbnl_overflow:  case scalbnl_underflow:  case scalbn_overflow:  case scalbn_underflow:  case scalbnf_overflow:  case scalbnf_underflow:  case scalblnl_overflow:  case scalblnl_underflow:  case scalbln_overflow:  case scalbln_underflow:  case scalblnf_overflow:  case scalblnf_underflow:  case tandl_overflow:  case tand_overflow:  case tandf_overflow:  case cotdl_overflow:  case cotd_overflow:  case cotdf_overflow:  case cotl_overflow:  case cot_overflow:  case cotf_overflow:  case sinhcoshl_overflow:  case sinhcosh_overflow:  case sinhcoshf_overflow:  case nextafterl_overflow:  case nextafter_overflow:  case nextafterf_overflow:  case nextafterl_underflow:  case nextafter_underflow:  case nextafterf_underflow:  case nexttowardl_overflow:  case nexttoward_overflow:  case nexttowardf_overflow:  case nexttowardl_underflow:  case nexttoward_underflow:  case nexttowardf_underflow:  {       ERRNO_RANGE; break;  }  case atanhl_gt_one:  case atanhl_eq_one:    /* atanhl(|x| >= 1) */    {       ERRNO_DOMAIN; break;    }  case atanh_gt_one:  case atanh_eq_one:    /* atanh(|x| >= 1) */    {       ERRNO_DOMAIN; break;    }  case atanhf_gt_one:  case atanhf_eq_one:    /* atanhf(|x| >= 1) */    {       ERRNO_DOMAIN; break;    }  case sqrtl_negative:    /* sqrtl(x < 0) */    {       ERRNO_DOMAIN; break;    }  case sqrt_negative:    /* sqrt(x < 0) */    {       ERRNO_DOMAIN; break;    }  case sqrtf_negative:    /* sqrtf(x < 0) */    {       ERRNO_DOMAIN; break;    }  case y0l_zero:  case y1l_zero:  case ynl_zero:    /* y0l(0) */    /* y1l(0) */    /* ynl(0) */    {       RETVAL_NEG_HUGE_VALL; ERRNO_DOMAIN; break;    }  case y0_zero:  case y1_zero:  case yn_zero:    /* y0(0) */    /* y1(0) */    /* yn(0) */    {       RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break;    }  case y0f_zero:  case y1f_zero:  case ynf_zero:    /* y0f(0) */    /* y1f(0) */    /* ynf(0) */    {       RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break;    }  case y0l_negative:  case y1l_negative:  case ynl_negative:    /* y0l(x < 0) */    /* y1l(x < 0) */    /* ynl(x < 0) */    {#ifndef _LIBC       RETVAL_NEG_HUGE_VALL;#endif       ERRNO_DOMAIN; break;    }  case y0_negative:  case y1_negative:  case yn_negative:    /* y0(x < 0) */    /* y1(x < 0) */    /* yn(x < 0) */    {       RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break;    }  case y0f_negative:  case y1f_negative:  case ynf_negative:    /* y0f(x < 0) */    /* y1f(x < 0) */    /* ynf(x < 0) */    {       RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break;    }  case logl_zero:  case log1pl_zero:  case log10l_zero:  case log2l_zero:    /* logl(0) */    /* log1pl(-1) */    /* log10l(0) */    /* log2l(0) */    {       RETVAL_NEG_HUGE_VALL; ERRNO_RANGE; break;    }  case log_zero:  case log1p_zero:  case log10_zero:  case log2_zero:   /* log(0) */   /* log1p(-1) */   /* log10(0) */   /* log2(0) */    {       RETVAL_NEG_HUGE_VALD; ERRNO_RANGE; break;    }  case logf_zero:  case log1pf_zero:  case log10f_zero:  case log2f_zero:    /* logf(0) */    /* log1pf(-1) */    /* log10f(0) */    /* log2f(0) */    {       RETVAL_NEG_HUGE_VALF; ERRNO_RANGE; break;    }  case logl_negative:  case log1pl_negative:  case log10l_negative:  case log2l_negative:    /* logl(x < 0) */    /* log1pl(x < -1) */    /* log10l(x < 0) */    /* log2l(x < 0) */    {       ERRNO_DOMAIN; break;    }  case log_negative:  case log1p_negative:  case log10_negative:  case log2_negative:    /* log(x < 0) */    /* log1p(x < -1) */    /* log10(x < 0) */    /* log2(x < 0) */    {       ERRNO_DOMAIN; break;    }  case logf_negative:  case log1pf_negative:  case log10f_negative:  case log2f_negative:    /* logf(x < 0) */    /* log1pf(x < -1) */    /* log10f(x < 0) */    /* log2f(x < 0) */    {       ERRNO_DOMAIN; break;    }  case expl_overflow:  case exp10l_overflow:  case exp2l_overflow:    /* expl overflow */    /* exp10l overflow */    /* exp2l overflow */    {       RETVAL_HUGE_VALL; ERRNO_RANGE; break;    }  case exp_overflow:  case exp10_overflow:  case exp2_overflow:    /* exp overflow */    /* exp10 overflow */    /* exp2 overflow */    {       RETVAL_HUGE_VALD; ERRNO_RANGE; break;    }  case expf_overflow:  case exp10f_overflow:  case exp2f_overflow:    /* expf overflow */    {       RETVAL_HUGE_VALF; ERRNO_RANGE; break;    }  case expl_underflow:  case exp10l_underflow:  case exp2l_underflow:    /* expl underflow */    /* exp10l underflow */    /* exp2l underflow */    {       ERRNO_RANGE; break;    }  case exp_underflow:  case exp10_underflow:  case exp2_underflow:    /* exp underflow */    /* exp10 underflow */    /* exp2 underflow */    {       ERRNO_RANGE; break;    }  case expf_underflow:  case exp10f_underflow:  case exp2f_underflow:    /* expf underflow */    /* exp10f underflow */    /* exp2f underflow */    {       ERRNO_RANGE; break;    }  case j0l_gt_loss:  case y0l_gt_loss:  case j1l_gt_loss:  case y1l_gt_loss:  case jnl_gt_loss:  case ynl_gt_loss:    /* jn and yn  doubl-extended> XLOSS */    {       RETVAL_ZEROL; ERRNO_RANGE; break;    }  case j0_gt_loss:  case y0_gt_loss:  case j1_gt_loss:  case y1_gt_loss:  case jn_gt_loss:  case yn_gt_loss:    /* jn and yn double > XLOSS */    {       RETVAL_ZEROD; ERRNO_RANGE; break;    }  case j0f_gt_loss:  case y0f_gt_loss:  case j1f_gt_loss:  case y1f_gt_loss:  case jnf_gt_loss:  case ynf_gt_loss:    /* j0n and y0n > XLOSS */    {       RETVAL_ZEROF; ERRNO_RANGE; break;    }  case powl_zero_to_zero:    /* powl 0**0 */    {       break;    }  case pow_zero_to_zero:    /* pow 0**0 */    {       break;    }  case powf_zero_to_zero:    /* powf 0**0 */    {       break;    }  case powl_overflow:  case annuityl_overflow:  case compoundl_overflow:    /* powl(x,y) overflow */    {       if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;       else RETVAL_HUGE_VALL;       ERRNO_RANGE; break;    }  case pow_overflow:  case annuity_overflow:  case compound_overflow:    /* pow(x,y) overflow */    {       if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;       else RETVAL_HUGE_VALD;       ERRNO_RANGE; break;    }  case powf_overflow:  case annuityf_overflow:  case compoundf_overflow:    /* powf(x,y) overflow */    {       if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;       else RETVAL_HUGE_VALF;       ERRNO_RANGE; break;    }  case powl_underflow:  case annuityl_underflow:  case compoundl_underflow:    /* powl(x,y) underflow */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -