Numerical computation in Java -


OK, I'm trying to use the Apache Commons Math library to do a double integral calculation, but these Both are from negative infinity (about 1) and it is taking ages to compute what are other ways to do such operations in Java? Or should it run "fast" (I mean I could see the results a few days before I died) and I am doing something wrong?

EDIT: OK, thanks for the answer I am trying to calculate this Gaussian Kopla:

Then we have a standard biwereut normal cumulative distribution function, which argues as two busy standard normal cumulative distribution tasks and I need an integer to accept this (I know for standard normal cumulative distribution Che Commons is a Math function but I failed to find inverse and biweekt versions.)

EDIT2: As my friend once said, "Ah is the beauty of java, whatever you want to do, No one has already done "I found everything there is a great library for the possibility of here. There are two problems with infinite accompaniment: convergence and value-of-convergence. That is, integral is also united? If so, what value is it united? Consolidation which is guaranteed to be united, but it is not really possible to determine the value of which (underlying from 1 ^ e ^ (- x ^ 2)). If this can not be absolutely correct, then a precise answer is not mathematically possible, which only leaves the approximation. Apache Commons uses several different approximation schemes, but all require the use of finite boundaries for accuracy.

The best way to get the right answer is to constantly evaluate the accumulated magnitude with increasing boundaries, and compare the results in the proxy code, something like this:

  Double DELTA = 10 ^ -6 // Your error limit here is double STEP_SIZE = 10.0; Double old value = double.mx_avn; Double Novel = Old Price; Double lower bound = -10; // or whatever you want to start with - (-infinity, 1), I want to start with something like / -10 double upper bound = 1; Do {oldValue = newValue; Lowerbound- = STEP_SIZE; NewValue = integrated (bottom bound, upper bound); // make your integration methods here; (mathematics.bas (new-year-old value)> DELTA); Eventually, if integral converges, then you will find important stuff in widening the boundaries will not produce further meaningful information. 

Though intelligent: Although there is no integral convergence, such a thing can be spoiled explosively. In that situation, one of the two situations can be: either your ending condition is never satisfied and you come into an infinite loop, or the value of integral oscillates around the value of indefinitely, which Incorrectly satisfied end position (maybe wrong result).

To avoid having to move first, it is best to keep the maximum number of steps before taking it back - by doing so, you should stop the potential infinite loop which can result.

Avoid the other, hope that it does not happen or does not prove that it should be integral (Cheers for 3 calculations 2, any? - -)).

To formally answer your question, no, there is no other way to calculate your calculations in Java, in such a way, in the any language < Em> There are no guaranteed ways to do this with any algorithm - mathematics does not work only in those ways we want them, though, in practice, a lot (though there is no meaning!) Integration of practical integration Are; It is my experience that approximately ~ 20 iterations will give you an estimate of the correct accuracy, and Apache should be fast enough to handle it for a long time.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -