Average Error: 61.8 → 0.3
Time: 3.1s
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)\]
\[{\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot \left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{4}\right)\right)}^{\frac{1}{2}}\]
\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)
{\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot \left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{4}\right)\right)}^{\frac{1}{2}}
double f(double t) {
        double r85921 = 1.0;
        double r85922 = t;
        double r85923 = 2e-16;
        double r85924 = r85922 * r85923;
        double r85925 = r85921 + r85924;
        double r85926 = r85925 * r85925;
        double r85927 = -1.0;
        double r85928 = 2.0;
        double r85929 = r85928 * r85924;
        double r85930 = r85927 - r85929;
        double r85931 = r85926 + r85930;
        return r85931;
}

double f(double t) {
        double r85932 = 3.9999999999999997e-32;
        double r85933 = t;
        double r85934 = 4.0;
        double r85935 = pow(r85933, r85934);
        double r85936 = r85932 * r85935;
        double r85937 = r85932 * r85936;
        double r85938 = 0.5;
        double r85939 = pow(r85937, r85938);
        return r85939;
}

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.3
\[\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.3

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

    \[\leadsto 3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot \color{blue}{\left(\sqrt{{t}^{2}} \cdot \sqrt{{t}^{2}}\right)}\]
  5. Applied add-sqr-sqrt0.3

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

    \[\leadsto \color{blue}{\left(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \sqrt{{t}^{2}}\right) \cdot \left(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \sqrt{{t}^{2}}\right)}\]
  7. Using strategy rm
  8. Applied pow1/20.4

    \[\leadsto \left(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \sqrt{{t}^{2}}\right) \cdot \left(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \color{blue}{{\left({t}^{2}\right)}^{\frac{1}{2}}}\right)\]
  9. Applied pow1/20.4

    \[\leadsto \left(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \sqrt{{t}^{2}}\right) \cdot \left(\color{blue}{{\left( 3.999999999999999676487027278085939408227 \cdot 10^{-32} \right)}^{\frac{1}{2}}} \cdot {\left({t}^{2}\right)}^{\frac{1}{2}}\right)\]
  10. Applied pow-prod-down0.4

    \[\leadsto \left(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \sqrt{{t}^{2}}\right) \cdot \color{blue}{{\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{2}\right)}^{\frac{1}{2}}}\]
  11. Applied pow1/20.4

    \[\leadsto \left(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \color{blue}{{\left({t}^{2}\right)}^{\frac{1}{2}}}\right) \cdot {\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{2}\right)}^{\frac{1}{2}}\]
  12. Applied pow1/20.4

    \[\leadsto \left(\color{blue}{{\left( 3.999999999999999676487027278085939408227 \cdot 10^{-32} \right)}^{\frac{1}{2}}} \cdot {\left({t}^{2}\right)}^{\frac{1}{2}}\right) \cdot {\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{2}\right)}^{\frac{1}{2}}\]
  13. Applied pow-prod-down0.6

    \[\leadsto \color{blue}{{\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{2}\right)}^{\frac{1}{2}}} \cdot {\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{2}\right)}^{\frac{1}{2}}\]
  14. Applied pow-prod-down0.3

    \[\leadsto \color{blue}{{\left(\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{2}\right) \cdot \left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{2}\right)\right)}^{\frac{1}{2}}}\]
  15. Simplified0.3

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

    \[\leadsto {\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot \left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{4}\right)\right)}^{\frac{1}{2}}\]

Reproduce

herbie shell --seed 2019318 
(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)))))