Average Error: 3.4 → 0.2
Time: 5.2s
Precision: 64
\[0.9899999999999999911182158029987476766109 \lt e \lt 1\]
\[\sqrt{1 - e \cdot e}\]
\[\sqrt{\left(\sqrt{1} + e\right) \cdot \left(\sqrt{1} - e\right)}\]
\sqrt{1 - e \cdot e}
\sqrt{\left(\sqrt{1} + e\right) \cdot \left(\sqrt{1} - e\right)}
double f(double e) {
        double r901120 = 1.0;
        double r901121 = e;
        double r901122 = r901121 * r901121;
        double r901123 = r901120 - r901122;
        double r901124 = sqrt(r901123);
        return r901124;
}

double f(double e) {
        double r901125 = 1.0;
        double r901126 = sqrt(r901125);
        double r901127 = e;
        double r901128 = r901126 + r901127;
        double r901129 = r901126 - r901127;
        double r901130 = r901128 * r901129;
        double r901131 = sqrt(r901130);
        return r901131;
}

Error

Bits error versus e

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 3.4

    \[\sqrt{1 - e \cdot e}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt3.4

    \[\leadsto \sqrt{\color{blue}{\sqrt{1} \cdot \sqrt{1}} - e \cdot e}\]
  4. Applied difference-of-squares0.2

    \[\leadsto \sqrt{\color{blue}{\left(\sqrt{1} + e\right) \cdot \left(\sqrt{1} - e\right)}}\]
  5. Final simplification0.2

    \[\leadsto \sqrt{\left(\sqrt{1} + e\right) \cdot \left(\sqrt{1} - e\right)}\]

Reproduce

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