c**************************************************************************** c c C-DAC Tech Workshop : hyPACK-2013 c October 15-18, 2013 c c Example 1.1 : mathlib-core-horner-rule.f c c Objective : Write a sequential program and estimate computational time for evaluation of function expressed in terms of polynomial of degree 'p' by using direct method and Horner's rule. c c Input : Degree of a polynomial. c c Output : Time taken in seconds for computation of polynomial using c normal method and by Horner's Rule c c Created : August-2013 c c E-mail : hpcfte@cdac.in c c******************************************************************************/ program HornerRule double precision timetakeng,timetakenh,powsum double precision value,coeff(10000),functord,functhorn integer timeg(2),timeh(2),degree,power,count external dtime c Read the degree and coefficients of the polynomial*/ print *,'Enter the degree of the polynomial(<10000)' read *,degree if ((degree .lt. 1) .or. (degree .gt. 10000)) then print *,'The degree should be in range 1