130 A Quelltexte <strong>de</strong>r C++-Programme /*Verwendung <strong>de</strong>r Nag-Routine s15aef zur Berechnung <strong>de</strong>r error-Funktion erf(x), => Aufruf auf <strong>de</strong>r SP2 mit xlC integral.C -DUSE_BENZOL=1 -L/client/lib -lnag <strong>und</strong> ohne inclu<strong>de</strong> */ //extern "C" double s15aef(double *xp, int *ifailp); USHORT fehlerTest=true; //Test auf Ausloeschung <strong>und</strong> bes. // grosse Zahlen USHORT abfrage=false; //Falls bei Fehlermeldung auf Reaktion // gewartet wer<strong>de</strong>n soll USHORT ergebnisBinaerSpeichern=true; //Matrix <strong>de</strong>r Integrale // in INTFILEBIN="molekuel.bin" binaer speichern /**********************************************************/ double Formel1(GtoParameter *Gto, double rik2, double rjl2, double rgd, double r0, double pr0, double qr0, double omega, USHORT i, USHORT j, USHORT k, USHORT l); double Formel2(GtoParameter *Gto, double rik2, double rjl2, USHORT i, USHORT j, USHORT k, USHORT l); double RBetragQuadrat(GtoParameter *Gto, USHORT i, USHORT k); double QR0(double r0, USHORT i, USHORT j, USHORT k, USHORT l); double R0(GtoParameter *Gto, double rgd, USHORT i, USHORT j, USHORT k, USHORT l); double RGammaDelta(double *RGamma, double * RDelta, USHORT i, USHORT j, USHORT k, USHORT l); void R(GtoParameter *Gto, double *R, USHORT i, USHORT k); double Omega(GtoParameter *Gto, USHORT i, USHORT j, USHORT k, USHORT l); USHORT ErgebnisBinaerSpeichern(double Int[MM][MM][MM][MM]); /*-------------------------------------------------------*/ int main() { USHORT i,j,k,l; GtoParameter Gto[MM]; double (*Int)[MM][MM][MM]=NULL; double rik2, rjl2, RGamma[3], RDelta[3], rgd, r0;
A Quelltexte <strong>de</strong>r C++-Programm 131 double omega, qr0, pr0; double pr0s15, r0erf; int ifail; //fuer die nag-Routine double eps = 0.08; //evtl. nur Int >= eps int count; //Integrale < eps zaehlen Fehler FehlerBehandlung(fehlerTest, abfrage); initNewHandler(); Int=new double [MM][MM][MM][MM]; for (i=0;i