def normal_01_cdf_test(): #*****************************************************************************80 # ## NORMAL_01_CDF_TEST tests NORMAL_01_CDF. # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 27 February 2015 # # Author: # # John Burkardt # import platform from normal_01_cdf_values import normal_01_cdf_values print('') print('NORMAL_01_CDF_TEST') print(' Python version: %s' % (platform.python_version())) print(' NORMAL_01_CDF evaluates the CDF;') print('') print(' X CDF CDF') print(' (exact) (computed)') print('') n_data = 0 while (True): n_data, x, cdf1 = normal_01_cdf_values(n_data) if (n_data == 0): break cdf2 = normal_01_cdf(x) print(' %14.6g %24.16g %24.16g' % (x, cdf1, cdf2)) # # Terminate. # print('') print('NORMAL_01_CDF_TEST:') print(' Normal end of execution.') return
def normal_01_cdf_test ( ): #*****************************************************************************80 # ## NORMAL_01_CDF_TEST tests NORMAL_01_CDF. # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 27 February 2015 # # Author: # # John Burkardt # from normal_01_cdf_values import normal_01_cdf_values print '' print 'NORMAL_01_CDF_TEST' print ' NORMAL_01_CDF evaluates the CDF;' print '' print ' X CDF CDF' print ' (exact) (computed)' print '' n_data = 0 while ( True ): n_data, x, cdf1 = normal_01_cdf_values ( n_data ) if ( n_data == 0 ): break cdf2 = normal_01_cdf ( x ) print ' %14.6g %24.16g %24.16g' % ( x, cdf1, cdf2 ) print '' print 'NORMAL_01_CDF_TEST:' print ' Normal end of execution.' return
def normal_01_cdf_inv_test(): #*****************************************************************************80 # ## NORMAL_01_CDF_INV_TEST tests NORMAL_01_CDF_INV. # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 28 February 2015 # # Author: # # John Burkardt # from normal_01_cdf_values import normal_01_cdf_values print '' print 'NORMAL_01_CDF_INV_TEST' print ' NORMAL_01_CDF_INV inverts the CDF;' print '' print ' CDF X X' print ' (exact) (computed)' print '' n_data = 0 while (True): n_data, x1, cdf = normal_01_cdf_values(n_data) if (n_data == 0): break x2 = normal_01_cdf_inv(cdf) print ' %14.6g %24.16g %24.16g' % (cdf, x1, x2) print '' print 'NORMAL_01_CDF_INV_TEST:' print ' Normal end of execution.' return
def normal_01_cdf_inv_test ( ): #*****************************************************************************80 # ## NORMAL_01_CDF_INV_TEST tests NORMAL_01_CDF_INV. # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 28 February 2015 # # Author: # # John Burkardt # from normal_01_cdf_values import normal_01_cdf_values print '' print 'NORMAL_01_CDF_INV_TEST' print ' NORMAL_01_CDF_INV inverts the CDF;' print '' print ' CDF X X' print ' (exact) (computed)' print '' n_data = 0 while ( True ): n_data, x1, cdf = normal_01_cdf_values ( n_data ) if ( n_data == 0 ): break x2 = normal_01_cdf_inv ( cdf ) print ' %14.6g %24.16g %24.16g' % ( cdf, x1, x2 ) print '' print 'NORMAL_01_CDF_INV_TEST:' print ' Normal end of execution.' return
def normal_01_cdf_test(): #*****************************************************************************80 # ## NORMAL_01_CDF_TEST tests NORMAL_01_CDF. # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 27 February 2015 # # Author: # # John Burkardt # from normal_01_cdf_values import normal_01_cdf_values print '' print 'NORMAL_01_CDF_TEST' print ' NORMAL_01_CDF evaluates the CDF;' print '' print ' X CDF CDF' print ' (exact) (computed)' print '' n_data = 0 while (True): n_data, x, cdf1 = normal_01_cdf_values(n_data) if (n_data == 0): break cdf2 = normal_01_cdf(x) print ' %14.6g %24.16g %24.16g' % (x, cdf1, cdf2) print '' print 'NORMAL_01_CDF_TEST:' print ' Normal end of execution.' return
def normal_01_cdf_inverse_test ( ): #*****************************************************************************80 # ## NORMAL_01_CDF_INVERSE_TEST tests NORMAL_01_CDF_INVERSE. # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 15 February 2015 # # Author: # # John Burkardt # from normal_01_cdf_values import normal_01_cdf_values print '' print 'NORMAL_01_CDF_INVERSE_TEST:' print ' NORMAL_01_CDF_INVERSE inverts the error function.' print '' print ' FX X NORMAL_01_CDF_INVERSE(FX)' print '' n_data = 0 while ( True ): n_data, x1, fx = normal_01_cdf_values ( n_data ) if ( n_data == 0 ): break x2 = normal_01_cdf_inverse ( fx ) print ' %12g %24.16g %24.16g' % ( fx, x1, x2 ) print '' print 'NORMAL_01_CDF_INVERSE_TEST' print ' Normal end of execution.' return
def normal_01_cdf_inverse_test(): #*****************************************************************************80 # ## NORMAL_01_CDF_INVERSE_TEST tests NORMAL_01_CDF_INVERSE. # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 15 February 2015 # # Author: # # John Burkardt # from normal_01_cdf_values import normal_01_cdf_values print '' print 'NORMAL_01_CDF_INVERSE_TEST:' print ' NORMAL_01_CDF_INVERSE inverts the error function.' print '' print ' FX X NORMAL_01_CDF_INVERSE(FX)' print '' n_data = 0 while (True): n_data, x1, fx = normal_01_cdf_values(n_data) if (n_data == 0): break x2 = normal_01_cdf_inverse(fx) print ' %12g %24.16g %24.16g' % (fx, x1, x2) print '' print 'NORMAL_01_CDF_INVERSE_TEST' print ' Normal end of execution.' return