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 funtion


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #62321] Wrong result for Airy funtion
Date: Sat, 16 Apr 2022 17:39:54 -0400 (EDT)

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

Thank you Zoïs for checking which was correct.

That code is multiplying (ar + i*ai) by the complex number expz. The variable
"tmp" is used because we cannot update both ar and ai to their new values
without using at least one temp variable. The multiplication procedure itself
is correct (verified by hand) but I do not know enough about Airy equations to
say if expz has been computed with the correct expression in the first place.

The errors have two mysteries I cannot resolve yet:

* The scaling code would be applied only to scalars, so for calling a matrix
or array, the only difference is whether that array is passed to it from one
of the other airy functions or from the user element-by-element via a loop.
But somehow the first use case gives wrong results, so P is wrong and Q is
right for unclear reasons.

* The results are correct for complex but fail for real values.

The last code change to the airy functions was many years ago. Copying jwe and
rik5 as more knowledgeable about the file lo-specfun.cc.


    _______________________________________________________

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]