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: anonymous
Subject: [Octave-bug-tracker] [bug #62321] Wrong result for Airy funtion
Date: Sat, 16 Apr 2022 07:31:40 -0400 (EDT)

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

                 Summary: Wrong result for Airy funtion
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sat 16 Apr 2022 11:31:38 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Inaccurate Result
                  Status: None
             Assigned to: None
         Originator Name: Zoïs 
        Originator Email: zois.moitier@kit.edu
             Open/Closed: Open
                 Release: 6.2.0
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

I get wrong results when I use the Airy function Ai with a complex matrix. To
be more precise, I have a complex matrix `V` and I compute `airy(0, V)`. The
issue is that the computation with one value `airy(0, V(1, 1))` does not equal
`airy(0, V)(1, 1)`, see code below.


#### setup
nu = [20 200];

w = 1 .+ [0 0.5] .* exp(1i * 1e-6);

[NU, W] = meshgrid(nu, w);

Z = W .* NU ./ (NU .- 1);
ZETA = -power(1.5 .* (sqrt(Z .^ 2 .- 1) .- asec(Z)), 2/3);;
V = power(NU .- 1, 2/3) .* ZETA
##V =
##
## Column 1:
##
##  -4.649384436518988e-01 -                     0i
##  -4.518125470102409e+00 - 3.640776206195730e-06i
##
## Column 2:
##
##  -2.154794036370222e-01 -                     0i
##  -1.923412063083059e+01 - 1.706292717651351e-05i

#### Compare matrix and scalar
airy(0, V)(1, 1)
##ans = 0.427201580339303

airy(0, V(1, 1))
##ans = 0.468430597790334


----

Some additional information:
* I am using version `6.2.0-1` from the Ubuntu repository.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 16 Apr 2022 11:31:38 AM UTC  Name: issue_airy.m  Size: 619B   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=53094>

    _______________________________________________________

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]