Exemplo n.º 1
0
def r8_erf_test ( ):

#*****************************************************************************80
#
## R8_ERF_TEST tests R8_ERF.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    14 February 2015
#
#  Author:
#
#    John Burkardt
#
  from erf_values import erf_values
  from r8_erf import r8_erf

  print ''
  print 'R8_ERF_TEST:'
  print '  R8_ERF evaluates the error function.'
  print ''
  print '      X            ERF(X)    R8_ERF(X)'
  print ''

  n_data = 0

  while ( True ):

    n_data, x, fx1 = erf_values ( n_data )

    if ( n_data == 0 ):
      break

    fx2 = r8_erf ( x )

    print '  %12g  %24.16g  %24.16g' % ( x, fx1, fx2 )

  print ''
  print 'R8_ERF_TEST'
  print '  Normal end of execution.'

  return
Exemplo n.º 2
0
def r8_erf_test():

    #*****************************************************************************80
    #
    ## R8_ERF_TEST tests R8_ERF.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    14 February 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from erf_values import erf_values
    from r8_erf import r8_erf

    print ''
    print 'R8_ERF_TEST:'
    print '  R8_ERF evaluates the error function.'
    print ''
    print '      X            ERF(X)    R8_ERF(X)'
    print ''

    n_data = 0

    while (True):

        n_data, x, fx1 = erf_values(n_data)

        if (n_data == 0):
            break

        fx2 = r8_erf(x)

        print '  %12g  %24.16g  %24.16g' % (x, fx1, fx2)

    print ''
    print 'R8_ERF_TEST'
    print '  Normal end of execution.'

    return
Exemplo n.º 3
0
def r8_erf_inverse_test ( ):

#*****************************************************************************80
#
## R8_ERF_INVERSE_TEST tests R8_ERF_INVERSE.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    14 February 2015
#
#  Author:
#
#    John Burkardt
#
  from erf_values import erf_values

  print ''
  print 'R8_ERF_INVERSE_TEST:'
  print '  R8_ERF_INVERSE inverts the error function.'
  print ''
  print '     FX              X    R8_ERF_INVERSE(FX)'
  print ''

  n_data = 0

  while ( True ):

    n_data, x1, fx = erf_values ( n_data )

    if ( n_data == 0 ):
      break

    x2 = r8_erf_inverse ( fx )

    print '  %12g  %24.16g  %24.16g' % ( fx, x1, x2 )

  print ''
  print 'R8_ERF_INVERSE_TEST'
  print '  Normal end of execution.'

  return
Exemplo n.º 4
0
def r8_erf_inverse_test():

    #*****************************************************************************80
    #
    ## R8_ERF_INVERSE_TEST tests R8_ERF_INVERSE.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    14 February 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from erf_values import erf_values

    print ''
    print 'R8_ERF_INVERSE_TEST:'
    print '  R8_ERF_INVERSE inverts the error function.'
    print ''
    print '     FX              X    R8_ERF_INVERSE(FX)'
    print ''

    n_data = 0

    while (True):

        n_data, x1, fx = erf_values(n_data)

        if (n_data == 0):
            break

        x2 = r8_erf_inverse(fx)

        print '  %12g  %24.16g  %24.16g' % (fx, x1, x2)

    print ''
    print 'R8_ERF_INVERSE_TEST'
    print '  Normal end of execution.'

    return