Average Error: 0.0 → 0.0
Time: 14.4s
Precision: 64
\[\sqrt{1 - x \cdot x}\]
\[\sqrt{\frac{{1}^{3} - {x}^{6}}{\mathsf{fma}\left(1, \mathsf{fma}\left(x, x, 1\right), {x}^{4}\right)}}\]
\sqrt{1 - x \cdot x}
\sqrt{\frac{{1}^{3} - {x}^{6}}{\mathsf{fma}\left(1, \mathsf{fma}\left(x, x, 1\right), {x}^{4}\right)}}
double f(double x) {
        double r174224 = 1.0;
        double r174225 = x;
        double r174226 = r174225 * r174225;
        double r174227 = r174224 - r174226;
        double r174228 = sqrt(r174227);
        return r174228;
}

double f(double x) {
        double r174229 = 1.0;
        double r174230 = 3.0;
        double r174231 = pow(r174229, r174230);
        double r174232 = x;
        double r174233 = 6.0;
        double r174234 = pow(r174232, r174233);
        double r174235 = r174231 - r174234;
        double r174236 = fma(r174232, r174232, r174229);
        double r174237 = 4.0;
        double r174238 = pow(r174232, r174237);
        double r174239 = fma(r174229, r174236, r174238);
        double r174240 = r174235 / r174239;
        double r174241 = sqrt(r174240);
        return r174241;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\sqrt{1 - x \cdot x}\]
  2. Using strategy rm
  3. Applied flip3--0.0

    \[\leadsto \sqrt{\color{blue}{\frac{{1}^{3} - {\left(x \cdot x\right)}^{3}}{1 \cdot 1 + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) + 1 \cdot \left(x \cdot x\right)\right)}}}\]
  4. Simplified0.0

    \[\leadsto \sqrt{\frac{\color{blue}{{1}^{3} - {x}^{6}}}{1 \cdot 1 + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) + 1 \cdot \left(x \cdot x\right)\right)}}\]
  5. Simplified0.0

    \[\leadsto \sqrt{\frac{{1}^{3} - {x}^{6}}{\color{blue}{\mathsf{fma}\left(1, \mathsf{fma}\left(x, x, 1\right), {x}^{4}\right)}}}\]
  6. Final simplification0.0

    \[\leadsto \sqrt{\frac{{1}^{3} - {x}^{6}}{\mathsf{fma}\left(1, \mathsf{fma}\left(x, x, 1\right), {x}^{4}\right)}}\]

Reproduce

herbie shell --seed 2019323 +o rules:numerics
(FPCore (x)
  :name "Diagrams.TwoD.Ellipse:ellipse from diagrams-lib-1.3.0.3"
  :precision binary64
  (sqrt (- 1 (* x x))))