Average Error: 3.8 → 3.8
Time: 3.3m
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}\;t \le -5.35729014039294 \cdot 10^{-28}:\\ \;\;\;\;\frac{x}{y \cdot e^{2.0 \cdot \left(c \cdot 0.8333333333333334 - \left(b - c\right) \cdot a\right)} + x}\\ \mathbf{elif}\;t \le -4.263262868647511 \cdot 10^{-303}:\\ \;\;\;\;\frac{x}{y \cdot e^{2.0 \cdot \frac{\left(t \cdot \left(a - \frac{5.0}{6.0}\right)\right) \cdot \left(\sqrt{t + a} \cdot z\right) - \left(\left(t \cdot \left(a \cdot a - \frac{5.0}{6.0} \cdot \frac{5.0}{6.0}\right) - 0.6666666666666666 \cdot \left(a - \frac{5.0}{6.0}\right)\right) \cdot \left(b - c\right)\right) \cdot t}{\left(t \cdot \left(a - \frac{5.0}{6.0}\right)\right) \cdot t}} + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{\sqrt{t + a} \cdot z}{t} - \left(b - c\right) \cdot \left(\left(\frac{5.0}{6.0} + a\right) - \frac{0.6666666666666666}{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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if t < -5.35729014039294e-28

    1. Initial program 2.9

      \[\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 6.9

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \color{blue}{\left(\left(a \cdot c + 0.8333333333333334 \cdot c\right) - a \cdot b\right)}}}\]
    3. Simplified3.4

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

    if -5.35729014039294e-28 < t < -4.263262868647511e-303

    1. Initial program 6.2

      \[\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 6.2

      \[\leadsto \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) - \color{blue}{\frac{0.6666666666666666}{t}}\right)\right)}}\]
    3. Using strategy rm
    4. Applied flip-+8.6

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

      \[\leadsto \frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \color{blue}{\frac{\left(a \cdot a - \frac{5.0}{6.0} \cdot \frac{5.0}{6.0}\right) \cdot t - \left(a - \frac{5.0}{6.0}\right) \cdot 0.6666666666666666}{\left(a - \frac{5.0}{6.0}\right) \cdot t}}\right)}}\]
    6. Applied associate-*r/8.7

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

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

    if -4.263262868647511e-303 < t

    1. Initial program 3.3

      \[\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 3.3

      \[\leadsto \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) - \color{blue}{\frac{0.6666666666666666}{t}}\right)\right)}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification3.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -5.35729014039294 \cdot 10^{-28}:\\ \;\;\;\;\frac{x}{y \cdot e^{2.0 \cdot \left(c \cdot 0.8333333333333334 - \left(b - c\right) \cdot a\right)} + x}\\ \mathbf{elif}\;t \le -4.263262868647511 \cdot 10^{-303}:\\ \;\;\;\;\frac{x}{y \cdot e^{2.0 \cdot \frac{\left(t \cdot \left(a - \frac{5.0}{6.0}\right)\right) \cdot \left(\sqrt{t + a} \cdot z\right) - \left(\left(t \cdot \left(a \cdot a - \frac{5.0}{6.0} \cdot \frac{5.0}{6.0}\right) - 0.6666666666666666 \cdot \left(a - \frac{5.0}{6.0}\right)\right) \cdot \left(b - c\right)\right) \cdot t}{\left(t \cdot \left(a - \frac{5.0}{6.0}\right)\right) \cdot t}} + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{\sqrt{t + a} \cdot z}{t} - \left(b - c\right) \cdot \left(\left(\frac{5.0}{6.0} + a\right) - \frac{0.6666666666666666}{t}\right)\right)}}\\ \end{array}\]

Reproduce

herbie shell --seed 2018365 
(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: 3.1m)Debug log

start787.0ms

Algorithm
intervals

setup266.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 2.9b

localize86.0ms

Local error

Found 4 expressions with local error:

5.4b
(/ (* z (sqrt (+ t a))) t)
1.2b
(- (/ (* 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.2b
(* z (sqrt (+ t a)))

rewrite24.0ms

Algorithm
rewrite-expression-head
Counts
4 → 72
Calls

4 calls. Slowest were:

17.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)))

series279.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

159.0ms
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))
59.0ms
(* z (sqrt (+ t a)))
51.0ms
(/ (* z (sqrt (+ t a))) t)
10.0ms
(/ 2.0 (* t 3.0))

simplify9.0s

Counts
57 → 84
Calls

57 calls. Slowest were:

622.0ms
(* t (* (+ b c) (* (- a (/ 5.0 6.0)) (* t 3.0))))
559.0ms
(- (* (* z (sqrt (+ t a))) (* (+ (* b b) (+ (* c c) (* b c))) (+ (* (+ a (/ 5.0 6.0)) (+ a (/ 5.0 6.0))) (+ (* (/ 2.0 (* t 3.0)) (/ 2.0 (* t 3.0))) (* (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))) (* t (* (- (pow b 3) (pow c 3)) (- (pow (+ a (/ 5.0 6.0)) 3) (pow (/ 2.0 (* t 3.0)) 3)))))
509.0ms
(- (* (* z (sqrt (+ t a))) (* (+ b c) (+ (* (+ a (/ 5.0 6.0)) (+ a (/ 5.0 6.0))) (+ (* (/ 2.0 (* t 3.0)) (/ 2.0 (* t 3.0))) (* (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))) (* t (* (- (* b b) (* c c)) (- (pow (+ a (/ 5.0 6.0)) 3) (pow (/ 2.0 (* t 3.0)) 3)))))

prune2.4s

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0.2b

localize36.0ms

Local error

Found 4 expressions with local error:

5.4b
(/ (* z (sqrt (+ t a))) t)
1.2b
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 0.6666666666666666 t))))
0.2b
(* z (sqrt (+ t a)))
0.1b
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 0.6666666666666666 t)))

rewrite49.0ms

Algorithm
rewrite-expression-head
Counts
4 → 100
Calls

4 calls. Slowest were:

18.0ms
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 0.6666666666666666 t))))
18.0ms
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 0.6666666666666666 t)))
7.0ms
(/ (* z (sqrt (+ t a))) t)

series364.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

178.0ms
(- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 0.6666666666666666 t))))
68.0ms
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 0.6666666666666666 t)))
60.0ms
(* z (sqrt (+ t a)))
57.0ms
(/ (* z (sqrt (+ t a))) t)

simplify16.9s

Counts
95 → 112
Calls

95 calls. Slowest were:

1.1s
(* (+ (* b b) (+ (* c c) (* b c))) (* (+ (* a a) (- (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a (/ 5.0 6.0)))) t))
610.0ms
(* (- (pow b 3) (pow c 3)) (- (* (+ a (/ 5.0 6.0)) (+ a (/ 5.0 6.0))) (* (/ 0.6666666666666666 t) (/ 0.6666666666666666 t))))
531.0ms
(* t (* (+ b c) (* (+ (* a a) (- (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a (/ 5.0 6.0)))) t)))

prune3.2s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0.2b

localize24.0ms

Local error

Found 2 expressions with local error:

0.0b
(- (* 0.8333333333333334 c) (* (- b c) a))
0.0b
(* (- b c) a)

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
2 → 25
Calls

2 calls. Slowest were:

5.0ms
(* (- b c) a)
2.0ms
(- (* 0.8333333333333334 c) (* (- b c) a))

series57.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

35.0ms
(- (* 0.8333333333333334 c) (* (- b c) a))
21.0ms
(* (- b c) a)

simplify719.0ms

Counts
11 → 31
Calls

11 calls. Slowest were:

317.0ms
(* (- (* b b) (* c c)) a)
132.0ms
(/ (exp (* 0.8333333333333334 c)) (exp (* (- b c) a)))
75.0ms
(* (- (pow b 3) (pow c 3)) a)

prune587.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0.2b

localize81.0ms

Local error

Found 4 expressions with local error:

27.4b
(/ (- (* (* z (sqrt (+ t a))) (* (- a (/ 5.0 6.0)) t)) (* t (* (- b c) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666))))) (* t (* (- a (/ 5.0 6.0)) t)))
6.8b
(- (* (* z (sqrt (+ t a))) (* (- a (/ 5.0 6.0)) t)) (* t (* (- b c) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666)))))
3.4b
(* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t)
2.0b
(* t (* (- b c) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666))))

rewrite351.0ms

Algorithm
rewrite-expression-head
Counts
4 → 415
Calls

4 calls. Slowest were:

147.0ms
(/ (- (* (* z (sqrt (+ t a))) (* (- a (/ 5.0 6.0)) t)) (* t (* (- b c) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666))))) (* t (* (- a (/ 5.0 6.0)) t)))
126.0ms
(- (* (* z (sqrt (+ t a))) (* (- a (/ 5.0 6.0)) t)) (* t (* (- b c) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666)))))
45.0ms
(* t (* (- b c) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666))))

series1.3s

Counts
4 → 12
Calls

4 calls. Slowest were:

606.0ms
(/ (- (* (* z (sqrt (+ t a))) (* (- a (/ 5.0 6.0)) t)) (* t (* (- b c) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666))))) (* t (* (- a (/ 5.0 6.0)) t)))
464.0ms
(- (* (* z (sqrt (+ t a))) (* (- a (/ 5.0 6.0)) t)) (* t (* (- b c) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666)))))
163.0ms
(* t (* (- b c) (- (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666))))
26.0ms
(* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t)

simplify2.1m

Counts
551 → 427
Calls

551 calls. Slowest were:

1.1s
(* (* (sqrt (+ (* t t) (- (* a a) (* t a)))) (+ a (/ 5.0 6.0))) (* (+ (* b b) (+ (* c c) (* b c))) (* (+ (* (* a a) (* a a)) (+ (* (* (/ 5.0 6.0) (/ 5.0 6.0)) (* (/ 5.0 6.0) (/ 5.0 6.0))) (* (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))))) (+ (* a a) (+ (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a (/ 5.0 6.0)))))))
1.0s
(- (* (* (* z (sqrt (- (* t t) (* a a)))) (* (- (pow a 3) (pow (/ 5.0 6.0) 3)) t)) (+ (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666))) (* (* (sqrt (- t a)) (+ (* a a) (+ (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a (/ 5.0 6.0))))) (* t (* (- b c) (- (* (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t)) (* (* (- a (/ 5.0 6.0)) 0.6666666666666666) (* (- a (/ 5.0 6.0)) 0.6666666666666666)))))))
882.0ms
(- (* (* (* z (sqrt (+ (pow t 3) (pow a 3)))) (* (- a (/ 5.0 6.0)) t)) (+ (* (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t)) (+ (* (* (- a (/ 5.0 6.0)) 0.6666666666666666) (* (- a (/ 5.0 6.0)) 0.6666666666666666)) (* (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) (* (- a (/ 5.0 6.0)) 0.6666666666666666))))) (* (sqrt (+ (* t t) (- (* a a) (* t a)))) (* t (* (- b c) (- (pow (* (- (* a a) (* (/ 5.0 6.0) (/ 5.0 6.0))) t) 3) (pow (* (- a (/ 5.0 6.0)) 0.6666666666666666) 3))))))

prune19.7s

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0b

regimes567.0ms

Accuracy

-2.4% (3.6b remaining)

Error of 3.8b against oracle of 0.2b and baseline of 3.8b

bsearch995.0ms