exp_2: Test

| Prev | Next |  |  |  |  |  | exp_2.cpp | Headings

exp_2: Test
`

    # include <cmath>           // define fabs function
    # include "exp_2.hpp"       // definition of exp_2 algorithm
    bool exp_2(void)
    {	double x     = .5;
    	double check = 1 + x + x * x / 2.;
    	bool   ok    = std::fabs( exp_2(x) - check ) <= 1e-10;
    	return ok;
    }

`

Input File: introduction/exp_apx/exp_2.omh