22-Jul-2022 10:34:23 elfun_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2. elfun() evaluates Jacobi elliptic functions. jacobi_cnk_test(): jacobi_cnk(u,k) returns values of the Jacobi elliptic CN function. U K CN(U,K) CN(U,K) |Diff| Computed Tabulated 0.100000 0.000000 0.9950041652780257 0.9950041652780258 1.1e-16 0.200000 0.000000 0.9800665778412416 0.9800665778412416 0 0.500000 0.000000 0.8775825618903728 0.8775825618903726 1.1e-16 1.000000 0.000000 0.5403023058681398 0.5403023058681397 1.1e-16 2.000000 0.000000 -0.4161468365471424 -0.4161468365471424 0 0.100000 0.707107 0.9950124626090583 0.9950124626090582 1.1e-16 0.200000 0.707107 0.9801976276784097 0.9801976276784098 1.1e-16 0.500000 0.707107 0.8822663948904402 0.8822663948904403 1.1e-16 1.000000 0.707107 0.5959765676721407 0.5959765676721407 0 2.000000 0.707107 -0.1031836155277620 -0.1031836155277618 1.8e-16 0.100000 1.000000 0.9950207489532266 0.9950207489532265 1.1e-16 0.200000 1.000000 0.9803279976447253 0.9803279976447253 0 0.500000 1.000000 0.8868188839700740 0.8868188839700739 1.1e-16 1.000000 1.000000 0.6480542736638853 0.6480542736638853 0 2.000000 1.000000 0.2658022288340797 0.2658022288340797 0 4.000000 1.000000 0.0366189934736865 0.0366189934736865 0 -0.200000 1.000000 0.9803279976447253 0.9803279976447253 0 -0.500000 1.000000 0.8868188839700740 0.8868188839700739 1.1e-16 -1.000000 1.000000 0.6480542736638853 0.6480542736638853 0 -2.000000 1.000000 0.2658022288340797 0.2658022288340797 0 jacobi_cnk_inverse_test(): jacobi_cnk_inverse(u,k) is given x and k from the equation x = cnk(u,k), and returns the value of u. Note that the inverse is not necessarily unique. K X=CN(U,K) X2=CN(U2,K) U U2=cnk_inverse(X,K) 0.000000 0.995004 0.995004 0.1000000000000000 0.1000000000000006 0.000000 0.980067 0.980067 0.2000000000000000 0.2000000000000000 0.000000 0.877583 0.877583 0.5000000000000000 0.4999999999999999 0.000000 0.540302 0.540302 1.0000000000000000 1.0000000000000000 0.000000 -0.416147 -0.416147 2.0000000000000000 2.0000000000000000 0.707107 0.995012 0.995012 0.1000000000000000 0.0999999999999992 0.707107 0.980198 0.980198 0.2000000000000000 0.2000000000000005 0.707107 0.882266 0.882266 0.5000000000000000 0.5000000000000002 0.707107 0.595977 0.595977 1.0000000000000000 1.0000000000000000 0.707107 -0.103184 -0.103184 2.0000000000000000 2.0000000000000018 1.000000 0.995021 0.995021 0.1000000000000000 0.0999999999999990 1.000000 0.980328 0.980328 0.2000000000000000 0.2000000000000002 1.000000 0.886819 0.886819 0.5000000000000000 0.4999999999999998 1.000000 0.648054 0.648054 1.0000000000000000 1.0000000000000000 1.000000 0.265802 0.265802 2.0000000000000000 2.0000000000000000 1.000000 0.036619 0.036619 4.0000000000000000 4.0000000000000000 1.000000 0.980328 0.980328 -0.2000000000000000 0.2000000000000002 1.000000 0.886819 0.886819 -0.5000000000000000 0.4999999999999998 1.000000 0.648054 0.648054 -1.0000000000000000 1.0000000000000000 1.000000 0.265802 0.265802 -2.0000000000000000 2.0000000000000000 jacobi_dnk_test(): jacobi_dnk(u,k) returns values of the Jacobi elliptic DN function. U K DN(U,K) DN(U,K) |Diff| Computed Tabulated 0.100000 0.000000 1.0000000000000000 1.0000000000000000 0 0.200000 0.000000 1.0000000000000000 1.0000000000000000 0 0.500000 0.000000 1.0000000000000000 1.0000000000000000 0 1.000000 0.000000 1.0000000000000000 1.0000000000000000 0 2.000000 0.000000 1.0000000000000000 1.0000000000000000 0 0.100000 0.707107 0.9975093485144244 0.9975093485144243 1.1e-16 0.200000 0.707107 0.9901483195224799 0.9901483195224799 0 0.500000 0.707107 0.9429724257773857 0.9429724257773857 0 1.000000 0.707107 0.8231610016315962 0.8231610016315963 1.1e-16 2.000000 0.707107 0.7108610477840873 0.7108610477840873 0 0.100000 1.000000 0.9950207489532266 0.9950207489532265 1.1e-16 0.200000 1.000000 0.9803279976447253 0.9803279976447253 0 0.500000 1.000000 0.8868188839700740 0.8868188839700739 1.1e-16 1.000000 1.000000 0.6480542736638853 0.6480542736638853 0 2.000000 1.000000 0.2658022288340797 0.2658022288340797 0 4.000000 1.000000 0.0366189934736865 0.0366189934736865 0 -0.200000 1.000000 0.9803279976447253 0.9803279976447253 0 -0.500000 1.000000 0.8868188839700740 0.8868188839700739 1.1e-16 -1.000000 1.000000 0.6480542736638853 0.6480542736638853 0 -2.000000 1.000000 0.2658022288340797 0.2658022288340797 0 jacobi_dnk_inverse_test(): jacobi_dnk_inverse(u,k) is given x and k from the equation x = dnk(u,k), and returns the value of u. Note that the inverse is not necessarily unique. K X=DN(U,K) X2=DN(U2,K) U U2=dnk_inverse(X,K) 0.000000 1.000000 NaN 0.1000000000000000 NaN 0.000000 1.000000 NaN 0.2000000000000000 NaN 0.000000 1.000000 NaN 0.5000000000000000 NaN 0.000000 1.000000 NaN 1.0000000000000000 NaN 0.000000 1.000000 NaN 2.0000000000000000 NaN 0.707107 0.997509 0.997509 0.1000000000000000 0.0999999999999981 0.707107 0.990148 0.990148 0.2000000000000000 0.2000000000000009 0.707107 0.942972 0.942972 0.5000000000000000 0.4999999999999998 0.707107 0.823161 0.823161 1.0000000000000000 1.0000000000000002 0.707107 0.710861 0.710861 2.0000000000000000 1.7081493546027424 1.000000 0.995021 0.995021 0.1000000000000000 0.0999999999999990 1.000000 0.980328 0.980328 0.2000000000000000 0.2000000000000002 1.000000 0.886819 0.886819 0.5000000000000000 0.4999999999999998 1.000000 0.648054 0.648054 1.0000000000000000 1.0000000000000000 1.000000 0.265802 0.265802 2.0000000000000000 2.0000000000000000 1.000000 0.036619 0.036619 4.0000000000000000 4.0000000000000000 1.000000 0.980328 0.980328 -0.2000000000000000 0.2000000000000002 1.000000 0.886819 0.886819 -0.5000000000000000 0.4999999999999998 1.000000 0.648054 0.648054 -1.0000000000000000 1.0000000000000000 1.000000 0.265802 0.265802 -2.0000000000000000 2.0000000000000000 jacobi_snk_test(): jacobi_snk(u,k) returns values of the Jacobi elliptic SN function. U K SN(U,K) SN(U,K) |Diff| Computed Tabulated 0.100000 0.000000 0.0998334166468282 0.0998334166468282 0 0.200000 0.000000 0.1986693307950612 0.1986693307950612 2.8e-17 0.500000 0.000000 0.4794255386042030 0.4794255386042030 0 1.000000 0.000000 0.8414709848078965 0.8414709848078965 0 2.000000 0.000000 0.9092974268256817 0.9092974268256817 0 0.100000 0.707107 0.0997506854746248 0.0997506854746248 0 0.200000 0.707107 0.1980217429819704 0.1980217429819704 2.8e-17 0.500000 0.707107 0.4707504736556573 0.4707504736556573 5.6e-17 1.000000 0.707107 0.8030018248956440 0.8030018248956439 1.1e-16 2.000000 0.707107 0.9946623253580177 0.9946623253580177 0 0.100000 1.000000 0.0996679946249558 0.0996679946249558 0 0.200000 1.000000 0.1973753202249040 0.1973753202249040 0 0.500000 1.000000 0.4621171572600097 0.4621171572600098 5.6e-17 1.000000 1.000000 0.7615941559557649 0.7615941559557649 0 2.000000 1.000000 0.9640275800758169 0.9640275800758169 0 4.000000 1.000000 0.9993292997390670 0.9993292997390670 0 -0.200000 1.000000 -0.1973753202249040 -0.1973753202249040 0 -0.500000 1.000000 -0.4621171572600097 -0.4621171572600098 5.6e-17 -1.000000 1.000000 -0.7615941559557649 -0.7615941559557649 0 -2.000000 1.000000 -0.9640275800758169 -0.9640275800758169 0 jacobi_snk_inverse_test(): jacobi_snk_inverse(u,k) is given x and k from the equation x = snk(u,k), and returns the value of u. Note that the inverse is not necessarily unique. K X=SN(U,K) X2=SN(U2,K) U U2=snk_inverse(X,K) 0.000000 0.099833 0.099833 0.1000000000000000 0.1000000000000000 0.000000 0.198669 0.198669 0.2000000000000000 0.2000000000000000 0.000000 0.479426 0.479426 0.5000000000000000 0.5000000000000000 0.000000 0.841471 0.841471 1.0000000000000000 1.0000000000000000 0.000000 0.909297 0.909297 2.0000000000000000 1.1415926535897933 0.707107 0.099751 0.099751 0.1000000000000000 0.1000000000000000 0.707107 0.198022 0.198022 0.2000000000000000 0.2000000000000000 0.707107 0.470750 0.470750 0.5000000000000000 0.5000000000000000 0.707107 0.803002 0.803002 1.0000000000000000 1.0000000000000002 0.707107 0.994662 0.994662 2.0000000000000000 1.7081493546027440 1.000000 0.099668 0.099668 0.1000000000000000 0.1000000000000000 1.000000 0.197375 0.197375 0.2000000000000000 0.2000000000000000 1.000000 0.462117 0.462117 0.5000000000000000 0.5000000000000000 1.000000 0.761594 0.761594 1.0000000000000000 0.9999999999999999 1.000000 0.964028 0.964028 2.0000000000000000 2.0000000000000004 1.000000 0.999329 0.999329 4.0000000000000000 3.9999999999999929 1.000000 -0.197375 -0.197375 -0.2000000000000000 -0.2000000000000000 1.000000 -0.462117 -0.462117 -0.5000000000000000 -0.5000000000000000 1.000000 -0.761594 -0.761594 -1.0000000000000000 -0.9999999999999999 1.000000 -0.964028 -0.964028 -2.0000000000000000 -2.0000000000000004 elfun_test(): Normal end of execution. 22-Jul-2022 10:34:23