changeset 30946:e7032ef9a9c3

besselj.cc: Add some more BISTs to function airy (bug #62321) besselj.cc: Add BISTs to check scaling relationships for airy and biry.
author Arun Giridhar <arungiridhar@gmail.com>
date Mon, 18 Apr 2022 20:32:33 -0400
parents e0aabe59c1aa
children 74f8854958d2
files libinterp/corefcn/besselj.cc
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/besselj.cc	Mon Apr 18 13:47:16 2022 -0700
+++ b/libinterp/corefcn/besselj.cc	Mon Apr 18 20:32:33 2022 -0400
@@ -759,6 +759,13 @@
 %! assert (airy (3, -1,  true),   0.5923756264227923,                       1e-15);
 %! assert (airy (3, +i,  true),   0.0842735134099415 - 0.0804106412111761i, 1e-15);
 %! assert (airy (3, -i,  true),   0.0842735134099415 + 0.0804106412111761i, 1e-15);
+%! z = -1 - 1e-6i;
+%! s1 = exp (2/3 * z * sqrt(z));
+%! s2 = exp (-abs (real (2/3 * z * sqrt(z))));
+%! assert (airy (0, z, true), s1 * airy (0, z, false), 1e-15);
+%! assert (airy (1, z, true), s1 * airy (1, z, false), 1e-15);
+%! assert (airy (2, z, true), s2 * airy (2, z, false), 1e-15);
+%! assert (airy (3, z, true), s2 * airy (3, z, false), 1e-15);
 
 Input validation tests
 %!error airy ()