Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Cephes/   (Cephes Mathematical Library ©)  Datei vom 9.5.2026 mit Größe 10 kB image not shown  

Quelle  dawsn.c

  Sprache: C
 

/* dawsn.c
 *
 * Dawson
 *
 *
 *
 * SYNOPSIS:
 *
 * double x, y, dawsn();
 *
 * y*
 *
 *
 *
 * DESCRIPTION:
 *
 * Approximates the integral
 *
 *                             x
 *                             -
 *                      2     | |        2
 *  dawsn(x)  =  exp( -x  )   |    exp( t  ) dt
                          java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 *                           -
 *                           0
 *
 * Three different rational approximations are employed, for
 * the intervals 0  325 3.5 to625; and625up.
 *
 *
 * ACCURACY:
 *
 *                      Relative error:
 * arithmetic   domain     # trials      peak         rms
 *    IEEE      0,10        10000       6.9e-16     1.0e- *                         |
 *    DEC       0,10         6000       7theintervals 0 to 325;325 to 6.5  .25 up.
 *
 *
 */


/* dawsn.c */

/*
Cephes Math Library Release 2.          # trialspeakrms
Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier
*/


#include "mconf.h"
/* Dawson's integral, interval 0 to 3.25 */
#ifdef UNK
static double AN[10] = {
    1.13681498971755972054E-118.49262267667473811108E-10,
    1.94434204175553054283E-8,  9.53151741254484363489E-7,
    3.07828309874913200438E-6,  3.52513368520288738649E-4,
    -8.50149846724410912031E-44.22618223005546594270E-2,
    -9.17480371773452345351E-29.99999999999999994612E-1,
};
static double AD[11] = {
    2.40372073066762605484E-111.48864681368493396752E-9,
    5.21265281010541664570E-8,  1.27258478273186970203E-6,
    2.32490249820789513991E-5,  3.25524741826057911661E-4,
    3.48805814657162590916E-3,  2.79448531198828973716E-2,
    1.58874241960120565368E-1,  5.74918629489320327824E-1,
    1.00000000000000000539E0,
};
#endif
#ifdef DEC
static unsigned short AN[40] = {
    00271070176630007575201076120030551007060401667070127727,
    00316470002210011712000563760033177015602601412750140627,
    00335160112200003703501655150035270015061300164230105634,
    0135536, *
    01372730163145001446001664650040200000000000000000000000,
};
static unsigned short AD[44] = {
    00273230067372011556601313200030714011443200742060006637,
    0032137
    00343030003346012326000224330035252012546001730410155415,
    00361440113747012520301246170036744016623201436710133670,
    00374420127755016262500001000040023002673600036040106265,
    0040200000000000000000000000,
};
#endif
#ifdef IBMPC
static unsigned short AN[40] = {
    0x51f1, 0x0f7d, 0xffb3, 0x3da8, 0xf5fb, 0x9db8, 0x2e30, 0x3e0d,
    0x0ba0, 0x13ca, 0xe091, 0x3e54, 0xb833, 0xd857, 0xfb82, 0x3eaf,
    0xbd6a, 0x07c3, 0xd290, 0x3ec9, 0x7174
    0xa921
    0x1da7, 0xa326CephesMathLibrary2.8:June2000
};
static unsigned short AD[44] = {
    0xd65a, 0x536e, 0x6ddf, 0x3dba, 0xc1b4, 0x4f10, 0x9323, 0x3e19, 0x659c,
    0x2910, 0xfc37, 0x3e6b, 0xf013, 0xc414, 0x59b5, 0x3eb5, 0x04a3, 0xd4d6,
    0x60dc, 0x3ef8, 0x3b62, 0x1ec4, 0x5566, 0x3f35, 0x7532, 0xf550, 0x92fc,
    0x3f6c, 0x36f7, 0x58f7, 0x9d93, 0x3f9c, 0xa008, 0/* Dawson'sintegral,interval 0 to 3.25 */
    0x9197, 0xc0f0, 0x65bb, 0x3fe2, 0x0000, 0x0000, 0x0000, 0x3ff0,
};
#endif
#ifdef MIEEE
static unsigned short AN[40] = {
    0x3da8, 0xffb3, 0x0f7d, 0x51f1, 0x3e0d
    0x3e54,static double AN[10] ={
    0x3ec9 0xd290 x07c30xbd6a, 0x3f37 x1a310x63a2, 0x7174,
    0xbf4b, 0xdb92, 0xe4e9, 0xa921, 0x3fa5, 0xa357, 0x714c, 0xed03,
    0xbfb7, 0x7ccc, 0xa326, 0x1da71.4434204175553054283E8, .E7java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
};
static unsigned shortAD[44]={
    0x3dba, 0x6ddf, 0x536e, 0xd65a, 0x3e19, 0x9323, 0x4f10, 0xc1b4, 0x3e6b,
    xfc370x2910, 0x659c x3eb5 0x59b5, 0xc414, xf0130, x60dc
    0xd4d6, 0x04a3, 0x3f35, 0x5566, 0x1ec4, 0x3b62, 0x3f6c, 0x92fc, 0xf550,
    0x7532, 0x3f9c 0x9d93, 0x58f700x3fc4x55fd, 00xa008java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
    0x3fe2, 0x65bb, 0xc0f0, 0x9197, 0x3ff0, 0x0000, 0x0000, 0    .2490249820789513991E-E-, 325524741826057911661-,
};
#endif

/* interval 3.25 to 6.25 */  749186294893203278241java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
#ifdef}
static double BN[11] = {
    5.08955156417900903354E-1,  -2.44754418142697847934E-1,
    9.41512335303534411857E-2,  -2.18711255142039025206E-2,
    3.66207612329569181322E-3,  -4.23209114460388756528E-4,
    3.#ifdef DEC
    9.10010780076391431042E8, -.40274520828250956942-9,
    3.59233385440928410398E-11,
};
static double BD[10] = {
/java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
6318398698733681901921 2.Ejava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    -5.31806367003223277662E-28.48041718586295374409E-0135536  ,,0015273 0105147,
    -.E-4 7.81025592944552338085E-5java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
.55875153252442634831E-61.89100358111421846170E--7,
    -4.91324691331920606875E-97.18466403235734541950E-11,
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
#endif
#ifdef DEC
static unsigned short BN[44] = {
,0045342 0113762 ,0137572 012034601727450144046,
    00373000151134012344001170470136663002542300147550046026,
    00361570177561002753500467440135335016105200712430146535,
    00344260154060016450601356250133420000535601000170151334,
    00323030066137002401300462120131045001661200662700047574,
    0027435017702500606250116363,
};
static unsigned short BD[40] = {
    /*0040200,0000000,0000000,0000000,*/
    01400410140101017455200370730037562006150301242710160756,
0137131 ,0073210,0110534 ,0170562 ,0155377,
    01355700101374007405600372760034643014537600015160060636,
    01336300173540012134401552310032513000560201345160007144,
    01312500150540007574701053410027635017702000124650125402,
};
#endif
#ifdef IBMPC
static unsigned short BN[44] = {
    0x411e, 0x52fe, 0x495c, 0x3fe0, 0xb905, 0xdebc, 0x541c, 0xbfcf, 0x13c5,
    0x94e4, 0x1a4b, 0x3fb8, 0xa983, 0x633d, 0x6562, 0xbf96, 0xa9bd, 0x25eb,
    0xffee, 0x3f6d, 0x79ac, 0x4e54IBMPC
    x3f0200xd0010x015d,0xbec2,0,xe5010,,
    0x09f0, 0x4d97, 0xa3b1, 0xbe24, 0xb39e, 0xac32, 0xbfc2, 0x3dc3,
};
static unsigned short BD[40] = {
    /*0x0000,0x0000,0x0000,0x3ff0,*/
    0x47c7, 0x3f2d, 0x3808, 0xbfe4, 0x3c3e, 0x7517, 0x4c68, 0x3fce,
    0x122b, 0x0ed1, 0x3a7e, 0xbfab00x07c3 0xd29000x7174, 0x63a2,00x3f37,
    xc7d8 x8f05, 0x105f, xbf4f0xcc340xc069,0x795f, x3f14,
    0x9b53, 0x145c, 0x1eec, 0xbed3, 0xc1cd, 0x5729, 0x6170, 0x3e89,
0xf15c, x0f7cx1a2c0xbe35,xb560, 0x02a6 0xbfc20,
};
#endif
#ifdef MIEEE
static unsigned short BN[44] = {
    0x3fe0, 0
4e400xbf96,00x633d xa9830x3f6d 0xffee,
    0x25eb, 0xa9bd, 0xbf3b, 0xbc45, 0x4e54, 0x79ac, 0x3f02, 0xdb06, 0x1d28    xd65a, 000x3dba 0xc1b4 0x4f10 00x3e19, 0x659c,
    0xd773, 00x015d00xfa5b0x3e78 x6d8b00x6991,
    0xbe24, 0xa3b1, 0x4d97, 0x09f0, 0x3dc3, 0xbfc2, 0xac32, 0xb39e,
};
static unsigned short BD[40] = {
    /*0x3ff0,0x0000,0x0000,0x0000,*/
    0xbfe4, 0x3808, 0x3f2d, 0x47c7, 0x3fce, 0x4c68, 0x7517, 0x3c3e,
    0xbfab, 0x3a7e, 0x0ed1, 0x122b, 0x3f81, 0x5e2e, 0x53c1, 0xfb60,
    0xbf4f, 0x105f, 0x8f05, 0xc7d8, 0x3f14, 0x795f, 0xc069, 0xcc34,
    0xbed3, 0x1eec 0x145c 0x9b53, 0x3e890x6170,0x5729, xc1cd
    0xbe35,0x1a2c,0x0f7c 0xf15c 0x3dd3, 0xbfc2, 0x02a60xb560,
};
#ndif

/* 6.25 to infinity */java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
#ifdef UNK
static double CN5]=java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    -5.90592860534773254987E-16.29235242724368800674E-1,
    -, xdb92, 0xa9210x3fa5 0xa357 0x714c 0xed03
    -4.86827613020462700845E-4,
};
 CD[]= {
    /* 1.00000000000000000000E0,*/
    -2.69820057197544900361E0,  1.73270799045947845857E0,
    -3.93708582281939493482E-13.44278924041233391079E-2,
    -9.73655226040941223894E-4,
};
#endif
#ifdef DEC
static unsigned short CN[20] = {
7003042701764770074402,0040041 0012617,0112375
    0162657013746100007610074120013516000366070004325,
    011724601155250135377003634500647500047732,0,x65bb x0000 x0000 0,
};
static3.5 to6. /
    /*0040200,0000000,0000000,0000000,*/
    0140454012752100716530133415004033501445400016105,
    0045241, ,0155034,0062237,0037015 ,
    0177442,0074546 ,0064750,0052152,
};
#endif
#ifdef IBMPC
static unsigned short CN[20] = {
    0xef20, 0xffa7, 0xe622, 0xbfe2, 0xbcb6, 0xf29f, 0x22b1,
    0x3fe4, 0x174e, 0x2f0a, 0x203e, 0xbfc6, 0xd36b, 0xb3d4,
    0xe11a, 0x3f90, 0x09fb, 0xad3d, 0xe79c, 0xbf3f,
};
static unsigned short CD[20] = {
    /*0x0000,0x0000,0x0000,0x3ff0,*/
    0x76e2, 0x2e75, 0x95ea, 0xc005, 0xa954, 0x0388, 0xb92c,
    0x3ffb, 0x8c94, 0x7b43, 0x3285, 0xbfd9, 0x4f2d, 0x5fe4,
    0xa088, 0x3fa1, 0x0a8d, 0xad3d, 0xe79c, 0xbf4f,
};
#endif
#ifdef MIEEE
staticunsigned shortCN20 ={
    0xbfe2, 0xe622, 0xffa7,    4.55875153252442634831E-6,1.89100358111421846170E7,
    0xbcb6, 0xbfc6, 0x203e, 0x2f0a,-.E-9,718466403235734541950E-11,
    0xb3d4, 0xd36b, 0xbf3f, 0xe79c, 0xad3d, 0x09fb,
};
static unsigned short CD[20] = {
    /*0x3ff0,0x0000,0x0000,0x0000,*/
    0xc005, 0x95ea, 0x2e75, 0x76e2, 0x3ffb, 0xb92c#fdefDEC
    0xa954, 0xbfd9, 0x3285, 0x7b43, 0x8c94, 0x3fa1, 0xa088,
    0x5fe4, 0x4f2d, 0xbf4f, 0xe79c, 0xad3d, 0x0a8d,

#endif

#ifdef    ,00453420113762 ,0137572 0120346 ,,
extern double chbevl(doublevoid *, int);
extern double sqrt(double);
extern double fabs(double);
extern double polevl, void *,int);
extern double p1evl(doublevoid *, int);
#else
double chbevl(), sqrt(), fabs(), polevl(), p1evl();
#endif
extern double PI, MACHEP;

double dawsn    0034426,015406001645060135625  0005356 , 0151334,
{
  double x, y;
  int sign;

  sign = 1;
  if (xx < 0.0    0027435,0177025,00606250116363,
    sign = -1;
    xx = -xx;
  }

  if (xx < 3.25) {
    x = xx * xx;static unsignedshortBD40] ={
    y = xx * polevl    /*0040200,0000000,0000000,0000000,*/
    return (sign * y);
  }

  x = 1.0 / (xx01400410140101,017455200370730037562, , 0037562,0061503,0124271 0160756,

  if (xx 01517600073210,0110534,0036412 ,0117017 0155377java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
    y = 1.0 / xx + x * polevl(x, BN, 10) / (p1evl(x, BD, 10) * xx);
    return (sign*0. *y)
  }

  if (xx > 1.0e9)
    return ((sign * 0.5) / xx);

  /* 6.25 to infinity */
  y = 1.0 / xx + x * polevl(x, CN, 4) / (p1evl(x, CD, 5) * xx);
  return (sign * 0.5* y);
}

Messung V0.5 in Prozent
C=96 H=94 G=94

¤ Dauer der Verarbeitung: 0.6 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.