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: Sun, 17 Apr 2022 10:23:07 -0400 (EDT)

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

The problem is with the expression "Complex expz = exp (- 2.0 / 3.0 * z * sqrt
(z));"

When calling "P = airy (0, V)", the values inside the airy function are this
for V(1,1):

        Input: zr = -0.464938  zi = -0
        Raw output: ar = 0.458007  ai = -0.0982673
                z =     (-0.464938, -0)
                expz =  (0.977749, -0.20978)
        Scaled output: ar = 0.427202  ai = -0.192161
        Final output: ar = 0.427202  ai = 0


When calling from a loop "Q(i) = airy (0, V(i))", the values are this for the
same element:

        Input: zr = -0.464938  zi = 0
        Raw output: ar = 0.458007  ai = -0.0982673
                z =     (-0.464938, 0)
                expz =  (0.977749, 0.20978)
        Scaled output: ar = 0.468431  ai = 2.93374e-18
        Final output: ar = 0.468431  ai = 0


Observe that the z = -0.464938 is the same input for both as it should be, but
expz for the first is (0.977749, -0.20978) and expz for the second case is
(0.977749, 0.20978). The second case is correct according to external
validation of airy, so for some reason exp is returning the wrong complex
conjugate for the first case.

Is this because of exp or is it because of sqrt?


    _______________________________________________________

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]