Average Error: 0.0 → 0.0
Time: 4.0s
Precision: 64
\[\sqrt{1 - x \cdot x}\]
\[\sqrt{\frac{{1}^{3} - {\left(x \cdot x\right)}^{3}}{\mathsf{fma}\left({x}^{2}, \mathsf{fma}\left(x, x, 1\right), 1 \cdot 1\right)}}\]
\sqrt{1 - x \cdot x}
\sqrt{\frac{{1}^{3} - {\left(x \cdot x\right)}^{3}}{\mathsf{fma}\left({x}^{2}, \mathsf{fma}\left(x, x, 1\right), 1 \cdot 1\right)}}
double f(double x) {
        double r246313 = 1.0;
        double r246314 = x;
        double r246315 = r246314 * r246314;
        double r246316 = r246313 - r246315;
        double r246317 = sqrt(r246316);
        return r246317;
}

double f(double x) {
        double r246318 = 1.0;
        double r246319 = 3.0;
        double r246320 = pow(r246318, r246319);
        double r246321 = x;
        double r246322 = r246321 * r246321;
        double r246323 = pow(r246322, r246319);
        double r246324 = r246320 - r246323;
        double r246325 = 2.0;
        double r246326 = pow(r246321, r246325);
        double r246327 = fma(r246321, r246321, r246318);
        double r246328 = r246318 * r246318;
        double r246329 = fma(r246326, r246327, r246328);
        double r246330 = r246324 / r246329;
        double r246331 = sqrt(r246330);
        return r246331;
}

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. Applied sqrt-div0.0

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

    \[\leadsto \color{blue}{\sqrt{\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)}}}\]
  7. Simplified0.0

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

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

Reproduce

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