Average Error: 4.1 → 2.0
Time: 56.2s
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)}}\]
\[\frac{x}{x + y \cdot e^{(\left(\left(\frac{5.0}{6.0} + a\right) - \frac{\frac{2.0}{3.0}}{t}\right) \cdot \left(c - b\right) + \left(\sqrt{t + a} \cdot \frac{z}{t}\right))_* \cdot 2.0}}\]

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. Initial program 4.1

    \[\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-inv4.1

    \[\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 prod-diff22.7

    \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \color{blue}{\left((\left(z \cdot \sqrt{t + a}\right) \cdot \left(\frac{1}{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. Simplified20.8

    \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \left(\color{blue}{(\left(\left(\frac{5.0}{6.0} + a\right) - \frac{\frac{2.0}{3.0}}{t}\right) \cdot \left(c - b\right) + \left(\sqrt{t + a} \cdot \frac{z}{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. Simplified2.0

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

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

Reproduce

herbie shell --seed 2019016 +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: 55.4s)Debug log

sample317.0ms

Algorithm
intervals
Results
519×(pre true 80)
263×(body nan 80)
256×(body real 80)

simplify235.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
235.0ms
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))

prune13.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 2.9b

localize94.0ms

Local error

Found 4 expressions with local error:

5.7b
(/ (* z (sqrt (+ t a))) t)
1.4b
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))
0.3b
(/ 2.0 (* t 3.0))
0.3b
(* z (sqrt (+ t a)))

rewrite22.0ms

Algorithm
rewrite-expression-head
Rules
30×associate--r+
28×prod-diff
22×add-cube-cbrt
22×*-un-lft-identity
22×add-sqr-sqrt
20×frac-sub
15×distribute-lft-in
15×distribute-rgt-in
10×div-inv
flip--
flip3--
associate-*r/
frac-times
add-log-exp
associate-*r*
flip-+
flip3-+
log1p-expm1-u
add-exp-log
sqrt-div
fma-neg
add-cbrt-cube
pow1
expm1-log1p-u
sqrt-prod
sub-neg
associate-/l/
associate--l+
associate-*l/
frac-2neg
clear-num
associate-/l*
*-commutative
diff-log
associate-/r*
Counts
4 → 112
Calls
4 calls:
Slowest
11.0ms
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))
5.0ms
(/ (* z (sqrt (+ t a))) t)
3.0ms
(* z (sqrt (+ t a)))
0.0ms
(/ 2.0 (* t 3.0))

series294.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
179.0ms
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))
53.0ms
(* z (sqrt (+ t a)))
53.0ms
(/ (* z (sqrt (+ t a))) t)
8.0ms
(/ 2.0 (* t 3.0))

simplify16.9s

Counts
92 → 124
Calls
92 calls:
Slowest
903.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))
667.0ms
(* t (* (+ b c) (* (- a (/ 5.0 6.0)) (* t 3.0))))
633.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))))))
569.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))))))
500.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 (3 fresh and 0 done)

Merged error: 0b

localize47.0ms

Local error

Found 4 expressions with local error:

3.9b
(* (sqrt (+ t a)) (/ z t))
1.4b
(fma (- (+ (/ 5.0 6.0) a) (/ (/ 2.0 3.0) t)) (- c b) (* (sqrt (+ t a)) (/ z t)))
0.4b
(/ (/ 2.0 3.0) t)
0.0b
(- (+ (/ 5.0 6.0) a) (/ (/ 2.0 3.0) t))

rewrite55.0ms

Algorithm
rewrite-expression-head
Rules
18×*-un-lft-identity
18×add-sqr-sqrt
16×add-cube-cbrt
12×prod-diff
add-log-exp
div-inv
add-exp-log
associate-*l*
add-cbrt-cube
pow1
associate-/l*
log1p-expm1-u
associate-*r*
sqrt-div
expm1-log1p-u
flip-+
sqrt-prod
fma-neg
flip3-+
frac-sub
associate-*l/
frac-times
associate-/l/
difference-of-squares
distribute-lft-out--
flip--
fma-udef
cbrt-unprod
*-commutative
associate-*r/
associate--l+
prod-exp
pow-prod-down
diff-log
flip3--
frac-2neg
sub-neg
clear-num
Counts
4 → 89
Calls
4 calls:
Slowest
41.0ms
(- (+ (/ 5.0 6.0) a) (/ (/ 2.0 3.0) t))
8.0ms
(* (sqrt (+ t a)) (/ z t))
4.0ms
(/ (/ 2.0 3.0) t)
0.0ms
(fma (- (+ (/ 5.0 6.0) a) (/ (/ 2.0 3.0) t)) (- c b) (* (sqrt (+ t a)) (/ z t)))

series193.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
125.0ms
(fma (- (+ (/ 5.0 6.0) a) (/ (/ 2.0 3.0) t)) (- c b) (* (sqrt (+ t a)) (/ z t)))
41.0ms
(* (sqrt (+ t a)) (/ z t))
14.0ms
(- (+ (/ 5.0 6.0) a) (/ (/ 2.0 3.0) t))
12.0ms
(/ (/ 2.0 3.0) t)

simplify5.7s

Counts
67 → 101
Calls
67 calls:
Slowest
393.0ms
(fma 1 (+ (/ 5.0 6.0) a) (- (* (/ 1 t) (/ 2.0 3.0))))
384.0ms
(fma (sqrt (+ (/ 5.0 6.0) a)) (sqrt (+ (/ 5.0 6.0) a)) (- (* (/ 1 t) (/ 2.0 3.0))))
357.0ms
(fma (* (cbrt (+ (/ 5.0 6.0) a)) (cbrt (+ (/ 5.0 6.0) a))) (cbrt (+ (/ 5.0 6.0) a)) (- (* (/ 1 t) (/ 2.0 3.0))))
324.0ms
(* (* (* (sqrt (+ t a)) (sqrt (+ t a))) (sqrt (+ t a))) (* (* (/ z t) (/ z t)) (/ z t)))
321.0ms
(- (* (+ (pow (/ 5.0 6.0) 3) (pow a 3)) t) (* (+ (* (/ 5.0 6.0) (/ 5.0 6.0)) (- (* a a) (* (/ 5.0 6.0) a))) (/ 2.0 3.0)))

prune2.3s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize49.0ms

Local error

Found 4 expressions with local error:

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

rewrite31.0ms

Algorithm
rewrite-expression-head
Rules
24×prod-diff
24×*-un-lft-identity
24×add-sqr-sqrt
22×add-cube-cbrt
15×distribute-lft-in
15×distribute-rgt-in
11×associate-*r*
flip--
flip3--
frac-times
div-inv
frac-sub
add-exp-log
associate-*r/
add-cbrt-cube
pow1
add-log-exp
log1p-expm1-u
flip-+
flip3-+
expm1-log1p-u
sqrt-prod
associate-*l*
*-commutative
associate--l+
associate-*l/
sqrt-div
sub-neg
difference-of-squares
distribute-lft-out--
fma-udef
cbrt-unprod
prod-exp
pow-prod-down
frac-2neg
associate-/r*
clear-num
Counts
4 → 106
Calls
4 calls:
Slowest
23.0ms
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))
4.0ms
(* z (sqrt (+ t a)))
1.0ms
(/ 2.0 (* t 3.0))
0.0ms
(fma (* z (sqrt (+ t a))) (/ 1 t) (- (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))

series330.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
190.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))))
62.0ms
(* z (sqrt (+ t a)))
14.0ms
(/ 2.0 (* t 3.0))

simplify12.9s

Counts
82 → 118
Calls
82 calls:
Slowest
740.0ms
(* (+ (* b b) (+ (* c c) (* b c))) (* (- a (/ 5.0 6.0)) (* t 3.0)))
709.0ms
(* (+ b c) (* (+ (* a a) (- (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a (/ 5.0 6.0)))) (* t 3.0)))
660.0ms
(* (- (* b b) (* c c)) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))
593.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))))))
569.0ms
(* (- (pow b 3) (pow c 3)) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) (* t 3.0)) (* (- a (/ 5.0 6.0)) 2.0)))

prune2.7s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize34.0ms

Local error

Found 3 expressions with local error:

0.0b
(* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c)))))
0.0b
(fma (- c b) a (* 0.8333333333333334 c))
0.0b
(/ x (+ x (* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c)))))))

rewrite7.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
associate-*r*
*-un-lft-identity
add-sqr-sqrt
add-log-exp
log1p-expm1-u
fma-udef
add-exp-log
add-cbrt-cube
associate-/r*
pow1
expm1-log1p-u
associate-/r/
exp-sum
div-inv
flip-+
*-commutative
flip3-+
distribute-lft-in
frac-2neg
clear-num
distribute-rgt-in
Counts
3 → 42
Calls
3 calls:
Slowest
6.0ms
(* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c)))))
1.0ms
(/ x (+ x (* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c)))))))
0.0ms
(fma (- c b) a (* 0.8333333333333334 c))

series207.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
110.0ms
(/ x (+ x (* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c)))))))
75.0ms
(* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c)))))
21.0ms
(fma (- c b) a (* 0.8333333333333334 c))

simplify2.4s

Counts
19 → 51
Calls
19 calls:
Slowest
294.0ms
(- x (* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c))))))
290.0ms
(+ (* x x) (- (* (* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c))))) (* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c)))))) (* x (* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c))))))))
217.0ms
(exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c))))
216.0ms
(sqrt (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c)))))
205.0ms
(+ x (* y (exp (* 2.0 (fma (- c b) a (* 0.8333333333333334 c))))))

prune598.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes612.0ms

Accuracy

0% (2.0b remaining)

Error of 2.0b against oracle of 0.0b and baseline of 2.0b

bsearch4.0ms

end0.0ms

sample6.7s

Algorithm
intervals
Results
16129×(pre true 80)
8129×(body nan 80)
8000×(body real 80)