From 7dfcc480ba1e19bd3232349fc733caef94034292 Mon Sep 17 00:00:00 2001 From: stainer_t Date: Mon, 8 Sep 2025 13:48:49 +0200 Subject: Initial commit from Polytechnique Montreal --- Ganlib/data/testgan1_proc/xbessj0.c2m | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Ganlib/data/testgan1_proc/xbessj0.c2m (limited to 'Ganlib/data/testgan1_proc/xbessj0.c2m') diff --git a/Ganlib/data/testgan1_proc/xbessj0.c2m b/Ganlib/data/testgan1_proc/xbessj0.c2m new file mode 100644 index 0000000..4730a2b --- /dev/null +++ b/Ganlib/data/testgan1_proc/xbessj0.c2m @@ -0,0 +1,35 @@ + ! driver for testing function * bessj0* + + REAL bm5 bm4 bm3 bm2 bm1 + b00 b01 b02 b03 b04 + b05 b06 b07 b08 b09 + b10 b11 b12 b13 b14 + b15 := + -0.1775968 -0.3971498 -0.2600520 0.2238908 0.7651976 + 1.0000000 0.7651977 0.2238908 -0.2600520 -0.3971498 + -0.1775968 0.1506453 0.3000793 0.1716508 -0.0903336 + -0.2459358 -0.1711903 0.0476893 0.2069261 0.1710735 + -0.0142245 ; + REAL x := -5.0 ; + REAL y ; + PROCEDURE bessj0 ; + ECHO "Bessel Function J0" ; + + WHILE x 16. < DO + IF x 0. <> THEN + bessj0 :: <> >>y<< ; + ECHO "x=" x "bessj0(x)=" y "reference=" bm5 ; + ENDIF ; + EVALUATE x := x 1. + ; + EVALUATE bm5 bm4 bm3 bm2 bm1 + b00 b01 b02 b03 b04 + b05 b06 b07 b08 b09 + b10 b11 b12 b13 b14 + b15 := + bm4 bm3 bm2 bm1 + b00 b01 b02 b03 b04 + b05 b06 b07 b08 b09 + b10 b11 b12 b13 b14 + b15 bm5 ; + ENDWHILE ; + QUIT " Program *xbessj0* XREF " . -- cgit v1.2.3