Average Error: 3.5 → 2.1
Time: 50.7s
Precision: 64
Internal Precision: 128
\[\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}\;y \le -1.5324354381186935 \cdot 10^{-213}:\\ \;\;\;\;\frac{x}{x + e^{2.0 \cdot (\left(c - b\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{3.0 \cdot t}\right) + \left(\sqrt{t + a} \cdot \frac{z}{t}\right))_*} \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2.0 \cdot (\left(z \cdot \sqrt{t + a}\right) \cdot \left(\frac{1}{t}\right) + \left(\left(-\left(b - c\right)\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{3.0 \cdot t}\right)\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 y < -1.5324354381186935e-213

    1. Initial program 3.5

      \[\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. Using strategy rm
    3. Applied *-un-lft-identity3.5

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \left(\color{blue}{1 \cdot \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)}}\]
    4. Applied prod-diff22.7

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \color{blue}{\left((1 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t}\right) + \left(-\left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right) \cdot \left(b - c\right)\right))_* + (\left(-\left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right) \cdot \left(b - c\right) + \left(\left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right) \cdot \left(b - c\right)\right))_*\right)}}}\]
    5. Simplified21.0

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \left(\color{blue}{(\left(c - b\right) \cdot \left(\left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}\right) + \left(\frac{z}{t} \cdot \sqrt{a + t}\right))_*} + (\left(-\left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right) \cdot \left(b - c\right) + \left(\left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right) \cdot \left(b - c\right)\right))_*\right)}}\]
    6. Simplified1.6

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

    if -1.5324354381186935e-213 < y

    1. Initial program 3.6

      \[\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. Using strategy rm
    3. Applied div-inv3.6

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \left(\color{blue}{\left(z \cdot \sqrt{t + a}\right) \cdot \frac{1}{t}} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}\]
    4. Applied fma-neg2.5

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \color{blue}{(\left(z \cdot \sqrt{t + a}\right) \cdot \left(\frac{1}{t}\right) + \left(-\left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right))_*}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification2.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le -1.5324354381186935 \cdot 10^{-213}:\\ \;\;\;\;\frac{x}{x + e^{2.0 \cdot (\left(c - b\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{3.0 \cdot t}\right) + \left(\sqrt{t + a} \cdot \frac{z}{t}\right))_*} \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2.0 \cdot (\left(z \cdot \sqrt{t + a}\right) \cdot \left(\frac{1}{t}\right) + \left(\left(-\left(b - c\right)\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{3.0 \cdot t}\right)\right))_*}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019007 +o rules:numerics
(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)))))))))))

Details

Time bar (total: 49.9s)Debug log

sample275.0ms

Algorithm
intervals

simplify220.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

219.0ms
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))

prune15.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 3.4b

localize75.0ms

Local error

Found 4 expressions with local error:

6.1b
(/ (* z (sqrt (+ t a))) t)
2.0b
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))
0.2b
(* z (sqrt (+ t a)))
0.2b
(/ 2.0 (* t 3.0))

rewrite19.0ms

Algorithm
rewrite-expression-head
Counts
4 → 112
Calls

4 calls. Slowest were:

11.0ms
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))
4.0ms
(/ (* z (sqrt (+ t a))) t)
2.0ms
(* z (sqrt (+ t a)))

series284.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

171.0ms
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))
57.0ms
(/ (* z (sqrt (+ t a))) t)
44.0ms
(* z (sqrt (+ t a)))
13.0ms
(/ 2.0 (* t 3.0))

simplify16.4s

Counts
92 → 124
Calls

92 calls. Slowest were:

779.0ms
(* (fma (- (sqrt (/ 2.0 (* t 3.0)))) (sqrt (/ 2.0 (* t 3.0))) (* (sqrt (/ 2.0 (* t 3.0))) (sqrt (/ 2.0 (* t 3.0))))) (- b c))
581.0ms
(* t (* (+ b c) (* (- a (/ 5.0 6.0)) (* t 3.0))))
558.0ms
(* (- b c) (fma (- (sqrt (/ 2.0 (* t 3.0)))) (sqrt (/ 2.0 (* t 3.0))) (* (sqrt (/ 2.0 (* t 3.0))) (sqrt (/ 2.0 (* t 3.0))))))

prune2.7s

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0b

localize40.0ms

Local error

Found 4 expressions with local error:

5.7b
(* (/ z t) (sqrt (+ a t)))
1.6b
(fma (- c b) (- (+ (/ 5.0 6.0) a) (/ 2.0 (* t 3.0))) (* (/ z t) (sqrt (+ a t))))
0.2b
(/ 2.0 (* t 3.0))
0.0b
(+ (/ 5.0 6.0) a)

rewrite16.0ms

Algorithm
rewrite-expression-head
Counts
4 → 67
Calls

4 calls. Slowest were:

12.0ms
(* (/ z t) (sqrt (+ a t)))
2.0ms
(+ (/ 5.0 6.0) a)
0.0ms
(/ 2.0 (* t 3.0))

series232.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

161.0ms
(fma (- c b) (- (+ (/ 5.0 6.0) a) (/ 2.0 (* t 3.0))) (* (/ z t) (sqrt (+ a t))))
42.0ms
(* (/ z t) (sqrt (+ a t)))
16.0ms
(+ (/ 5.0 6.0) a)
13.0ms
(/ 2.0 (* t 3.0))

simplify1.1s

Counts
32 → 79
Calls

32 calls. Slowest were:

483.0ms
(* (* (* (/ z t) (/ z t)) (/ z t)) (* (* (sqrt (+ a t)) (sqrt (+ a t))) (sqrt (+ a t))))
115.0ms
(- (* a c) (+ (* a b) (* 0.8333333333333334 b)))
91.0ms
(* z (sqrt (- (* a a) (* t t))))

prune1.8s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize21.0ms

Local error

Found 4 expressions with local error:

5.7b
(fma (* z (sqrt (+ t a))) (/ 1 t) (- (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))
0.2b
(* z (sqrt (+ t a)))
0.2b
(/ 2.0 (* t 3.0))
0.1b
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))

rewrite30.0ms

Algorithm
rewrite-expression-head
Counts
4 → 106
Calls

4 calls. Slowest were:

24.0ms
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))
2.0ms
(* z (sqrt (+ t a)))
0.0ms
(/ 2.0 (* t 3.0))

series312.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

199.0ms
(fma (* z (sqrt (+ t a))) (/ 1 t) (- (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))
64.0ms
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))
36.0ms
(* z (sqrt (+ t a)))
12.0ms
(/ 2.0 (* t 3.0))

simplify12.6s

Counts
82 → 118
Calls

82 calls. Slowest were:

741.0ms
(* (+ (* b b) (+ (* c c) (* b c))) (* (- a (/ 5.0 6.0)) (* t 3.0)))
578.0ms
(* (+ b c) (* (+ (* a a) (- (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a (/ 5.0 6.0)))) (* t 3.0)))
514.0ms
(* (fma (- (sqrt (/ 2.0 (* t 3.0)))) (sqrt (/ 2.0 (* t 3.0))) (* (sqrt (/ 2.0 (* t 3.0))) (sqrt (/ 2.0 (* t 3.0))))) (- b c))

prune2.8s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize35.0ms

Local error

Found 3 expressions with local error:

0.2b
(* y (exp (* 2.0 (+ (fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c)) 0))))
0.1b
(fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c))
0.0b
(/ x (+ x (* y (exp (* 2.0 (+ (fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c)) 0))))))

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
3 → 42
Calls

3 calls. Slowest were:

3.0ms
(* y (exp (* 2.0 (+ (fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c)) 0))))
0.0ms
(/ x (+ x (* y (exp (* 2.0 (+ (fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c)) 0))))))
0.0ms
(fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c))

series290.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

168.0ms
(/ x (+ x (* y (exp (* 2.0 (+ (fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c)) 0))))))
79.0ms
(* y (exp (* 2.0 (+ (fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c)) 0))))
43.0ms
(fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c))

simplify2.4s

Counts
19 → 51
Calls

19 calls. Slowest were:

615.0ms
(sqrt (+ x (* y (exp (* 2.0 (+ (fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c)) 0))))))
225.0ms
(sqrt (exp (* 2.0 (+ (fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c)) 0))))
210.0ms
(exp (* 2.0 (+ (fma (/ 0.6666666666666666 t) (- b c) (* 0.8333333333333334 c)) 0)))

prune901.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes593.0ms

Accuracy

-23.6% (2.0b remaining)

Error of 2.1b against oracle of 0.1b and baseline of 1.7b

bsearch839.0ms

end0.0ms

sample5.9s

Algorithm
intervals