octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #62321] Wrong result for Airy function


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #62321] Wrong result for Airy function
Date: Mon, 18 Apr 2022 17:26:56 -0400 (EDT)

Follow-up Comment #27, bug #62321 (project octave):

Some data comparing the Octave scaling to the Fortran scaling for airy and
biry:

K      Nmax (Octave)      Nmax (Fortran)
1.      107                103
1      107                103
2      104                103
3      104                103

For K = 0 and 1, the larger N values yield 0. For K = 2 and 3 they yield Inf
or "Inf + Infi".

Here is a performance comparison.

This is for the Octave scaling:

octave:2> for K = 0:3, tic; for n = 1:1e6, airy (K, -1-i); end; toc, end
Elapsed time is 5.55388 seconds.
Elapsed time is 5.57121 seconds.
Elapsed time is 5.31694 seconds.
Elapsed time is 5.31827 seconds.


This is for the Fortran scaling:

octave:2> for K = 0:3, tic; for n = 1:1e6, airy (K, -1-i); end; toc, end
Elapsed time is 5.39528 seconds.
Elapsed time is 5.39728 seconds.
Elapsed time is 5.27584 seconds.
Elapsed time is 5.27875 seconds.


So the Fortran scaling is marginally faster while being marginally less
accommodating of large inputs, compared to the Octave scaling.

What are your thoughts on which one to use?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62321>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]