diff options
| author | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
|---|---|---|
| committer | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
| commit | 7dfcc480ba1e19bd3232349fc733caef94034292 (patch) | |
| tree | 03ee104eb8846d5cc1a981d267687a729185d3f3 /Ganlib/data/badluk_proc/xbessj0.c2m | |
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Ganlib/data/badluk_proc/xbessj0.c2m')
| -rw-r--r-- | Ganlib/data/badluk_proc/xbessj0.c2m | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Ganlib/data/badluk_proc/xbessj0.c2m b/Ganlib/data/badluk_proc/xbessj0.c2m new file mode 100644 index 0000000..4730a2b --- /dev/null +++ b/Ganlib/data/badluk_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 :: <<x>> >>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 " . |
