Average Error: 3.6 → 2.7
Time: 24.1s
Precision: 64
Internal Precision: 128
\[\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2\]
\[2 \cdot \sqrt[3]{\log \left(e^{a + \left(\left(b + c\right) + d\right)}\right) \cdot \left(\left(d + \left(\left(b + c\right) + a\right)\right) \cdot \left(a + \left(\left(b + c\right) + d\right)\right)\right)}\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original3.6
Target3.8
Herbie2.7
\[\left(a + b\right) \cdot 2 + \left(c + d\right) \cdot 2\]

Derivation

  1. Initial program 3.6

    \[\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2\]
  2. Using strategy rm
  3. Applied associate-+r+2.7

    \[\leadsto \left(a + \color{blue}{\left(\left(b + c\right) + d\right)}\right) \cdot 2\]
  4. Using strategy rm
  5. Applied add-cbrt-cube2.9

    \[\leadsto \color{blue}{\sqrt[3]{\left(\left(a + \left(\left(b + c\right) + d\right)\right) \cdot \left(a + \left(\left(b + c\right) + d\right)\right)\right) \cdot \left(a + \left(\left(b + c\right) + d\right)\right)}} \cdot 2\]
  6. Using strategy rm
  7. Applied associate-+r+2.7

    \[\leadsto \sqrt[3]{\left(\color{blue}{\left(\left(a + \left(b + c\right)\right) + d\right)} \cdot \left(a + \left(\left(b + c\right) + d\right)\right)\right) \cdot \left(a + \left(\left(b + c\right) + d\right)\right)} \cdot 2\]
  8. Using strategy rm
  9. Applied add-log-exp2.7

    \[\leadsto \sqrt[3]{\left(\left(\left(a + \left(b + c\right)\right) + d\right) \cdot \left(a + \left(\left(b + c\right) + d\right)\right)\right) \cdot \color{blue}{\log \left(e^{a + \left(\left(b + c\right) + d\right)}\right)}} \cdot 2\]
  10. Final simplification2.7

    \[\leadsto 2 \cdot \sqrt[3]{\log \left(e^{a + \left(\left(b + c\right) + d\right)}\right) \cdot \left(\left(d + \left(\left(b + c\right) + a\right)\right) \cdot \left(a + \left(\left(b + c\right) + d\right)\right)\right)}\]

Reproduce

herbie shell --seed 2019022 
(FPCore (a b c d)
  :name "Expression, p6"
  :pre (and (<= -14 a -13) (<= -3 b -2) (<= 3 c 3.5) (<= 12.5 d 13.5))

  :herbie-target
  (+ (* (+ a b) 2) (* (+ c d) 2))

  (* (+ a (+ b (+ c d))) 2))

Details

Time bar (total: 20.7s)Debug log

sample37.0ms

Algorithm
intervals
Results
11.0ms256×pre80true
11.0ms256×body80valid

simplify231.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
231.0ms
(* (+ a (+ b (+ c d))) 2)

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 3.7b

localize27.0ms

Local error

Found 2 expressions with local error:

2.7b
(+ a (+ b (+ c d)))
0.5b
(+ b (+ c d))

rewrite4.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
flip-+
add-cube-cbrt
add-exp-log
add-cbrt-cube
flip3-+
*-un-lft-identity
associate-+r+
+-commutative
pow1
add-sqr-sqrt
Counts
2 → 22
Calls
2 calls:
Slowest
2.0ms
(+ a (+ b (+ c d)))
1.0ms
(+ b (+ c d))

series38.0ms

Counts
2 → 6
Calls
2 calls:
Slowest
27.0ms
(+ a (+ b (+ c d)))
10.0ms
(+ b (+ c d))

simplify37.0ms

Counts
7 → 28
Calls
7 calls:
Slowest
6.0ms
(+ a (+ b c))
6.0ms
(+ b (+ c d))
6.0ms
(+ b (+ c d))
5.0ms
(+ b (+ c d))
5.0ms
(+ b (+ c d))

prune212.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 2.3b

localize13.0ms

Local error

Found 1 expressions with local error:

2.7b
(+ a (+ (+ b c) d))

rewrite3.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
flip-+
add-cube-cbrt
add-exp-log
add-cbrt-cube
flip3-+
*-un-lft-identity
associate-+r+
+-commutative
pow1
add-sqr-sqrt
Counts
1 → 11
Calls
1 calls:
Slowest
3.0ms
(+ a (+ (+ b c) d))

series20.0ms

Counts
1 → 3
Calls
1 calls:
Slowest
20.0ms
(+ a (+ (+ b c) d))

simplify29.0ms

Counts
3 → 14
Calls
3 calls:
Slowest
10.0ms
(+ b (+ c d))
10.0ms
(+ b (+ c d))
8.0ms
(+ a (+ b c))

prune123.0ms

Pruning

12 alts after pruning (11 fresh and 1 done)

Merged error: 2.0b

localize16.0ms

Local error

Found 4 expressions with local error:

2.7b
(+ a (+ (+ b c) d))
2.7b
(+ a (+ (+ b c) d))
2.7b
(+ a (+ (+ b c) d))
0.5b
(cbrt (* (* (+ a (+ (+ b c) d)) (+ a (+ (+ b c) d))) (+ a (+ (+ b c) d))))

rewrite34.0ms

Algorithm
rewrite-expression-head
Rules
30×flip-+
30×flip3-+
28×frac-times
26×cbrt-div
14×associate-*l/
associate-*r/
add-log-exp
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
associate-+r+
+-commutative
rem-cbrt-cube
pow3
pow1/3
cbrt-prod
Counts
4 → 69
Calls
4 calls:
Slowest
22.0ms
(cbrt (* (* (+ a (+ (+ b c) d)) (+ a (+ (+ b c) d))) (+ a (+ (+ b c) d))))
4.0ms
(+ a (+ (+ b c) d))
3.0ms
(+ a (+ (+ b c) d))
3.0ms
(+ a (+ (+ b c) d))

series122.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
48.0ms
(cbrt (* (* (+ a (+ (+ b c) d)) (+ a (+ (+ b c) d))) (+ a (+ (+ b c) d))))
27.0ms
(+ a (+ (+ b c) d))
25.0ms
(+ a (+ (+ b c) d))
21.0ms
(+ a (+ (+ b c) d))

simplify6.5s

Counts
39 → 81
Calls
39 calls:
Slowest
822.0ms
(cbrt (* (+ a (+ (+ b c) d)) (+ a (+ (+ b c) d))))
541.0ms
(cbrt (* (* (+ (pow a 3) (pow (+ (+ b c) d) 3)) (+ a (+ (+ b c) d))) (+ (pow a 3) (pow (+ (+ b c) d) 3))))
382.0ms
(cbrt (* (* (+ a (+ (+ b c) d)) (+ (pow a 3) (pow (+ (+ b c) d) 3))) (+ (pow a 3) (pow (+ (+ b c) d) 3))))
365.0ms
(cbrt (* (* (- (* a a) (* (+ (+ b c) d) (+ (+ b c) d))) (+ (pow a 3) (pow (+ (+ b c) d) 3))) (+ a (+ (+ b c) d))))
314.0ms
(cbrt (* (* (- (* a a) (* (+ (+ b c) d) (+ (+ b c) d))) (+ a (+ (+ b c) d))) (+ (pow a 3) (pow (+ (+ b c) d) 3))))

prune1.1s

Pruning

21 alts after pruning (20 fresh and 1 done)

Merged error: 1.7b

localize17.0ms

Local error

Found 4 expressions with local error:

2.7b
(+ a (+ (+ b c) d))
2.7b
(+ a (+ (+ b c) d))
2.7b
(+ (+ a (+ b c)) d)
0.5b
(cbrt (* (* (+ (+ a (+ b c)) d) (+ a (+ (+ b c) d))) (+ a (+ (+ b c) d))))

rewrite41.0ms

Algorithm
rewrite-expression-head
Rules
30×flip-+
30×flip3-+
28×frac-times
26×cbrt-div
14×associate-*l/
associate-*r/
add-log-exp
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
+-commutative
associate-+r+
pow1/3
associate-+l+
cbrt-prod
Counts
4 → 68
Calls
4 calls:
Slowest
30.0ms
(cbrt (* (* (+ (+ a (+ b c)) d) (+ a (+ (+ b c) d))) (+ a (+ (+ b c) d))))
4.0ms
(+ (+ a (+ b c)) d)
3.0ms
(+ a (+ (+ b c) d))
3.0ms
(+ a (+ (+ b c) d))

series206.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
122.0ms
(cbrt (* (* (+ (+ a (+ b c)) d) (+ a (+ (+ b c) d))) (+ a (+ (+ b c) d))))
33.0ms
(+ (+ a (+ b c)) d)
30.0ms
(+ a (+ (+ b c) d))
20.0ms
(+ a (+ (+ b c) d))

simplify7.3s

Counts
39 → 80
Calls
39 calls:
Slowest
423.0ms
(cbrt (* (* (+ (+ a (+ b c)) d) (+ (pow a 3) (pow (+ (+ b c) d) 3))) (+ (pow a 3) (pow (+ (+ b c) d) 3))))
402.0ms
(cbrt (* (* (+ (+ a (+ b c)) d) (+ (pow a 3) (pow (+ (+ b c) d) 3))) (+ a (+ (+ b c) d))))
395.0ms
(cbrt (* (* (- (* (+ a (+ b c)) (+ a (+ b c))) (* d d)) (+ (pow a 3) (pow (+ (+ b c) d) 3))) (- (* a a) (* (+ (+ b c) d) (+ (+ b c) d)))))
367.0ms
(cbrt (* (* (+ (pow (+ a (+ b c)) 3) (pow d 3)) (+ a (+ (+ b c) d))) (+ (pow a 3) (pow (+ (+ b c) d) 3))))
358.0ms
(cbrt (* (* (- (* (+ a (+ b c)) (+ a (+ b c))) (* d d)) (- (* a a) (* (+ (+ b c) d) (+ (+ b c) d)))) (+ (pow a 3) (pow (+ (+ b c) d) 3))))

prune1.1s

Pruning

30 alts after pruning (29 fresh and 1 done)

Merged error: 1.3b

regimes1.6s

Accuracy

0% (1.3b remaining)

Error of 2.7b against oracle of 1.4b and baseline of 2.7b

bsearch4.0ms

end0.0ms

sample1.8s

Algorithm
intervals
Results
980.0ms8000×body80valid
573.0ms8000×pre80true