#*****************************************************************************80 # ## nth_root_test tests nth_root. # # Licensing: # # Copyright 2016 James P. Howard, II # # The computer code and data files on this web page are distributed under # https://opensource.org/licenses/BSD-2-Clause, the BSD-2-Clause license. # # Modified: # # 03 February 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "nth_root_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " nth_root(n) evaluates the n-th root of a number.\n" ) source ( "/home/burkardt/public_html/r_src/nth_root/nth_root.R" ) cat ( "\n" ) a <- 3.141592653589793 tol <- 0.00001 for ( n in 2 : 10 ) { value <- nth_root ( a, n, tol ) vn <- value^n cat ( n, "th root of ", a, " = ", value, " root^n = ", vn, "\n" ) } # # Terminate. # cat ( "\n" ) cat ( "nth_root_test\n" ) cat ( " Normal end of execution.\n" ) cat ( date ( ), "\n" ) quit ( )