DYNAMICAL CONTROL OF ACCURACY USING THE STOCHASTIC ARITHMETIC TO ESTIMATE DOUBLE AND IMPROPER INTEGRALS

The CESTAC (Control et Estimation STochastique des Arrondis de Calculs) method is based on a probabilistic approach of the round-off error propagation which replaces the floating-point arithmetic by the stochastic arithmetic. This is an efficient method to estimate the accuracy of the results. In this paper, we present the reliable schemes using the CESTAC method to estimate the definite double integral ∫ ∫ = b

, where R, by applying the trapezoidal or Simpson's rule.For each kind of integrals, we prove a theorem to show the accuracy of the results.According to these theorems, one can find an optimal value number of the points which we can find the best approximation of I from the computer point of view.Also, we observe that by using the stochastic arithmetic, we are able to validate the results.
Key Words-Stochastic Arithmetic, CESTAC method, Simpson's and Trapezoidal rules, Double and Improper integrals .

1.INTRODUCTION
We can use the CESTAC method which is a method based on stochastic arithmetic [4][5][6][7][8]10], in order to evaluate a definite or an improper integral numerically.At first, we introduce the following definition which has been mentioned in [ ] 2. for all real numbers a, +∞ = a a C , .One can use this definition in order to find the accuracy of the integration methods.In this case, we need the number of the exact significant digits of the computed result i. e. the number of the digits which are common between the computed and the exact values.place in parallel.In this case, a new arithmetic called stochastic arithmetic is defined.The definitions and properties of the stochastic arithmetic have been explained in [ ] . Also, some of the applications of this arithmetic have been presented in . The basic idea of the CESTAC method [ ] 10 , 9 , 8 is to replace the usual floating-point arithmetic with a random arithmetic.Consequently, each result appears as a random variable.In order to simultaneous implementation of the CESTAC method, one should substitute the stochastic arithmetic instead of the floating-point arithmetic.In this way one runs every arithmetical operation N times synchronously before running the next operation.
This method is able to detect numerical instabilities which occur during the run and estimate accuracy of the computed results.During the run, as soon as the number of the significant digits of any result becomes zero, an informatical zero is detected and the result is printed by the notation @0.
Let F be the set of all the values representable in the computer.Thus, any real value r is represented in the form of F R ∈ in the computer.In the binary floating-point arithmetic with P mantissa bits, the rounding error stems from assignment operator is, , where, ε is the sign of r and α is the lost part of the mantissa due to round-off error and E is the binary exponent of the result.For a personal computer, in single precision case, 24 = P and in double precision case, 53 = P .According to (2), in order to perturb the last mantissa bit of the value r then, it is sufficient that the value α is considered as a random variable uniformly distributed on [ ] 1 , 1 − (perturbation method).Thus R , the calculated result, is a random variable and its precision depends on its mean ) (µ and its standard deviation ).(σ The idea of CESTAC method is to consider that every result F R ∈ of a floating-point operation corresponds to two informatical results, one rounded off from below ) ( − R , the second rounded off from above ) ( + R , each of them representing the exact arithmetical result r , with equal validity.If a computer program is performed N times, the distribution of the results , ,..., 1 , N i R i = is quasi-Gaussian which their mean is equal to the exact real value r , that is , ) ( r R E = [10,15].This N samples are used for estimating the values µ and σ .In practice, the samples i R are obtained by perturbation of the last mantissa bit or previous bits (if necessary) of every result R , then the mean of random samples , i R R , is considered as the result of an arithmetical operation.In the CESTAC method if , 0 , ≤ r R

C
the informatical result R is insignificant and it means a numerical instability exists in its related line in the computer program.
The value N can be chosen any natural number like 2,3,5,7, but in order to avoid the execution time, usually N =3.In this case, the number of exact significant digits common to R and to the exact value r can be estimated by [15], , 39 .0 log where, σ is the standard deviation of the samples i R .In the relation , there is an instability in the evaluated result.in this case, R is called an informatical or stochastic zero and it is denoted by .0 @ = R By using of stochastic arithmetic, sudden losses of accuracy , numerical instabilities and the appearance of an insignificant result (stochastic zero) are detected.
In section 2, the evaluation of the definite double integral ) , ( by using the double Simpson's rule is considered.For this purpose, we apply the CESTAC method and present an algorithm to find the optimal number of the step sizes N, and validate the results.In this case, we present a theorem to show the accuracy of the evaluation the definite double integral I .
In section 3, the improper integral , where ∈ a R, is considered.For this purpose, the Simpson's rule is applied.At first, a theorem is proved to show the accuracy of this rule in order to compute I .Then, the CESTAC method is used to present the algorithm and validate the results of the numerical example .In this case, an optimal natural number m is obtained so that In each section, we compute a sample example to show the results of the research.The programs have been provided by Visual Fortran in double precision.

It has been proved in [ ]
7 , one can use the stochastic arithmetic in order to estimate I by using the trapezoidal or Simpson's rule.This idea was developed generally for the Closed Newton-Cotes integration rules in [1] .If these rules are used to estimate I , if it exists, one can find the optimal number of the points, which minimizes the error.For this purpose, the stochastic arithmetic and the CESTAC method can be used to guarantee the number of the exact significant digits and to find the accuracy of these rules.
We can develop the mentioned method for estimating the definite double integral . In this case, we apply the double Simpson's rule [6], and present an algorithm to find the best approximation for I with optimal step sizes h and k .At first, we recall some preliminaries about numerical solution of a double integral and the error of it.Then, we present a theorem to show the accuracy of the results and the algorithm of evaluating the double integral in the stochastic arithmetic.We consider the double Integral where, where, . As mentioned in [6] In order to propose the numerical accuracy of evaluating a double integral using the double Simpson's rule, at first the following proposition about the error term is proved.
Now, we find the values γ β α , , and η such that this formula be exact for all polynomials with two variables and degree at most 4.For this purpose, from (4), we set the following system for ., , , ) , ( For this purpose, it is sufficient to apply the following relation for these polynomials.Consequently, the order of the error for this formula is ) (

NUMERICAL ACCURACY OF EVALUATING AN IMPROPER INTEGRAL
In this section, a theorem is explained which is used in order to evaluate the improper integral then, as it has been mentioned in [1,7], the error term can be written as follows, ). ).
By using the definition 1.1,

−
not any significant digits, m I , is an approximation of I which minimizes the error, and m is the local optimal number which after this number the computations are useless.Also, since ε tends to zero when increases, the last term in ( 11) is negligible.We can present the similar discussion for the Simpson's rule.In this case, the following relation is proved. .We note that, the optimal number of m must be the same value for both of the rules but, from (13), the Simpson's rule is faster than and the approximate value of n m I , is more accurate than the trapezoidal rule.In table 2, we present the results of the example 2 by applying the trapezoidal and Simpson's rules.As we observe, the optimal number of m is the same value for both of rules and in other words it is independent from the rule which is applied.

Example 2 In this example, the improper integral
2 ) 1 ( cos 5.778636748954609E-001 is computed [13].In this case, So, we can easily see that the conditions of the theorem 3.1 are satisfied.According to the table 2, we conclude that, the approximate value for I using the trapezoidal rule is 5.778636748954596E-001 and using the Simpson's rule is 5.778636748954605e-001 with the same optimal value m=16384.

CONCLUDING REMARKS
The numerical solution of a definite integral is an important matter in integration discussions.In this paper, we observe that by using the CESTAC method based on the stochastic arithmetic, one can use the numerical integration rules to approximate a definite or improper integral and validate the result step by step.According to the theorems, one can find an optimal value of the points so that the computed result is the best approximation from the computer point of view.We have shown that, it is possible during the run of the code the integration rules, to determine the optimal number of the points, to correctly stop the process, and to estimate the accuracy of the computed result using the mentioned integration rules.

1
Let a and b be two real numbers, the number of significant digits that are common to a and b , denoted by Also, we can easily show that this formula is exact for the polynomial of degree 5

1 C and 2 C
definition 1.1 and proposition 2.1, the following theorem about the accuracy of the applied method to estimate I is proved Theorem 2.1 Let n m I , be the approximate value of I computed using the composite Simpson's rule over R with are constants which are independent of h and k.Hence,

3 .Example 1
relation(6) shows that the number of significant digits in common between in common with the exact value of integral in companion with the term common with I up to less than 1 bit.Also, for m and n large enough, Evaluate the approximate value of I by using the Simpson's rule in the stochastic arithmetic and call it sumhk, 4. If |ssumhk-sumhk|=@0 then write sumhk,m,n and stop else set ssumhk ← sumhk, n ← 2n and m ← 2m and go to step 3. Now, we evaluate a double integral which is computed by the mentioned algorithm and show the accuracy of results.In this example, we consider the double integral .The exact value of the integral is I =0.42955452754827395.The results are shown in table3.In this case, the optimal value of points are 1024 it exists, one can find a natural number m such that .In this case, m I is a definite integral and as we explained in section 3, we can use the stochastic arithmetic in order to compute it and find the optimal number of the points m opt n to find a satisfactory approximation for m I .In this case, if m is large enough then ) ( term of the above relation is almost zero.Furthermore, from(12), the second term of this relation is 11), the number of the common significant digits between to the number of the common significant digits between m I , and the exact value of I in company with the term | , in order to estimate I , at first, we apply the

Table 1 (
The results of the Example 1)

Table 2 (
Comparison of the Trapezoidal and Simpson's rules in example 2)