# HG changeset patch # User Arun Giridhar # Date 1650229059 14400 # Node ID 84944164799ed15f47fcb8d59d8bc0a931e37cda # Parent 5d410755481ee2cb7fdf3cb6646c64acbde1f096 besselj.cc: Add BISTs for the function airy, remove FIXME (bug #62321) diff -r 5d410755481e -r 84944164799e libinterp/corefcn/besselj.cc --- a/libinterp/corefcn/besselj.cc Sat Apr 16 12:46:22 2022 -0700 +++ b/libinterp/corefcn/besselj.cc Sun Apr 17 16:57:39 2022 -0400 @@ -718,9 +718,25 @@ } /* -FIXME: Function airy does not yet have BIST tests +%!test <*62321> +%! assert (airy (0, 1, false), 0.1352924163128814, 1e-14) +%! assert (airy (0, -1, false), 0.5355608832923521, 1e-14) +%! assert (airy (0, i, false), 0.3314933054321411 - 0.3174498589684437i, 1e-14) +%! assert (airy (0, -i, false), 0.3314933054321411 + 0.3174498589684437i, 1e-14) +%! assert (airy (0, 1, true), 0.2635136447491401, 1e-14) +%! assert (airy (0, -1, true), 0.4208904755499093 - 0.3311746779333462i, 1e-14) +%! assert (airy (0, i, true), 0.2743053542644657 - 0.08256069414005915i, 1e-14) +%! assert (airy (0, -i, true), 0.2743053542644657 + 0.08256069414005915i, 1e-14) + +%!error (airy ()) +%!error (airy (0, 1, 2, 3)) +%!error (airy ("foo", 2, false)) +%!error (airy (3743, 2, false)) +%!error (airy (0, 2, "foo")) +%!error (airy (0, "foo", false)) */ + /* ## Test values computed with GP/PARI version 2.3.3 %!shared alpha, x, jx, yx, ix, kx, nix