📄 e_j0l.c
字号:
#ifdef __STDC__static const long double pR5[7] = {#elsestatic long double pR5[7] = {#endif /* 4.54541015625 <= x <= 8 Peak relative error 6.51E-22 */ -2.041226787870240954326915847282179737987E-7L, -2.255373879859413325570636768224534428156E-5L, -7.957485746440825353553537274569102059990E-4L, -1.093205102486816696940149222095559439425E-2L, -5.657957849316537477657603125260701114646E-2L, -8.641175552716402616180994954177818461588E-2L, -1.354654710097134007437166939230619726157E-2L,};#ifdef __STDC__static const long double pS5[6] = {#elsestatic long double pS5[6] = {#endif 2.903078099681108697057258628212823545290E-6L, 3.253948449946735405975737677123673867321E-4L, 1.181269751723085006534147920481582279979E-2L, 1.719212057790143888884745200257619469363E-1L, 1.006306498779212467670654535430694221924E0L, 2.069568808688074324555596301126375951502E0L, /* 1.000000000000000000000000000000000000000E0L, */};#ifdef __STDC__static const long double pR3[7] = {#elsestatic long double pR3[7] = {#endif /* 2.85711669921875 <= x <= 4.54541015625 peak relative error 5.25e-21 */ -5.755732156848468345557663552240816066802E-6L, -3.703675625855715998827966962258113034767E-4L, -7.390893350679637611641350096842846433236E-3L, -5.571922144490038765024591058478043873253E-2L, -1.531290690378157869291151002472627396088E-1L, -1.193350853469302941921647487062620011042E-1L, -8.567802507331578894302991505331963782905E-3L,};#ifdef __STDC__static const long double pS3[6] = {#elsestatic long double pS3[6] = {#endif 8.185931139070086158103309281525036712419E-5L, 5.398016943778891093520574483111255476787E-3L, 1.130589193590489566669164765853409621081E-1L, 9.358652328786413274673192987670237145071E-1L, 3.091711512598349056276917907005098085273E0L, 3.594602474737921977972586821673124231111E0L, /* 1.000000000000000000000000000000000000000E0L, */};#ifdef __STDC__static const long double pR2[7] = {#elsestatic long double pR2[7] = {#endif /* 2 <= x <= 2.85711669921875 peak relative error 2.64e-21 */ -1.219525235804532014243621104365384992623E-4L, -4.838597135805578919601088680065298763049E-3L, -5.732223181683569266223306197751407418301E-2L, -2.472947430526425064982909699406646503758E-1L, -3.753373645974077960207588073975976327695E-1L, -1.556241316844728872406672349347137975495E-1L, -5.355423239526452209595316733635519506958E-3L,};#ifdef __STDC__static const long double pS2[6] = {#elsestatic long double pS2[6] = {#endif 1.734442793664291412489066256138894953823E-3L, 7.158111826468626405416300895617986926008E-2L, 9.153839713992138340197264669867993552641E-1L, 4.539209519433011393525841956702487797582E0L, 8.868932430625331650266067101752626253644E0L, 6.067161890196324146320763844772857713502E0L, /* 1.000000000000000000000000000000000000000E0L, */};#ifdef __STDC__static long doublepzero (long double x)#elsestatic long doublepzero (x) long double x;#endif{#ifdef __STDC__ const long double *p, *q;#else long double *p, *q;#endif long double z, r, s; int32_t ix; u_int32_t se, i0, i1; GET_LDOUBLE_WORDS (se, i0, i1, x); ix = se & 0x7fff; if (ix >= 0x4002) { p = pR8; q = pS8; } /* x >= 8 */ else { i1 = (ix << 16) | (i0 >> 16); if (i1 >= 0x40019174) /* x >= 4.54541015625 */ { p = pR5; q = pS5; } else if (i1 >= 0x4000b6db) /* x >= 2.85711669921875 */ { p = pR3; q = pS3; } else if (ix >= 0x4000) /* x better be >= 2 */ { p = pR2; q = pS2; } } z = one / (x * x); r = p[0] + z * (p[1] + z * (p[2] + z * (p[3] + z * (p[4] + z * (p[5] + z * p[6]))))); s = q[0] + z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * (q[5] + z))))); return (one + z * r / s);}/* For x >= 8, the asymptotic expansions of qzero is * -1/8 s + 75/1024 s^3 - ..., where s = 1/x. * We approximate qzero by * qzero(x) = s*(-.125 + R(s^2) / S(s^2)) */#ifdef __STDC__static const long double qR8[7] = {#elsestatic long double qR8[7] = {#endif /* 8 <= x <= inf peak relative error 2.23e-21 */ 3.001267180483191397885272640777189348008E-10L, 8.693186311430836495238494289942413810121E-8L, 8.496875536711266039522937037850596580686E-6L, 3.482702869915288984296602449543513958409E-4L, 6.036378380706107692863811938221290851352E-3L, 3.881970028476167836382607922840452192636E-2L, 6.132191514516237371140841765561219149638E-2L,};#ifdef __STDC__static const long double qS8[7] = {#elsestatic long double qS8[7] = {#endif 4.097730123753051126914971174076227600212E-9L, 1.199615869122646109596153392152131139306E-6L, 1.196337580514532207793107149088168946451E-4L, 5.099074440112045094341500497767181211104E-3L, 9.577420799632372483249761659674764460583E-2L, 7.385243015344292267061953461563695918646E-1L, 1.917266424391428937962682301561699055943E0L, /* 1.000000000000000000000000000000000000000E0L, */};#ifdef __STDC__static const long double qR5[7] = {#elsestatic long double qR5[7] = {#endif /* 4.54541015625 <= x <= 8 peak relative error 1.03e-21 */ 3.406256556438974327309660241748106352137E-8L, 4.855492710552705436943630087976121021980E-6L, 2.301011739663737780613356017352912281980E-4L, 4.500470249273129953870234803596619899226E-3L, 3.651376459725695502726921248173637054828E-2L, 1.071578819056574524416060138514508609805E-1L, 7.458950172851611673015774675225656063757E-2L,};#ifdef __STDC__static const long double qS5[7] = {#elsestatic long double qS5[7] = {#endif 4.650675622764245276538207123618745150785E-7L, 6.773573292521412265840260065635377164455E-5L, 3.340711249876192721980146877577806687714E-3L, 7.036218046856839214741678375536970613501E-2L, 6.569599559163872573895171876511377891143E-1L, 2.557525022583599204591036677199171155186E0L, 3.457237396120935674982927714210361269133E0L, /* 1.000000000000000000000000000000000000000E0L,*/};#ifdef __STDC__static const long double qR3[7] = {#elsestatic long double qR3[7] = {#endif /* 2.85711669921875 <= x <= 4.54541015625 peak relative error 5.24e-21 */ 1.749459596550816915639829017724249805242E-6L, 1.446252487543383683621692672078376929437E-4L, 3.842084087362410664036704812125005761859E-3L, 4.066369994699462547896426554180954233581E-2L, 1.721093619117980251295234795188992722447E-1L, 2.538595333972857367655146949093055405072E-1L, 8.560591367256769038905328596020118877936E-2L,};#ifdef __STDC__static const long double qS3[7] = {#elsestatic long double qS3[7] = {#endif 2.388596091707517488372313710647510488042E-5L, 2.048679968058758616370095132104333998147E-3L, 5.824663198201417760864458765259945181513E-2L, 6.953906394693328750931617748038994763958E-1L, 3.638186936390881159685868764832961092476E0L, 7.900169524705757837298990558459547842607E0L, 5.992718532451026507552820701127504582907E0L, /* 1.000000000000000000000000000000000000000E0L, */};#ifdef __STDC__static const long double qR2[7] = {#elsestatic long double qR2[7] = {#endif /* 2 <= x <= 2.85711669921875 peak relative error 1.58e-21 */ 6.306524405520048545426928892276696949540E-5L, 3.209606155709930950935893996591576624054E-3L, 5.027828775702022732912321378866797059604E-2L, 3.012705561838718956481911477587757845163E-1L, 6.960544893905752937420734884995688523815E-1L, 5.431871999743531634887107835372232030655E-1L, 9.447736151202905471899259026430157211949E-2L,};#ifdef __STDC__static const long double qS2[7] = {#elsestatic long double qS2[7] = {#endif 8.610579901936193494609755345106129102676E-4L, 4.649054352710496997203474853066665869047E-2L, 8.104282924459837407218042945106320388339E-1L, 5.807730930825886427048038146088828206852E0L, 1.795310145936848873627710102199881642939E1L, 2.281313316875375733663657188888110605044E1L, 1.011242067883822301487154844458322200143E1L, /* 1.000000000000000000000000000000000000000E0L, */};#ifdef __STDC__static long doubleqzero (long double x)#elsestatic long doubleqzero (x) long double x;#endif{#ifdef __STDC__ const long double *p, *q;#else long double *p, *q;#endif long double s, r, z; int32_t ix; u_int32_t se, i0, i1; GET_LDOUBLE_WORDS (se, i0, i1, x); ix = se & 0x7fff; if (ix >= 0x4002) /* x >= 8 */ { p = qR8; q = qS8; } else { i1 = (ix << 16) | (i0 >> 16); if (i1 >= 0x40019174) /* x >= 4.54541015625 */ { p = qR5; q = qS5; } else if (i1 >= 0x4000b6db) /* x >= 2.85711669921875 */ { p = qR3; q = qS3; } else if (ix >= 0x4000) /* x better be >= 2 */ { p = qR2; q = qS2; } } z = one / (x * x); r = p[0] + z * (p[1] + z * (p[2] + z * (p[3] + z * (p[4] + z * (p[5] + z * p[6]))))); s = q[0] + z * (q[1] + z * (q[2] + z * (q[3] + z * (q[4] + z * (q[5] + z * (q[6] + z)))))); return (-.125 + z * r / s) / x;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -