/* airy.c
*
* Airy function
*
*
*
* SYNOPSIS :
*
* double x , ai , aip , bi , bip ;
* int airy ( ) ;
*
* airy ( x , _ & ai , _ & aip , _ & bi , _ & bip ) ;
*
*
*
* DESCRIPTION :
*
* Solution of the differential equation
*
* y " ( x ) = xy .
*
* The function returns the two independent solutions Ai , Bi
* and their first derivatives Ai ' ( x ) , Bi ' ( x ) .
*
* Evaluation is by power series summation for small x ,
* by rational minimax approximations for large x .
*
*
*
* ACCURACY :
* Error criterion is absolute when function < = 1 , relative
* when function > 1 , except * denotes relative error criterion .
* For large negative x , the absolute error increases as x ^ 1 . 5 .
* For large positive x , the relative error increases as x ^ 1 . 5 .
*
* Arithmetic domain function # trials peak rms
* IEEE - 10 , 0 Ai 10000 1 . 6 e - 15 2 . 7 e - 16
* IEEE 0 , 10 Ai 10000 2 . 3 e - 14 * 1 . 8 e - 15 *
* IEEE - 10 , 0 Ai ' 10000 4 . 6 e - 15 7 . 6 e - 16
* IEEE 0 , 10 Ai ' 10000 1 . 8 e - 14 * 1 . 5 e - 15 *
* IEEE - 10 , 10 Bi 30000 4 . 2 e - 15 5 . 3 e - 16
* IEEE - 10 , 10 Bi ' 30000 4 . 9 e - 15 7 . 3 e - 16
* DEC - 10 , 0 Ai 5000 1 . 7 e - 16 2 . 8 e - 17
* DEC 0 , 10 Ai 5000 2 . 1 e - 15 * 1 . 7 e - 16 *
* DEC - 10 , 0 Ai ' 5000 4 . 7 e - 16 7 . 8 e - 17
* DEC 0 , 10 Ai ' 12000 1 . 8 e - 15 * 1 . 5 e - 16 *
* DEC - 10 , 10 Bi 10000 5 . 5 e - 16 6 . 8 e - 17
* DEC - 10 , 10 Bi ' 7000 5 . 3 e - 16 8 . 7 e - 17
*
*/
/* airy.c */
/*
Cephes Math Library Release 2 . 8 : June , 2000
Copyright 1984 , 1987 , 1989 , 2000 by Stephen L . Moshier
*/
#include "mconf.h"
static double c1 = 0 .35502805388781723926 ;
static double c2 = 0 .258819403792806798405 ;
static double sqrt3 = 1 .732050807568877293527 ;
static double sqpii = 5 .64189583547756286948 E-1 ;
extern double PI;
extern double MAXNUM, MACHEP;
#ifdef UNK
#define MAXAIRY 25 .77
#endif
#ifdef DEC
#define MAXAIRY 25 .77
#endif
#ifdef IBMPC
#define MAXAIRY 103 .892
#endif
#ifdef MIEEE
#define MAXAIRY 103 .892
#endif
#ifdef UNK
static double AN[8 ] = {
3 .46538101525629032477 E-1 , 1 .20075952739645805542 E1,
7 .62796053615234516538 E1, 1 .68089224934630576269 E2,
1 .59756391350164413639 E2, 7 .05360906840444183113 E1,
1 .40264691163389668864 E1, 9 .99999999999999995305 E-1 ,
};
static double AD[8 ] = {
5 .67594532638770212846 E-1 , 1 .47562562584847203173 E1,
8 .45138970141474626562 E1, 1 .77318088145400459522 E2,
1 .64234692871529701831 E2, 7 .14778400825575695274 E1,
1 .40959135607834029598 E1, 1 .00000000000000000470 E0,
};
#endif
#ifdef DEC
static unsigned short AN[32 ] = {
0037661 , 0066561 , 0024675 , 0131301 , 0041100 , 0017434 , 0034324 , 0101466 ,
0041630 , 0107450 , 0067427 , 0007430 , 0042050 , 0013327 , 0071000 , 0034737 ,
0042037 , 0140642 , 0156417 , 0167366 , 0041615 , 0011172 , 0075147 , 0051165 ,
0041140 , 0066152 , 0160520 , 0075146 , 0040200 , 0000000 , 0000000 , 0000000 ,
};
static unsigned short AD[32 ] = {
0040021 , 0046740 , 0011422 , 0064606 , 0041154 , 0014640 , 0024631 , 0062450 ,
0041651 , 0003435 , 0101152 , 0106401 , 0042061 , 0050556 , 0034605 , 0136602 ,
0042044 , 0036024 , 0152377 , 0151414 , 0041616 , 0172247 , 0072216 , 0115374 ,
0041141 , 0104334 , 0124154 , 0166007 , 0040200 , 0000000 , 0000000 , 0000000 ,
};
#endif
#ifdef IBMPC
static unsigned short AN[32 ] = {
0 xb658, 0 x2537, 0 x2dae, 0 x3fd6, 0 x9067, 0 x871a, 0 x03e3, 0 x4028,
0 xe1e3, 0 x0de2, 0 x11e5, 0 x4053, 0 x073c, 0 xee40, 0 x02da, 0 x4065,
0 xfddf, 0 x5ba1, 0 xf834, 0 x4063, 0 xea4f, 0 x4f4c, 0 xa24f, 0 x4051,
0 x0f4d, 0 x5c2a, 0 x0d8d, 0 x402c, 0 x0000, 0 x0000, 0 x0000, 0 x3ff0,
};
static unsigned short AD[32 ] = {
0 x4d31, 0 x0262, 0 x29bc, 0 x3fe2, 0 x2ca5, 0 x0533, 0 x8334, 0 x402d,
0 x51a0, 0 xb04d, 0 x20e3, 0 x4055, 0 xb7b0, 0 xc730, 0 x2a2d, 0 x4066,
0 xfa61, 0 x9a9f, 0 x8782, 0 x4064, 0 xd35f, 0 xee91, 0 xde94, 0 x4051,
0 x9d81, 0 x950d, 0 x311b, 0 x402c, 0 x0000, 0 x0000, 0 x0000, 0 x3ff0,
};
#endif
#ifdef MIEEE
static unsigned short AN[32 ] = {
0 x3fd6, 0 x2dae, 0 x2537, 0 xb658, 0 x4028, 0 x03e3, 0 x871a, 0 x9067,
0 x4053, 0 x11e5, 0 x0de2, 0 xe1e3, 0 x4065, 0 x02da, 0 xee40, 0 x073c,
0 x4063, 0 xf834, 0 x5ba1, 0 xfddf, 0 x4051, 0 xa24f, 0 x4f4c, 0 xea4f,
0 x402c, 0 x0d8d, 0 x5c2a, 0 x0f4d, 0 x3ff0, 0 x0000, 0 x0000, 0 x0000,
};
static unsigned short AD[32 ] = {
0 x3fe2, 0 x29bc, 0 x0262, 0 x4d31, 0 x402d, 0 x8334, 0 x0533, 0 x2ca5,
0 x4055, 0 x20e3, 0 xb04d, 0 x51a0, 0 x4066, 0 x2a2d, 0 xc730, 0 xb7b0,
0 x4064, 0 x8782, 0 x9a9f, 0 xfa61, 0 x4051, 0 xde94, 0 xee91, 0 xd35f,
0 x402c, 0 x311b, 0 x950d, 0 x9d81, 0 x3ff0, 0 x0000, 0 x0000, 0 x0000,
};
#endif
#ifdef UNK
static double APN[8 ] = {
6 .13759184814035759225 E-1 , 1 .47454670787755323881 E1,
8 .20584123476060982430 E1, 1 .71184781360976385540 E2,
1 .59317847137141783523 E2, 6 .99778599330103016170 E1,
1 .39470856980481566958 E1, 1 .00000000000000000550 E0,
};
static double APD[8 ] = {
3 .34203677749736953049 E-1 , 1 .11810297306158156705 E1,
7 .11727352147859965283 E1, 1 .58778084372838313640 E2,
1 .53206427475809220834 E2, 6 .86752304592780337944 E1,
1 .38498634758259442477 E1, 9 .99999999999999994502 E-1 ,
};
#endif
#ifdef DEC
static unsigned short APN[32 ] = {
0040035 , 0017522 , 0065145 , 0054755 , 0041153 , 0166556 , 0161471 , 0057174 ,
0041644 , 0016750 , 0034445 , 0046462 , 0042053 , 0027515 , 0152316 , 0046717 ,
0042037 , 0050536 , 0067023 , 0023264 , 0041613 , 0172252 , 0007240 , 0131055 ,
0041137 , 0023503 , 0052472 , 0002305 , 0040200 , 0000000 , 0000000 , 0000000 ,
};
static unsigned short APD[32 ] = {
0037653 , 0016276 , 0112106 , 0126625 , 0041062 , 0162577 , 0067111 , 0111761 ,
0041616 , 0054160 , 0140004 , 0137455 , 0042036 , 0143460 , 0104626 , 0157206 ,
0042031 , 0032330 , 0067131 , 0114260 , 0041611 , 0054667 , 0147207 , 0134564 ,
0041135 , 0114412 , 0070653 , 0146015 , 0040200 , 0000000 , 0000000 , 0000000 ,
};
#endif
#ifdef IBMPC
static unsigned short APN[32 ] = {
0 xab3e, 0 x4d4c, 0 xa3ea, 0 x3fe3, 0 x2bcf, 0 xdc67, 0 x7dad, 0 x402d,
0 xa9a6, 0 x0724, 0 x83bd, 0 x4054, 0 xc9ba, 0 xba99, 0 x65e9, 0 x4065,
0 x64d7, 0 xcdc2, 0 xea2b, 0 x4063, 0 x1646, 0 x41d4, 0 x7e95, 0 x4051,
0 x4099, 0 x6aa7, 0 xe4e8, 0 x402b, 0 x0000, 0 x0000, 0 x0000, 0 x3ff0,
};
static unsigned short APD[32 ] = {
0 xd5b3, 0 xd288, 0 x6397, 0 x3fd5, 0 x327e, 0 xedc9, 0 x5caf, 0 x4026,
0 x97e6, 0 x1800, 0 xcb0e, 0 x4051, 0 xdbd1, 0 x1132, 0 xd8e6, 0 x4063,
0 x3316, 0 x0dcb, 0 x269b, 0 x4063, 0 xf72f, 0 xf9d0, 0 x2b36, 0 x4051,
0 x7982, 0 x4e35, 0 xb321, 0 x402b, 0 x0000, 0 x0000, 0 x0000, 0 x3ff0,
};
#endif
#ifdef MIEEE
static unsigned short APN[32 ] = {
0 x3fe3, 0 xa3ea, 0 x4d4c, 0 xab3e, 0 x402d, 0 x7dad, 0 xdc67, 0 x2bcf,
0 x4054, 0 x83bd, 0 x0724, 0 xa9a6, 0 x4065, 0 x65e9, 0 xba99, 0 xc9ba,
0 x4063, 0 xea2b, 0 xcdc2, 0 x64d7, 0 x4051, 0 x7e95, 0 x41d4, 0 x1646,
0 x402b, 0 xe4e8, 0 x6aa7, 0 x4099, 0 x3ff0, 0 x0000, 0 x0000, 0 x0000,
};
static unsigned short APD[32 ] = {
0 x3fd5, 0 x6397, 0 xd288, 0 xd5b3, 0 x4026, 0 x5caf, 0 xedc9, 0 x327e,
0 x4051, 0 xcb0e, 0 x1800, 0 x97e6, 0 x4063, 0 xd8e6, 0 x1132, 0 xdbd1,
0 x4063, 0 x269b, 0 x0dcb, 0 x3316, 0 x4051, 0 x2b36, 0 xf9d0, 0 xf72f,
0 x402b, 0 xb321, 0 x4e35, 0 x7982, 0 x3ff0, 0 x0000, 0 x0000, 0 x0000,
};
#endif
#ifdef UNK
static double BN16[5 ] = {
-2 .53240795869364152689 E-1 , 5 .75285167332467384228 E-1 ,
-3 .29907036873225371650 E-1 , 6 .44404068948199951727 E-2 ,
-3 .82519546641336734394 E-3 ,
};
static double BD16[5 ] = {
/* 1.00000000000000000000E0,*/
-7 .15685095054035237902 E0, 1 .06039580715664694291 E1,
-5 .23246636471251500874 E0, 9 .57395864378383833152 E-1 ,
-5 .50828147163549611107 E-2 ,
};
#endif
#ifdef DEC
static unsigned short BN16[20 ] = {
0137601 , 0124307 , 0010213 , 0035210 , 0040023 , 0042743 , 0101621 ,
0016031 , 0137650 , 0164623 , 0036056 , 0074511 , 0037203 , 0174525 ,
0000473 , 0142474 , 0136172 , 0130041 , 0066726 , 0064324 ,
};
static unsigned short BD16[20 ] = {
/*0040200,0000000,0000000,0000000,*/
0140745 , 0002354 , 0044335 , 0055276 , 0041051 , 0124717 , 0170130 ,
0104013 , 0140647 , 0070135 , 0046473 , 0103501 , 0040165 , 0013745 ,
0033324 , 0127766 , 0137141 , 0117204 , 0076164 , 0033107 ,
};
#endif
#ifdef IBMPC
static unsigned short BN16[20 ] = {
0 x6751, 0 xe211, 0 x3518, 0 xbfd0, 0 x2383, 0 x7072, 0 x68bc,
0 x3fe2, 0 xcf29, 0 x6785, 0 x1d32, 0 xbfd5, 0 x78a8, 0 xa027,
0 x7f2a, 0 x3fb0, 0 xcd1b, 0 x2dba, 0 x5604, 0 xbf6f,
};
static unsigned short BD16[20 ] = {
/*0x0000,0x0000,0x0000,0x3ff0,*/
0 xab58, 0 x891b, 0 xa09d, 0 xc01c, 0 x1101, 0 xfe0b, 0 x3539,
0 x4025, 0 x70e8, 0 xa9a7, 0 xee0b, 0 xc014, 0 x95ff, 0 xa6da,
0 xa2fc, 0 x3fee, 0 x86c9, 0 x8f8e, 0 x33d0, 0 xbfac,
};
#endif
#ifdef MIEEE
static unsigned short BN16[20 ] = {
0 xbfd0, 0 x3518, 0 xe211, 0 x6751, 0 x3fe2, 0 x68bc, 0 x7072,
0 x2383, 0 xbfd5, 0 x1d32, 0 x6785, 0 xcf29, 0 x3fb0, 0 x7f2a,
0 xa027, 0 x78a8, 0 xbf6f, 0 x5604, 0 x2dba, 0 xcd1b,
};
static unsigned short BD16[20 ] = {
/*0x3ff0,0x0000,0x0000,0x0000,*/
0 xc01c, 0 xa09d, 0 x891b, 0 xab58, 0 x4025, 0 x3539, 0 xfe0b,
0 x1101, 0 xc014, 0 xee0b, 0 xa9a7, 0 x70e8, 0 x3fee, 0 xa2fc,
0 xa6da, 0 x95ff, 0 xbfac, 0 x33d0, 0 x8f8e, 0 x86c9,
};
#endif
#ifdef UNK
static double BPPN[5 ] = {
4 .65461162774651610328 E-1 , -1 .08992173800493920734 E0,
6 .38800117371827987759 E-1 , -1 .26844349553102907034 E-1 ,
7 .62487844342109852105 E-3 ,
};
static double BPPD[5 ] = {
/* 1.00000000000000000000E0,*/
-8 .70622787633159124240 E0, 1 .38993162704553213172 E1,
-7 .14116144616431159572 E0, 1 .34008595960680518666 E0,
-7 .84273211323341930448 E-2 ,
};
#endif
#ifdef DEC
static unsigned short BPPN[20 ] = {
0037756 , 0050354 , 0167531 , 0135731 , 0140213 , 0101216 , 0032767 ,
0020375 , 0040043 , 0104147 , 0106312 , 0177632 , 0137401 , 0161574 ,
0032015 , 0043714 , 0036371 , 0155035 , 0143165 , 0142262 ,
};
static unsigned short BPPD[20 ] = {
/*0040200,0000000,0000000,0000000,*/
0141013 , 0046265 , 0115005 , 0161053 , 0041136 , 0061631 , 0072445 ,
0156131 , 0140744 , 0102145 , 0001127 , 0065304 , 0040253 , 0103757 ,
0146453 , 0102513 , 0137240 , 0117200 , 0155402 , 0113500 ,
};
#endif
#ifdef IBMPC
static unsigned short BPPN[20 ] = {
0 x377b, 0 x9deb, 0 xca1d, 0 x3fdd, 0 xe420, 0 xc6be, 0 x7051,
0 xbff1, 0 x5ff3, 0 xf199, 0 x710c, 0 x3fe4, 0 xa8fa, 0 x8681,
0 x3c6f, 0 xbfc0, 0 xb896, 0 xb8ce, 0 x3b43, 0 x3f7f,
};
static unsigned short BPPD[20 ] = {
/*0x0000,0x0000,0x0000,0x3ff0,*/
0 xbc45, 0 xb340, 0 x6996, 0 xc021, 0 xbb8b, 0 x2ea4, 0 xcc73,
0 x402b, 0 xed59, 0 xa04a, 0 x908c, 0 xc01c, 0 x70a9, 0 xf9a5,
0 x70fd, 0 x3ff5, 0 x52e8, 0 x1b60, 0 x13d0, 0 xbfb4,
};
#endif
#ifdef MIEEE
static unsigned short BPPN[20 ] = {
0 x3fdd, 0 xca1d, 0 x9deb, 0 x377b, 0 xbff1, 0 x7051, 0 xc6be,
0 xe420, 0 x3fe4, 0 x710c, 0 xf199, 0 x5ff3, 0 xbfc0, 0 x3c6f,
0 x8681, 0 xa8fa, 0 x3f7f, 0 x3b43, 0 xb8ce, 0 xb896,
};
static unsigned short BPPD[20 ] = {
/*0x3ff0,0x0000,0x0000,0x0000,*/
0 xc021, 0 x6996, 0 xb340, 0 xbc45, 0 x402b, 0 xcc73, 0 x2ea4,
0 xbb8b, 0 xc01c, 0 x908c, 0 xa04a, 0 xed59, 0 x3ff5, 0 x70fd,
0 xf9a5, 0 x70a9, 0 xbfb4, 0 x13d0, 0 x1b60, 0 x52e8,
};
#endif
#ifdef UNK
static double AFN[9 ] = {
-1 .31696323418331795333 E-1 , -6 .26456544431912369773 E-1 ,
-6 .93158036036933542233 E-1 , -2 .79779981545119124951 E-1 ,
-4 .91900132609500318020 E-2 , -4 .06265923594885404393 E-3 ,
-1 .59276496239262096340 E-4 , -2 .77649108155232920844 E-6 ,
-1 .67787698489114633780 E-8 ,
};
static double AFD[9 ] = {
/* 1.00000000000000000000E0,*/
1 .33560420706553243746 E1, 3 .26825032795224613948 E1,
2 .67367040941499554804 E1, 9 .18707402907259625840 E0,
1 .47529146771666414581 E0, 1 .15687173795188044134 E-1 ,
4 .40291641615211203805 E-3 , 7 .54720348287414296618 E-5 ,
4 .51850092970580378464 E-7 ,
};
#endif
#ifdef DEC
static unsigned short AFN[36 ] = {
0137406 , 0155546 , 0124127 , 0033732 , 0140040 , 0057564 , 0141263 , 0041222 ,
0140061 , 0071316 , 0013674 , 0175754 , 0137617 , 0037522 , 0056637 , 0120130 ,
0137111 , 0075567 , 0121755 , 0166122 , 0136205 , 0020016 , 0043317 , 0002201 ,
0135047 , 0001565 , 0075130 , 0002334 , 0133472 , 0051700 , 0165021 , 0131551 ,
0131620 , 0020347 , 0132165 , 0013215 ,
};
static unsigned short AFD[36 ] = {
/*0040200,0000000,0000000,0000000,*/
0041125 , 0131131 , 0025627 , 0067623 , 0041402 , 0135342 , 0021703 , 0154315 ,
0041325 , 0162305 , 0016671 , 0120175 , 0041022 , 0177101 , 0053114 , 0141632 ,
0040274 , 0153131 , 0147364 , 0114306 , 0037354 , 0166545 , 0120042 , 0150530 ,
0036220 , 0043127 , 0000727 , 0130273 , 0034636 , 0043275 , 0075667 , 0034733 ,
0032762 , 0112715 , 0146250 , 0142474 ,
};
#endif
#ifdef IBMPC
static unsigned short AFN[36 ] = {
0 xe6fb, 0 xd50a, 0 xdb6c, 0 xbfc0, 0 x6852, 0 x9856, 0 x0bee, 0 xbfe4, 0 x9f7d,
0 xc2f7, 0 x2e59, 0 xbfe6, 0 xf40b, 0 x4bb3, 0 xe7ea, 0 xbfd1, 0 xbd8a, 0 xf47d,
0 x2f6e, 0 xbfa9, 0 xe090, 0 xc8d9, 0 xa401, 0 xbf70, 0 x009c, 0 xaf4b, 0 xe06e,
0 xbf24, 0 x366d, 0 x1d42, 0 x4a78, 0 xbec7, 0 xa2d2, 0 xf68e, 0 x041c, 0 xbe52,
};
static unsigned short AFD[36 ] = {
/*0x0000,0x0000,0x0000,0x3ff0,*/
0 xedf2, 0 x2572, 0 xb64b, 0 x402a, 0 x7b1a, 0 x4478, 0 x575c, 0 x4040, 0 x3410,
0 xa3b7, 0 xbc98, 0 x403a, 0 x9873, 0 x2ac9, 0 x5fc8, 0 x4022, 0 x9319, 0 x39de,
0 x9acb, 0 x3ff7, 0 x5a2b, 0 xb404, 0 x9dac, 0 x3fbd, 0 xf617, 0 xe03a, 0 x08ca,
0 x3f72, 0 xe73b, 0 xaf76, 0 xc8d7, 0 x3f13, 0 x18a7, 0 xb995, 0 x52b9, 0 x3e9e,
};
#endif
#ifdef MIEEE
static unsigned short AFN[36 ] = {
0 xbfc0, 0 xdb6c, 0 xd50a, 0 xe6fb, 0 xbfe4, 0 x0bee, 0 x9856, 0 x6852, 0 xbfe6,
0 x2e59, 0 xc2f7, 0 x9f7d, 0 xbfd1, 0 xe7ea, 0 x4bb3, 0 xf40b, 0 xbfa9, 0 x2f6e,
0 xf47d, 0 xbd8a, 0 xbf70, 0 xa401, 0 xc8d9, 0 xe090, 0 xbf24, 0 xe06e, 0 xaf4b,
0 x009c, 0 xbec7, 0 x4a78, 0 x1d42, 0 x366d, 0 xbe52, 0 x041c, 0 xf68e, 0 xa2d2,
};
static unsigned short AFD[36 ] = {
/*0x3ff0,0x0000,0x0000,0x0000,*/
0 x402a, 0 xb64b, 0 x2572, 0 xedf2, 0 x4040, 0 x575c, 0 x4478, 0 x7b1a, 0 x403a,
0 xbc98, 0 xa3b7, 0 x3410, 0 x4022, 0 x5fc8, 0 x2ac9, 0 x9873, 0 x3ff7, 0 x9acb,
0 x39de, 0 x9319, 0 x3fbd, 0 x9dac, 0 xb404, 0 x5a2b, 0 x3f72, 0 x08ca, 0 xe03a,
0 xf617, 0 x3f13, 0 xc8d7, 0 xaf76, 0 xe73b, 0 x3e9e, 0 x52b9, 0 xb995, 0 x18a7,
};
#endif
#ifdef UNK
static double AGN[11 ] = {
1 .97339932091685679179 E-2 , 3 .91103029615688277255 E-1 ,
1 .06579897599595591108 E0, 9 .39169229816650230044 E-1 ,
3 .51465656105547619242 E-1 , 6 .33888919628925490927 E-2 ,
5 .85804113048388458567 E-3 , 2 .82851600836737019778 E-4 ,
6 .98793669997260967291 E-6 , 8 .11789239554389293311 E-8 ,
3 .41551784765923618484 E-10 ,
};
static double AGD[10 ] = {
/* 1.00000000000000000000E0,*/
9 .30892908077441974853 E0, 1 .98352928718312140417 E1,
1 .55646628932864612953 E1, 5 .47686069422975497931 E0,
9 .54293611618961883998 E-1 , 8 .64580826352392193095 E-2 ,
4 .12656523824222607191 E-3 , 1 .01259085116509135510 E-4 ,
1 .17166733214413521882 E-6 , 4 .91834570062930015649 E-9 ,
};
#endif
#ifdef DEC
static unsigned short AGN[44 ] = {
0036641 , 0124456 , 0167175 , 0157354 , 0037710 , 0037250 , 0001441 , 0136671 ,
0040210 , 0066031 , 0150401 , 0123532 , 0040160 , 0066545 , 0003570 , 0153133 ,
0037663 , 0171516 , 0072507 , 0170345 , 0037201 , 0151011 , 0007510 , 0045702 ,
0036277 , 0172317 , 0104572 , 0101030 , 0035224 , 0045663 , 0000160 , 0136422 ,
0033752 , 0074753 , 0047702 , 0135160 , 0032256 , 0052225 , 0156550 , 0107103 ,
0030273 , 0142443 , 0166277 , 0071720 ,
};
static unsigned short AGD[40 ] = {
/*0040200,0000000,0000000,0000000,*/
0041024 , 0170537 , 0117253 , 0055003 , 0041236 , 0127256 , 0003570 , 0143240 ,
0041171 , 0004333 , 0172476 , 0160645 , 0040657 , 0041161 , 0055716 , 0157161 ,
0040164 , 0046226 , 0006257 , 0063431 , 0037261 , 0010357 , 0065445 , 0047563 ,
0036207 , 0034043 , 0057434 , 0116732 , 0034724 , 0055416 , 0130035 , 0026377 ,
0033235 , 0041056 , 0154071 , 0023502 , 0031250 , 0177071 , 0167254 , 0047242 ,
};
#endif
#ifdef IBMPC
static unsigned short AGN[44 ] = {
0 xbbde, 0 xddcf, 0 x3525, 0 x3f94, 0 x37b7, 0 x0064, 0 x07d5, 0 x3fd9, 0 x34eb,
0 x3a20, 0 x0d83, 0 x3ff1, 0 x1acb, 0 xa0ef, 0 x0dac, 0 x3fee, 0 xfe1d, 0 xcea8,
0 x7e69, 0 x3fd6, 0 x0978, 0 x21e9, 0 x3a41, 0 x3fb0, 0 x5043, 0 xf12f, 0 xfe99,
0 x3f77, 0 x17a2, 0 x600e, 0 x8976, 0 x3f32, 0 x574e, 0 x69f8, 0 x4f3d, 0 x3edd,
0 x11c8, 0 xbbad, 0 xca92, 0 x3e75, 0 xee7a, 0 x7d97, 0 x78a4, 0 x3df7,
};
static unsigned short AGD[40 ] = {
/*0x0000,0x0000,0x0000,0x3ff0,*/
0 x6b40, 0 xf3d5, 0 x9e2b, 0 x4022, 0 x18d4, 0 xc0ef, 0 xd5d5, 0 x4033,
0 xdc35, 0 x7ea7, 0 x211b, 0 x402f, 0 xdbce, 0 x2b79, 0 xe84e, 0 x4015,
0 xece3, 0 xc195, 0 x8992, 0 x3fee, 0 xa9ee, 0 xed64, 0 x221d, 0 x3fb6,
0 x93bb, 0 x6be3, 0 xe704, 0 x3f70, 0 xa5a0, 0 xd603, 0 x8b61, 0 x3f1a,
0 x24e8, 0 xdb07, 0 xa845, 0 x3eb3, 0 x89d4, 0 x3dd5, 0 x1fc7, 0 x3e35,
};
#endif
#ifdef MIEEE
static unsigned short AGN[44 ] = {
0 x3f94, 0 x3525, 0 xddcf, 0 xbbde, 0 x3fd9, 0 x07d5, 0 x0064, 0 x37b7, 0 x3ff1,
0 x0d83, 0 x3a20, 0 x34eb, 0 x3fee, 0 x0dac, 0 xa0ef, 0 x1acb, 0 x3fd6, 0 x7e69,
0 xcea8, 0 xfe1d, 0 x3fb0, 0 x3a41, 0 x21e9, 0 x0978, 0 x3f77, 0 xfe99, 0 xf12f,
0 x5043, 0 x3f32, 0 x8976, 0 x600e, 0 x17a2, 0 x3edd, 0 x4f3d, 0 x69f8, 0 x574e,
0 x3e75, 0 xca92, 0 xbbad, 0 x11c8, 0 x3df7, 0 x78a4, 0 x7d97, 0 xee7a,
};
static unsigned short AGD[40 ] = {
/*0x3ff0,0x0000,0x0000,0x0000,*/
0 x4022, 0 x9e2b, 0 xf3d5, 0 x6b40, 0 x4033, 0 xd5d5, 0 xc0ef, 0 x18d4,
0 x402f, 0 x211b, 0 x7ea7, 0 xdc35, 0 x4015, 0 xe84e, 0 x2b79, 0 xdbce,
0 x3fee, 0 x8992, 0 xc195, 0 xece3, 0 x3fb6, 0 x221d, 0 xed64, 0 xa9ee,
0 x3f70, 0 xe704, 0 x6be3, 0 x93bb, 0 x3f1a, 0 x8b61, 0 xd603, 0 xa5a0,
0 x3eb3, 0 xa845, 0 xdb07, 0 x24e8, 0 x3e35, 0 x1fc7, 0 x3dd5, 0 x89d4,
};
#endif
#ifdef UNK
static double APFN[9 ] = {
1 .85365624022535566142 E-1 , 8 .86712188052584095637 E-1 ,
9 .87391981747398547272 E-1 , 4 .01241082318003734092 E-1 ,
7 .10304926289631174579 E-2 , 5 .90618657995661810071 E-3 ,
2 .33051409401776799569 E-4 , 4 .08718778289035454598 E-6 ,
2 .48379932900442457853 E-8 ,
};
static double APFD[9 ] = {
/* 1.00000000000000000000E0,*/
1 .47345854687502542552 E1, 3 .75423933435489594466 E1,
3 .14657751203046424330 E1, 1 .09969125207298778536 E1,
1 .78885054766999417817 E0, 1 .41733275753662636873 E-1 ,
5 .44066067017226003627 E-3 , 9 .39421290654511171663 E-5 ,
5 .65978713036027009243 E-7 ,
};
#endif
#ifdef DEC
static unsigned short APFN[36 ] = {
0037475 , 0150174 , 0071752 , 0166651 , 0040142 , 0177621 , 0164246 , 0101757 ,
0040174 , 0142670 , 0106760 , 0006573 , 0037715 , 0067570 , 0116274 , 0022404 ,
0037221 , 0074157 , 0053341 , 0117207 , 0036301 , 0104257 , 0015075 , 0004777 ,
0035164 , 0057502 , 0164034 , 0001313 , 0033611 , 0022254 , 0176000 , 0112565 ,
0031725 , 0055523 , 0025153 , 0166057 ,
};
static unsigned short APFD[36 ] = {
/*0040200,0000000,0000000,0000000,*/
0041153 , 0140334 , 0130506 , 0061402 , 0041426 , 0025551 , 0024440 , 0070611 ,
0041373 , 0134750 , 0047147 , 0176702 , 0041057 , 0171532 , 0105430 , 0017674 ,
0040344 , 0174416 , 0001726 , 0047754 , 0037421 , 0021207 , 0020167 , 0136264 ,
0036262 , 0043621 , 0151321 , 0124324 , 0034705 , 0001313 , 0163733 , 0016407 ,
0033027 , 0166702 , 0150440 , 0170561 ,
};
#endif
#ifdef IBMPC
static unsigned short APFN[36 ] = {
0 x5db5, 0 x8e7d, 0 xba0f, 0 x3fc7, 0 xd07e, 0 x3d14, 0 x5ff2, 0 x3fec, 0 x01af,
0 x11be, 0 x98b7, 0 x3fef, 0 x84a1, 0 x1397, 0 xadef, 0 x3fd9, 0 x33d1, 0 xeadc,
0 x2f0d, 0 x3fb2, 0 xa140, 0 xe347, 0 x3115, 0 x3f78, 0 x8059, 0 x5d03, 0 x8be8,
0 x3f2e, 0 x12af, 0 x9f80, 0 x2495, 0 x3ed1, 0 x7d86, 0 x654d, 0 xab6a, 0 x3e5a,
};
static unsigned short APFD[36 ] = {
/*0x0000,0x0000,0x0000,0x3ff0,*/
0 xcc60, 0 x9628, 0 x781b, 0 x402d, 0 x0e31, 0 x2524, 0 xc56d, 0 x4042, 0 xffb8,
0 x09cc, 0 x773d, 0 x403f, 0 x03f7, 0 x5163, 0 xfe6b, 0 x4025, 0 xc9fd, 0 xc07a,
0 x9f21, 0 x3ffc, 0 xf796, 0 xe40e, 0 x2450, 0 x3fc2, 0 x351a, 0 x3a5a, 0 x48f2,
0 x3f76, 0 x63a1, 0 x7cfb, 0 xa059, 0 x3f18, 0 x1e2e, 0 x5a24, 0 xfdb8, 0 x3ea2,
};
#endif
#ifdef MIEEE
static unsigned short APFN[36 ] = {
0 x3fc7, 0 xba0f, 0 x8e7d, 0 x5db5, 0 x3fec, 0 x5ff2, 0 x3d14, 0 xd07e, 0 x3fef,
0 x98b7, 0 x11be, 0 x01af, 0 x3fd9, 0 xadef, 0 x1397, 0 x84a1, 0 x3fb2, 0 x2f0d,
0 xeadc, 0 x33d1, 0 x3f78, 0 x3115, 0 xe347, 0 xa140, 0 x3f2e, 0 x8be8, 0 x5d03,
0 x8059, 0 x3ed1, 0 x2495, 0 x9f80, 0 x12af, 0 x3e5a, 0 xab6a, 0 x654d, 0 x7d86,
};
static unsigned short APFD[36 ] = {
/*0x3ff0,0x0000,0x0000,0x0000,*/
0 x402d, 0 x781b, 0 x9628, 0 xcc60, 0 x4042, 0 xc56d, 0 x2524, 0 x0e31, 0 x403f,
0 x773d, 0 x09cc, 0 xffb8, 0 x4025, 0 xfe6b, 0 x5163, 0 x03f7, 0 x3ffc, 0 x9f21,
0 xc07a, 0 xc9fd, 0 x3fc2, 0 x2450, 0 xe40e, 0 xf796, 0 x3f76, 0 x48f2, 0 x3a5a,
0 x351a, 0 x3f18, 0 xa059, 0 x7cfb, 0 x63a1, 0 x3ea2, 0 xfdb8, 0 x5a24, 0 x1e2e,
};
#endif
#ifdef UNK
static double APGN[11 ] = {
-3 .55615429033082288335 E-2 , -6 .37311518129435504426 E-1 ,
-1 .70856738884312371053 E0, -1 .50221872117316635393 E0,
-5 .63606665822102676611 E-1 , -1 .02101031120216891789 E-1 ,
-9 .48396695961445269093 E-3 , -4 .60325307486780994357 E-4 ,
-1 .14300836484517375919 E-5 , -1 .33415518685547420648 E-7 ,
-5 .63803833958893494476 E-10 ,
};
static double APGD[11 ] = {
/* 1.00000000000000000000E0,*/
9 .85865801696130355144 E0, 2 .16401867356585941885 E1,
1 .73130776389749389525 E1, 6 .17872175280828766327 E0,
1 .08848694396321495475 E0, 9 .95005543440888479402 E-2 ,
4 .78468199683886610842 E-3 , 1 .18159633322838625562 E-4 ,
1 .37480673554219441465 E-6 , 5 .79912514929147598821 E-9 ,
};
#endif
#ifdef DEC
static unsigned short APGN[44 ] = {
0137021 , 0124372 , 0176075 , 0075331 , 0140043 , 0023330 , 0177672 , 0161655 ,
0140332 , 0131126 , 0010413 , 0171112 , 0140300 , 0044263 , 0175560 , 0054070 ,
0140020 , 0044206 , 0142603 , 0073324 , 0137321 , 0015130 , 0066144 , 0144033 ,
0136433 , 0061243 , 0175542 , 0103373 , 0135361 , 0053721 , 0020441 , 0053203 ,
0134077 , 0141725 , 0160277 , 0130612 , 0132417 , 0040372 , 0100363 , 0060200 ,
0130432 , 0175052 , 0171064 , 0034147 ,
};
static unsigned short APGD[40 ] = {
/*0040200,0000000,0000000,0000000,*/
0041035 , 0136420 , 0030124 , 0140220 , 0041255 , 0017432 , 0034447 , 0162256 ,
0041212 , 0100456 , 0154544 , 0006321 , 0040705 , 0134026 , 0127154 , 0123414 ,
0040213 , 0051612 , 0044470 , 0172607 , 0037313 , 0143362 , 0053273 , 0157051 ,
0036234 , 0144322 , 0054536 , 0007264 , 0034767 , 0146170 , 0054265 , 0170342 ,
0033270 , 0102777 , 0167362 , 0073631 , 0031307 , 0040644 , 0167103 , 0021763 ,
};
#endif
#ifdef IBMPC
static unsigned short APGN[44 ] = {
0 xaf5b, 0 x5f87, 0 x351f, 0 xbfa2, 0 x5c76, 0 x1ff7, 0 x64db, 0 xbfe4, 0 x7e49,
0 xc221, 0 x564a, 0 xbffb, 0 x0b07, 0 x7f6e, 0 x0916, 0 xbff8, 0 x6edb, 0 xd8b0,
0 x0910, 0 xbfe2, 0 x9903, 0 x0d8c, 0 x234b, 0 xbfba, 0 x50df, 0 x7f6c, 0 x6c54,
0 xbf83, 0 x2ad0, 0 x2424, 0 x2afa, 0 xbf3e, 0 xf631, 0 xbc17, 0 xf87a, 0 xbee7,
0 x6c10, 0 x501e, 0 xe81f, 0 xbe81, 0 x870d, 0 x5e46, 0 x5f45, 0 xbe03,
};
static unsigned short APGD[40 ] = {
/*0x0000,0x0000,0x0000,0x3ff0,*/
0 x9812, 0 x060a, 0 xb7a2, 0 x4023, 0 xfc96, 0 x4724, 0 xa3e3, 0 x4035,
0 x819a, 0 xdb2c, 0 x5025, 0 x4031, 0 x94e2, 0 xd5cd, 0 xb702, 0 x4018,
0 x1eb1, 0 x4927, 0 x6a71, 0 x3ff1, 0 x7bc5, 0 x4ad7, 0 x78de, 0 x3fb9,
0 xc1d7, 0 x4b2b, 0 x991a, 0 x3f73, 0 xbe1c, 0 x0b16, 0 xf98f, 0 x3f1e,
0 x4ef3, 0 xfdde, 0 x10bf, 0 x3eb7, 0 x647e, 0 x9dc8, 0 xe834, 0 x3e38,
};
#endif
#ifdef MIEEE
static unsigned short APGN[44 ] = {
0 xbfa2, 0 x351f, 0 x5f87, 0 xaf5b, 0 xbfe4, 0 x64db, 0 x1ff7, 0 x5c76, 0 xbffb,
0 x564a, 0 xc221, 0 x7e49, 0 xbff8, 0 x0916, 0 x7f6e, 0 x0b07, 0 xbfe2, 0 x0910,
0 xd8b0, 0 x6edb, 0 xbfba, 0 x234b, 0 x0d8c, 0 x9903, 0 xbf83, 0 x6c54, 0 x7f6c,
0 x50df, 0 xbf3e, 0 x2afa, 0 x2424, 0 x2ad0, 0 xbee7, 0 xf87a, 0 xbc17, 0 xf631,
0 xbe81, 0 xe81f, 0 x501e, 0 x6c10, 0 xbe03, 0 x5f45, 0 x5e46, 0 x870d,
};
static unsigned short APGD[40 ] = {
/*0x3ff0,0x0000,0x0000,0x0000,*/
0 x4023, 0 xb7a2, 0 x060a, 0 x9812, 0 x4035, 0 xa3e3, 0 x4724, 0 xfc96,
0 x4031, 0 x5025, 0 xdb2c, 0 x819a, 0 x4018, 0 xb702, 0 xd5cd, 0 x94e2,
0 x3ff1, 0 x6a71, 0 x4927, 0 x1eb1, 0 x3fb9, 0 x78de, 0 x4ad7, 0 x7bc5,
0 x3f73, 0 x991a, 0 x4b2b, 0 xc1d7, 0 x3f1e, 0 xf98f, 0 x0b16, 0 xbe1c,
0 x3eb7, 0 x10bf, 0 xfdde, 0 x4ef3, 0 x3e38, 0 xe834, 0 x9dc8, 0 x647e,
};
#endif
#ifdef ANSIPROT
extern double fabs(double );
extern double exp(double );
extern double sqrt(double );
extern double polevl(double , void *, int );
extern double p1evl(double , void *, int );
extern double sin(double );
extern double cos(double );
#else
double fabs(), exp(), sqrt();
double polevl(), p1evl(), sin(), cos();
#endif
int airy(x, ai, aip, bi, bip) double x, *ai, *aip, *bi, *bip;
{
double z, zz, t, f, g, uf, ug, k, zeta, theta;
int domflg;
domflg = 0 ;
if (x > MAXAIRY) {
*ai = 0 ;
*aip = 0 ;
*bi = MAXNUM;
*bip = MAXNUM;
return (-1 );
}
if (x < -2 .09 ) {
domflg = 15 ;
t = sqrt(-x);
zeta = -2 .0 * x * t / 3 .0 ;
t = sqrt(t);
k = sqpii / t;
z = 1 .0 / zeta;
zz = z * z;
uf = 1 .0 + zz * polevl(zz, AFN, 8 ) / p1evl(zz, AFD, 9 );
ug = z * polevl(zz, AGN, 10 ) / p1evl(zz, AGD, 10 );
theta = zeta + 0 .25 * PI;
f = sin(theta);
g = cos(theta);
*ai = k * (f * uf - g * ug);
*bi = k * (g * uf + f * ug);
uf = 1 .0 + zz * polevl(zz, APFN, 8 ) / p1evl(zz, APFD, 9 );
ug = z * polevl(zz, APGN, 10 ) / p1evl(zz, APGD, 10 );
k = sqpii * t;
*aip = -k * (g * uf + f * ug);
*bip = k * (f * uf - g * ug);
return (0 );
}
if (x >= 2 .09 ) /* cbrt(9) */
{
domflg = 5 ;
t = sqrt(x);
zeta = 2 .0 * x * t / 3 .0 ;
g = exp(zeta);
t = sqrt(t);
k = 2 .0 * t * g;
z = 1 .0 / zeta;
f = polevl(z, AN, 7 ) / polevl(z, AD, 7 );
*ai = sqpii * f / k;
k = -0 .5 * sqpii * t / g;
f = polevl(z, APN, 7 ) / polevl(z, APD, 7 );
*aip = f * k;
if (x > 8 .3203353 ) /* zeta > 16 */
{
f = z * polevl(z, BN16, 4 ) / p1evl(z, BD16, 5 );
k = sqpii * g;
*bi = k * (1 .0 + f) / t;
f = z * polevl(z, BPPN, 4 ) / p1evl(z, BPPD, 5 );
*bip = k * t * (1 .0 + f);
return (0 );
}
}
f = 1 .0 ;
g = x;
t = 1 .0 ;
uf = 1 .0 ;
ug = x;
k = 1 .0 ;
z = x * x * x;
while (t > MACHEP) {
uf *= z;
k += 1 .0 ;
uf /= k;
ug *= z;
k += 1 .0 ;
ug /= k;
uf /= k;
f += uf;
k += 1 .0 ;
ug /= k;
g += ug;
t = fabs(uf / f);
}
uf = c1 * f;
ug = c2 * g;
if ((domflg & 1 ) == 0 )
*ai = uf - ug;
if ((domflg & 2 ) == 0 )
*bi = sqrt3 * (uf + ug);
/* the deriviative of ai */
k = 4 .0 ;
uf = x * x / 2 .0 ;
ug = z / 3 .0 ;
f = uf;
g = 1 .0 + ug;
uf /= 3 .0 ;
t = 1 .0 ;
while (t > MACHEP) {
uf *= z;
ug /= k;
k += 1 .0 ;
ug *= z;
uf /= k;
f += uf;
k += 1 .0 ;
ug /= k;
uf /= k;
g += ug;
k += 1 .0 ;
t = fabs(ug / g);
}
uf = c1 * f;
ug = c2 * g;
if ((domflg & 4 ) == 0 )
*aip = uf - ug;
if ((domflg & 8 ) == 0 )
*bip = sqrt3 * (uf + ug);
return (0 );
}
Messung V0.5 in Prozent C=95 H=92 G=93