Average Error: 4.2 → 0.2
Time: 1.5m
Precision: 64
Internal Precision: 128
\[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
\[\sqrt{\frac{{\left(e^{x}\right)}^{3} + 1}{e^{x} \cdot e^{x} + \left(1 - e^{x}\right)}}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 4.2

    \[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\sqrt{e^{x} + 1}}\]
  3. Using strategy rm
  4. Applied flip3-+0.2

    \[\leadsto \sqrt{\color{blue}{\frac{{\left(e^{x}\right)}^{3} + {1}^{3}}{e^{x} \cdot e^{x} + \left(1 \cdot 1 - e^{x} \cdot 1\right)}}}\]
  5. Final simplification0.2

    \[\leadsto \sqrt{\frac{{\left(e^{x}\right)}^{3} + 1}{e^{x} \cdot e^{x} + \left(1 - e^{x}\right)}}\]

Reproduce

herbie shell --seed 323378853 
(FPCore (x)
  :name "sqrtexp (problem 3.4.4)"
  (sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1))))

Details

Time bar (total: 1.5m)Debug log

sample486.0ms

Algorithm
intervals
Results
246.0ms189×body10240exit
66.0ms378×body80nan
50.0ms245×body80valid
7.0ms15×body160valid

simplify113.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
112.0ms
(sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1)))

prune24.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.5b

localize28.0ms

Local error

Found 2 expressions with local error:

0.5b
(sqrt (+ (exp x) 1))
0.0b
(+ (exp x) 1)

rewrite30.0ms

Algorithm
rewrite-expression-head
Rules
add-sqr-sqrt
sqrt-prod
add-cube-cbrt
*-un-lft-identity
add-log-exp
flip-+
add-exp-log
sqrt-div
add-cbrt-cube
flip3-+
pow1
pow1/2
rem-sqrt-square
+-commutative
Counts
2 → 24
Calls
2 calls:
Slowest
20.0ms
(sqrt (+ (exp x) 1))
6.0ms
(+ (exp x) 1)

series75.0ms

Counts
2 → 6
Calls
2 calls:
Slowest
59.0ms
(sqrt (+ (exp x) 1))
15.0ms
(+ (exp x) 1)

simplify398.0ms

Counts
12 → 30
Calls
12 calls:
Slowest
229.0ms
(- (+ (sqrt 2) (+ (* 1/4 (/ (pow x 2) (sqrt 2))) (* 1/2 (/ x (sqrt 2))))) (* 1/8 (/ (pow x 2) (pow (sqrt 2) 3))))
62.0ms
(sqrt (- (* (exp x) (exp x)) (* 1 1)))
49.0ms
(+ x (+ (* 1/2 (pow x 2)) 2))
20.0ms
(sqrt (+ (pow (exp x) 3) (pow 1 3)))
6.0ms
(sqrt (* (cbrt (+ (exp x) 1)) (cbrt (+ (exp x) 1))))

prune436.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.5b

localize78.0ms

Local error

Found 4 expressions with local error:

2.8b
(- (* 1 1) (* (exp x) 1))
0.5b
(sqrt (/ (+ (pow (exp x) 3) (pow 1 3)) (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))))
0.4b
(+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))
0.4b
(/ (+ (pow (exp x) 3) (pow 1 3)) (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1))))

rewrite120.0ms

Algorithm
rewrite-expression-head
Rules
46×*-un-lft-identity
37×times-frac
28×add-sqr-sqrt
25×add-cube-cbrt
24×sqrt-prod
14×distribute-lft-out
11×add-log-exp
sum-cubes
cube-mult
associate-/l*
add-exp-log
add-cbrt-cube
flip-+
associate-/r/
flip3-+
pow1
associate-/r*
associate-/l/
div-inv
diff-log
sub-neg
sum-log
associate-+r+
rem-sqrt-square
flip--
div-exp
sqrt-div
pow1/2
distribute-rgt-out--
flip3--
frac-2neg
associate-+r-
clear-num
+-commutative
cbrt-undiv
Counts
4 → 106
Calls
4 calls:
Slowest
57.0ms
(/ (+ (pow (exp x) 3) (pow 1 3)) (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1))))
36.0ms
(sqrt (/ (+ (pow (exp x) 3) (pow 1 3)) (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))))
17.0ms
(+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))
6.0ms
(- (* 1 1) (* (exp x) 1))

series328.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
162.0ms
(sqrt (/ (+ (pow (exp x) 3) (pow 1 3)) (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))))
99.0ms
(/ (+ (pow (exp x) 3) (pow 1 3)) (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1))))
39.0ms
(+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))
27.0ms
(- (* 1 1) (* (exp x) 1))

simplify12.8s

Counts
94 → 118
Calls
94 calls:
Slowest
834.0ms
(+ (* (* (exp x) (exp x)) (* (exp x) (exp x))) (- (* (- (* 1 1) (* (exp x) 1)) (- (* 1 1) (* (exp x) 1))) (* (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))))
718.0ms
(sqrt (/ (+ (pow (exp x) 3) (pow 1 3)) (- (* (* (exp x) (exp x)) (* (exp x) (exp x))) (* (- (* 1 1) (* (exp x) 1)) (- (* 1 1) (* (exp x) 1))))))
482.0ms
(sqrt (/ (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1))) (* (cbrt (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))) (cbrt (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))))))
478.0ms
(/ (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1))) (* (cbrt (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))) (cbrt (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1))))))
339.0ms
(sqrt (/ (+ (pow (exp x) 3) (pow 1 3)) (+ (pow (* (exp x) (exp x)) 3) (pow (- (* 1 1) (* (exp x) 1)) 3))))

prune2.4s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0.5b

localize29.0ms

Local error

Found 4 expressions with local error:

0.5b
(sqrt (cbrt (* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1))))
0.0b
(cbrt (* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1)))
0.0b
(* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1))
0.0b
(* (+ (exp x) 1) (+ (exp x) 1))

rewrite138.0ms

Algorithm
rewrite-expression-head
Rules
88×frac-times
87×flip-+
87×flip3-+
52×cbrt-div
44×associate-*l/
26×associate-*r/
26×sqrt-div
23×pow1
11×add-exp-log
11×add-cbrt-cube
add-sqr-sqrt
add-cube-cbrt
*-un-lft-identity
pow-prod-up
associate-*r*
pow-plus
add-log-exp
cbrt-unprod
sqrt-prod
prod-exp
pow-prod-down
associate-*l*
pow2
*-commutative
pow3
distribute-lft-in
distribute-rgt-in
cbrt-prod
rem-cbrt-cube
pow1/3
pow1/2
rem-sqrt-square
Counts
4 → 158
Calls
4 calls:
Slowest
54.0ms
(* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1))
37.0ms
(cbrt (* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1)))
24.0ms
(* (+ (exp x) 1) (+ (exp x) 1))
15.0ms
(sqrt (cbrt (* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1))))

series115.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
43.0ms
(sqrt (cbrt (* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1))))
34.0ms
(* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1))
24.0ms
(* (+ (exp x) 1) (+ (exp x) 1))
14.0ms
(cbrt (* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1)))

simplify51.0s

Counts
160 → 170
Calls
160 calls:
Slowest
1.5s
(* (* (* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1)) (* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1))) (* (* (+ (exp x) 1) (+ (exp x) 1)) (+ (exp x) 1)))
1.1s
(* (* (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1))) (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1)))) (+ (* (exp x) (exp x)) (- (* 1 1) (* (exp x) 1))))
1.1s
(* (* (+ (pow (exp x) 3) (pow 1 3)) (- (* (exp x) (exp x)) (* 1 1))) (- (* (exp x) (exp x)) (* 1 1)))
1.1s
(cbrt (* (* (+ (pow (exp x) 3) (pow 1 3)) (- (* (exp x) (exp x)) (* 1 1))) (- (* (exp x) (exp x)) (* 1 1))))
1.1s
(* (* (+ (exp x) 1) (- (* (exp x) (exp x)) (* 1 1))) (+ (exp x) 1))

prune3.4s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0.5b

regimes47.0ms

Accuracy

0% (0.0b remaining)

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

bsearch5.0ms

end0.0ms

sample15.3s

Algorithm
intervals
Results
9.9s6757×body10240exit
3.0s12683×body80nan
1.7s7418×body80valid
288.0ms696×body160valid