#*****************************************************************************80 # ## polyinterp_test tests polyinterp. # # 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: # # 21 February 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "polyinterp_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " polyinterp computes the intercept and slope of the line through two points.\n" ) source ( "/home/burkardt/public_html/r_src/polyinterp/polyinterp.R" ) cat ( "\n" ) x <- c ( -1, 1, 0 ) cat ( "\n" ) cat ( " x coordinates:\n" ) cat ( "\n" ) print ( x ) y <- c ( -2, 2, -1 ) cat ( "\n" ) cat ( " y coordinates:\n" ) cat ( "\n" ) print ( y ) p <- polyinterp ( x, y ) cat ( "\n" ) cat ( " p <- polyinterp ( x, y )\n" ) cat ( "\n" ) print ( p ) source ( "/home/burkardt/public_html/r_src/horner/horner.R" ) xp = -2 yp = horner ( xp, p ) cat ( " yp <- horner ( xp, p )\n" ) cat ( " ", yp, " <- horner ( ", xp, ", p )\n" ); # # Terminate. # cat ( "\n" ) cat ( "polyinterp_test\n" ) cat ( " Normal end of execution.\n" ) cat ( date ( ), "\n" ) quit ( )