{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Cpsc 440 Problem Set 4 Question 3

Cpsc 440 Problem Set 4 Question 3 - hw4p3.h#ifndef...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
hw4p3.h 5/12/2008 # ifndef HW4P3_H # define HW4P3_H typedef struct HermitePolynomial * HermitePolynomial ; HermitePolynomial newHermitePolynomial ( int degree ) ; void freeHermitePolynomial ( HermitePolynomial h ) ; void printHermitePolynomial ( HermitePolynomial h , FILE * output_stream ) ; double evaluateHermitePolynomial ( HermitePolynomial h , double x ) ; double evaluateHPDerivative ( HermitePolynomial h , double x ) ; double newtonsMethodHP ( HermitePolynomial h , double x0 ) ; double * getHermiteCoefficients ( int degree ) ; double * getHigherOrderHermiteCoefficients ( int degree , double * Hkm1 , double * Hkm2 ) ; void printZeros ( double * zeros , int degree , FILE * output_stream ) ; # endif 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
hw4p3.c 5/12/2008 # include < math . h > # include < stdio . h > # include < stdlib . h > # include "hw4p3.h" # define SOLUTION_CONVERGENCE_CRITERION 1e-15 # define SEARCH_BOUND 8 # define SEARCH_INCREMENT 0.01 struct HermitePolynomial { int degree ; double * coefficients ; } ; HermitePolynomial newHermitePolynomial ( int degree ) { HermitePolynomial h = malloc ( sizeof ( struct HermitePolynomial )) ; h - > degree = degree ; h - > coefficients = getHermiteCoefficients ( h - > degree ) ; return ( h ) ; } void freeHermitePolynomial ( HermitePolynomial h ) { free ( h - > coefficients ) ; free
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern