Average Error: 3.8 → 2.2
Time: 9.2m
Precision: 64
Internal Precision: 384
\[\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}\]
\[\begin{array}{l} \mathbf{if}\;\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}} \le 1.0:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2.0 \cdot \log \left({\left(e^{a}\right)}^{\left(c - b\right)} \cdot e^{c \cdot 0.8333333333333334}\right)}}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Split input into 2 regimes
  2. if (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))) < 1.0

    1. Initial program 0.8

      \[\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}\]

    if 1.0 < (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))

    1. Initial program 62.0

      \[\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}\]
    2. Taylor expanded around inf 27.7

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \color{blue}{\left(\left(c \cdot a + 0.8333333333333334 \cdot c\right) - b \cdot a\right)}}}\]
    3. Using strategy rm
    4. Applied add-log-exp31.4

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \left(\left(c \cdot a + 0.8333333333333334 \cdot c\right) - \color{blue}{\log \left(e^{b \cdot a}\right)}\right)}}\]
    5. Applied add-log-exp34.5

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \left(\left(c \cdot a + \color{blue}{\log \left(e^{0.8333333333333334 \cdot c}\right)}\right) - \log \left(e^{b \cdot a}\right)\right)}}\]
    6. Applied add-log-exp38.5

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \left(\left(\color{blue}{\log \left(e^{c \cdot a}\right)} + \log \left(e^{0.8333333333333334 \cdot c}\right)\right) - \log \left(e^{b \cdot a}\right)\right)}}\]
    7. Applied sum-log38.5

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \left(\color{blue}{\log \left(e^{c \cdot a} \cdot e^{0.8333333333333334 \cdot c}\right)} - \log \left(e^{b \cdot a}\right)\right)}}\]
    8. Applied diff-log38.5

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \color{blue}{\log \left(\frac{e^{c \cdot a} \cdot e^{0.8333333333333334 \cdot c}}{e^{b \cdot a}}\right)}}}\]
    9. Applied simplify28.8

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \log \color{blue}{\left({\left(e^{a}\right)}^{\left(c - b\right)} \cdot e^{c \cdot 0.8333333333333334}\right)}}}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 9.2m)Debug logProfile

herbie shell --seed '#(1070578969 3140398606 632207097 462683394 1189254563 964980650)' 
(FPCore (x y z t a b c)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2"
  (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))