Average Error: 0.0 → 0.0
Time: 14.0s
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 r161850 = 1.0;
        double r161851 = x;
        double r161852 = r161851 * r161851;
        double r161853 = r161850 - r161852;
        double r161854 = sqrt(r161853);
        return r161854;
}

double f(double x) {
        double r161855 = 1.0;
        double r161856 = 3.0;
        double r161857 = pow(r161855, r161856);
        double r161858 = x;
        double r161859 = 6.0;
        double r161860 = pow(r161858, r161859);
        double r161861 = r161857 - r161860;
        double r161862 = fma(r161858, r161858, r161855);
        double r161863 = 4.0;
        double r161864 = pow(r161858, r161863);
        double r161865 = fma(r161855, r161862, r161864);
        double r161866 = r161861 / r161865;
        double r161867 = sqrt(r161866);
        return r161867;
}

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))))