Average Error: 61.8 → 0.4
Time: 13.0s
Precision: 64
\[0.9000000000000000222044604925031308084726 \le t \le 1.100000000000000088817841970012523233891\]
\[\left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right)\right)\]
\[\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \left({\left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}}\right)}^{3} \cdot \left(t \cdot t\right)\right)\]
\left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right)\right)
\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \left({\left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}}\right)}^{3} \cdot \left(t \cdot t\right)\right)
double f(double t) {
        double r99336 = 1.0;
        double r99337 = t;
        double r99338 = 2e-16;
        double r99339 = r99337 * r99338;
        double r99340 = r99336 + r99339;
        double r99341 = r99340 * r99340;
        double r99342 = -1.0;
        double r99343 = 2.0;
        double r99344 = r99343 * r99339;
        double r99345 = r99342 - r99344;
        double r99346 = r99341 + r99345;
        return r99346;
}

double f(double t) {
        double r99347 = 3.9999999999999997e-32;
        double r99348 = sqrt(r99347);
        double r99349 = sqrt(r99348);
        double r99350 = 3.0;
        double r99351 = pow(r99349, r99350);
        double r99352 = t;
        double r99353 = r99352 * r99352;
        double r99354 = r99351 * r99353;
        double r99355 = r99349 * r99354;
        return r99355;
}

Error

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original61.8
Target50.6
Herbie0.4
\[\mathsf{fma}\left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}, 1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}, -1 - 2 \cdot \left(t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right)\right)\]

Derivation

  1. Initial program 61.8

    \[\left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right)\right)\]
  2. Taylor expanded around 0 0.4

    \[\leadsto \color{blue}{3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{2}}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt0.4

    \[\leadsto \color{blue}{\left(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}\right)} \cdot {t}^{2}\]
  5. Applied associate-*l*0.4

    \[\leadsto \color{blue}{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \left(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot {t}^{2}\right)}\]
  6. Using strategy rm
  7. Applied add-sqr-sqrt0.4

    \[\leadsto \sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \left(\sqrt{\color{blue}{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}}} \cdot {t}^{2}\right)\]
  8. Applied sqrt-prod0.4

    \[\leadsto \sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \left(\color{blue}{\left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}}\right)} \cdot {t}^{2}\right)\]
  9. Applied associate-*l*0.4

    \[\leadsto \sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \color{blue}{\left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot {t}^{2}\right)\right)}\]
  10. Using strategy rm
  11. Applied add-sqr-sqrt0.4

    \[\leadsto \sqrt{\color{blue}{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}}} \cdot \left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot {t}^{2}\right)\right)\]
  12. Applied sqrt-prod0.4

    \[\leadsto \color{blue}{\left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}}\right)} \cdot \left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot {t}^{2}\right)\right)\]
  13. Applied associate-*l*0.5

    \[\leadsto \color{blue}{\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot {t}^{2}\right)\right)\right)}\]
  14. Simplified0.4

    \[\leadsto \sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \color{blue}{\left({\left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}}\right)}^{3} \cdot \left(t \cdot t\right)\right)}\]
  15. Final simplification0.4

    \[\leadsto \sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}} \cdot \left({\left(\sqrt{\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}}\right)}^{3} \cdot \left(t \cdot t\right)\right)\]

Reproduce

herbie shell --seed 2019208 
(FPCore (t)
  :name "fma_test1"
  :precision binary64
  :pre (<= 0.900000000000000022 t 1.1000000000000001)

  :herbie-target
  (fma (+ 1 (* t 2e-16)) (+ 1 (* t 2e-16)) (- -1 (* 2 (* t 2e-16))))

  (+ (* (+ 1 (* t 2e-16)) (+ 1 (* t 2e-16))) (- -1 (* 2 (* t 2e-16)))))