#! /usr/bin/env python # def scipy_jv_test ( ): #*****************************************************************************80 # ## SCIPY_JV_TEST checks some Bessel J functions computed by SCIPY JV() # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 13 January 2015 # # Author: # # John Burkardt # import platform from scipy.special import jv from bessel_jx_values import bessel_jx_values print ( '' ) print ( 'SCIPY_JV_TEST:' ) print ( ' Python version: %s' % ( platform.python_version ( ) ) ) print ( ' scipy.special.jv(nu,x) evaluates the Bessel J function. of real order NU.' ) print ( '' ) print ( ' NU X jv(nu,x) Tabulated' ) print ( '' ) n_data = 0 while ( True ): n_data, nu, x, fx2 = bessel_jx_values ( n_data ) if ( n_data == 0 ): break fx1 = jv ( nu, x ) print ( ' %12f %12f %24.16g %24.16g' % ( nu, x, fx1, fx2 ) ) # # Terminate. # print ( '' ) print ( 'SCIPY_JV_TEST:' ) print ( ' Normal end of execution.' ) return if ( __name__ == '__main__' ): from timestamp import timestamp timestamp ( ) scipy_jv_test ( ) timestamp ( )