Average Error: 0.0 → 0.3
Time: 5.1s
Precision: 64
\[\left|e\right| \lt 1\]
\[\sqrt{1 - e \cdot e}\]
\[\sqrt{1} - \left(\frac{1}{8} \cdot \frac{{e}^{4}}{{\left(\sqrt{1}\right)}^{3}} + \frac{1}{2} \cdot \frac{{e}^{2}}{\sqrt{1}}\right)\]
\sqrt{1 - e \cdot e}
\sqrt{1} - \left(\frac{1}{8} \cdot \frac{{e}^{4}}{{\left(\sqrt{1}\right)}^{3}} + \frac{1}{2} \cdot \frac{{e}^{2}}{\sqrt{1}}\right)
double f(double e) {
        double r880975 = 1.0;
        double r880976 = e;
        double r880977 = r880976 * r880976;
        double r880978 = r880975 - r880977;
        double r880979 = sqrt(r880978);
        return r880979;
}

double f(double e) {
        double r880980 = 1.0;
        double r880981 = sqrt(r880980);
        double r880982 = 0.125;
        double r880983 = e;
        double r880984 = 4.0;
        double r880985 = pow(r880983, r880984);
        double r880986 = 3.0;
        double r880987 = pow(r880981, r880986);
        double r880988 = r880985 / r880987;
        double r880989 = r880982 * r880988;
        double r880990 = 0.5;
        double r880991 = 2.0;
        double r880992 = pow(r880983, r880991);
        double r880993 = r880992 / r880981;
        double r880994 = r880990 * r880993;
        double r880995 = r880989 + r880994;
        double r880996 = r880981 - r880995;
        return r880996;
}

Error

Bits error versus e

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\sqrt{1 - e \cdot e}\]
  2. Taylor expanded around 0 0.3

    \[\leadsto \color{blue}{\sqrt{1} - \left(\frac{1}{8} \cdot \frac{{e}^{4}}{{\left(\sqrt{1}\right)}^{3}} + \frac{1}{2} \cdot \frac{{e}^{2}}{\sqrt{1}}\right)}\]
  3. Final simplification0.3

    \[\leadsto \sqrt{1} - \left(\frac{1}{8} \cdot \frac{{e}^{4}}{{\left(\sqrt{1}\right)}^{3}} + \frac{1}{2} \cdot \frac{{e}^{2}}{\sqrt{1}}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (e)
  :name "sqrt(1-e*e)"
  :precision binary64
  :pre (< (fabs e) 1)
  (sqrt (- 1 (* e e))))