Average Error: 0.1 → 0.1
Time: 35.7s
Precision: 64
Internal Precision: 128
\[\left(d1 \cdot 3 + d1 \cdot d2\right) + d1 \cdot d3\]
\[\left(d1 \cdot 3 + d2 \cdot d1\right) + d1 \cdot d3\]

Error

Bits error versus d1

Bits error versus d2

Bits error versus d3

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.1
Herbie0.1
\[d1 \cdot \left(\left(3 + d2\right) + d3\right)\]

Derivation

  1. Initial program 0.1

    \[\left(d1 \cdot 3 + d1 \cdot d2\right) + d1 \cdot d3\]
  2. Final simplification0.1

    \[\leadsto \left(d1 \cdot 3 + d2 \cdot d1\right) + d1 \cdot d3\]

Reproduce

herbie shell --seed 2019016 
(FPCore (d1 d2 d3)
  :name "FastMath test3"

  :herbie-target
  (* d1 (+ (+ 3 d2) d3))

  (+ (+ (* d1 3) (* d1 d2)) (* d1 d3)))

Details

Time bar (total: 35.0s)Debug log

sample42.0ms

Algorithm
intervals
Results
330×(pre true 80)
317×(body real 80)
(body real 320)
(body real 640)
(body real 1280)
(body real 160)

simplify48.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
48.0ms
(+ (+ (* d1 3) (* d1 d2)) (* d1 d3))

prune32.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize13.0ms

Local error

Found 1 expressions with local error:

0.0b
(* d1 (+ d2 (+ 3 d3)))

rewrite1.0ms

Algorithm
rewrite-expression-head
Rules
associate-*r*
add-cube-cbrt
associate-*r/
*-un-lft-identity
add-sqr-sqrt
add-log-exp
flip-+
*-commutative
add-exp-log
add-cbrt-cube
flip3-+
distribute-lft-in
pow1
distribute-rgt-in
Counts
1 → 15
Calls
1 calls:
Slowest
1.0ms
(* d1 (+ d2 (+ 3 d3)))

series18.0ms

Counts
1 → 3
Calls
1 calls:
Slowest
18.0ms
(* d1 (+ d2 (+ 3 d3)))

simplify298.0ms

Counts
10 → 18
Calls
10 calls:
Slowest
159.0ms
(+ (* d2 d2) (- (* (+ 3 d3) (+ 3 d3)) (* d2 (+ 3 d3))))
43.0ms
(+ (* d2 d1) (+ (* d3 d1) (* 3 d1)))
24.0ms
(+ (* d2 d1) (+ (* d3 d1) (* 3 d1)))
23.0ms
(+ (* d2 d1) (+ (* d3 d1) (* 3 d1)))
21.0ms
(- d2 (+ 3 d3))

prune169.0ms

Pruning

4 alts after pruning (4 fresh and 0 done)

Merged error: 0.0b

localize12.0ms

Local error

Found 2 expressions with local error:

0.0b
(+ (* d1 3) (* d1 d2))
0.0b
(+ (+ (* d1 3) (* d1 d2)) (* d1 d3))

rewrite10.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
sum-log
distribute-lft-out
flip-+
add-cube-cbrt
add-exp-log
add-cbrt-cube
flip3-+
*-un-lft-identity
+-commutative
pow1
add-sqr-sqrt
associate-+l+
Counts
2 → 26
Calls
2 calls:
Slowest
8.0ms
(+ (+ (* d1 3) (* d1 d2)) (* d1 d3))
2.0ms
(+ (* d1 3) (* d1 d2))

series46.0ms

Counts
2 → 6
Calls
2 calls:
Slowest
24.0ms
(+ (+ (* d1 3) (* d1 d2)) (* d1 d3))
21.0ms
(+ (* d1 3) (* d1 d2))

simplify644.0ms

Counts
12 → 32
Calls
12 calls:
Slowest
234.0ms
(* (* (exp (* d1 3)) (exp (* d1 d2))) (exp (* d1 d3)))
175.0ms
(* (exp (+ (* d1 3) (* d1 d2))) (exp (* d1 d3)))
49.0ms
(+ (* d2 d1) (+ (* d3 d1) (* 3 d1)))
48.0ms
(+ (* d2 d1) (+ (* d3 d1) (* 3 d1)))
47.0ms
(+ (* d2 d1) (+ (* d3 d1) (* 3 d1)))

prune299.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.0b

localize22.0ms

Local error

Found 4 expressions with local error:

0.4b
(cbrt (+ d2 (+ 3 d3)))
0.4b
(cbrt (+ d2 (+ 3 d3)))
0.4b
(cbrt (+ d2 (+ 3 d3)))
0.4b
(* (cbrt (+ d2 (+ 3 d3))) (cbrt (+ d2 (+ 3 d3))))

rewrite17.0ms

Algorithm
rewrite-expression-head
Rules
18×cbrt-div
15×cbrt-prod
11×add-cube-cbrt
11×*-un-lft-identity
11×add-sqr-sqrt
flip-+
flip3-+
pow1
pow1/3
add-exp-log
associate-*l*
associate-*r*
add-log-exp
add-cbrt-cube
frac-times
pow-prod-up
associate-*r/
associate-*l/
pow-prod-down
cbrt-unprod
*-commutative
prod-exp
pow-plus
pow2
Counts
4 → 75
Calls
4 calls:
Slowest
11.0ms
(* (cbrt (+ d2 (+ 3 d3))) (cbrt (+ d2 (+ 3 d3))))
1.0ms
(cbrt (+ d2 (+ 3 d3)))
1.0ms
(cbrt (+ d2 (+ 3 d3)))
1.0ms
(cbrt (+ d2 (+ 3 d3)))

series361.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
103.0ms
(cbrt (+ d2 (+ 3 d3)))
101.0ms
(cbrt (+ d2 (+ 3 d3)))
83.0ms
(cbrt (+ d2 (+ 3 d3)))
75.0ms
(* (cbrt (+ d2 (+ 3 d3))) (cbrt (+ d2 (+ 3 d3))))

simplify6.4s

Counts
59 → 87
Calls
59 calls:
Slowest
454.0ms
(* (cbrt (- (* d2 d2) (* (+ 3 d3) (+ 3 d3)))) (cbrt (+ d2 (+ 3 d3))))
394.0ms
(cbrt (- (* d2 d2) (* (+ 3 d3) (+ 3 d3))))
386.0ms
(cbrt (+ (pow d2 3) (pow (+ 3 d3) 3)))
380.0ms
(cbrt (+ (pow d2 3) (pow (+ 3 d3) 3)))
378.0ms
(* (cbrt (+ (pow d2 3) (pow (+ 3 d3) 3))) (cbrt (+ (pow d2 3) (pow (+ 3 d3) 3))))

prune1.1s

Pruning

5 alts after pruning (3 fresh and 2 done)

Merged error: 0.0b

localize51.0ms

Local error

Found 4 expressions with local error:

20.9b
(cbrt (- (* d2 d2) (* (+ 3 d3) (+ 3 d3))))
2.5b
(- (* d2 d2) (* (+ 3 d3) (+ 3 d3)))
0.6b
(/ (cbrt (- (* d2 d2) (* (+ 3 d3) (+ 3 d3)))) (cbrt (- d2 (+ 3 d3))))
0.4b
(cbrt (- d2 (+ 3 d3)))

rewrite23.0ms

Algorithm
rewrite-expression-head
Rules
59×cbrt-prod
42×times-frac
36×add-cube-cbrt
36×*-un-lft-identity
36×add-sqr-sqrt
difference-of-squares
cbrt-div
associate-/l*
add-log-exp
add-exp-log
associate-/r*
flip--
flip3--
add-cbrt-cube
pow1
associate-/l/
associate--r+
associate-/r/
pow1/3
div-inv
div-exp
diff-log
distribute-lft-in
frac-2neg
sub-neg
clear-num
cbrt-undiv
distribute-rgt-in
Counts
4 → 113
Calls
4 calls:
Slowest
12.0ms
(/ (cbrt (- (* d2 d2) (* (+ 3 d3) (+ 3 d3)))) (cbrt (- d2 (+ 3 d3))))
4.0ms
(- (* d2 d2) (* (+ 3 d3) (+ 3 d3)))
3.0ms
(cbrt (- (* d2 d2) (* (+ 3 d3) (+ 3 d3))))
1.0ms
(cbrt (- d2 (+ 3 d3)))

series763.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
485.0ms
(/ (cbrt (- (* d2 d2) (* (+ 3 d3) (+ 3 d3)))) (cbrt (- d2 (+ 3 d3))))
168.0ms
(cbrt (- (* d2 d2) (* (+ 3 d3) (+ 3 d3))))
91.0ms
(cbrt (- d2 (+ 3 d3)))
18.0ms
(- (* d2 d2) (* (+ 3 d3) (+ 3 d3)))

simplify21.1s

Counts
130 → 125
Calls
130 calls:
Slowest
799.0ms
(cbrt (- (pow d2 3) (pow (+ 3 d3) 3)))
669.0ms
(cbrt (- (pow (* d2 d2) 3) (pow (* (+ 3 d3) (+ 3 d3)) 3)))
619.0ms
(cbrt (- (pow (* d2 d2) 3) (pow (* (+ 3 d3) (+ 3 d3)) 3)))
537.0ms
(cbrt (- (* (* d2 d2) (* d2 d2)) (* (* (+ 3 d3) (+ 3 d3)) (* (+ 3 d3) (+ 3 d3)))))
530.0ms
(cbrt (- (* (* d2 d2) (* d2 d2)) (* (* (+ 3 d3) (+ 3 d3)) (* (+ 3 d3) (+ 3 d3)))))

prune1.8s

Pruning

5 alts after pruning (2 fresh and 3 done)

Merged error: 0.0b

regimes234.0ms

Accuracy

0% (0.1b remaining)

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

bsearch1.0ms

end0.0ms

sample1.4s

Algorithm
intervals
Results
10133×(pre true 80)
9609×(body real 80)
214×(body real 640)
145×(body real 320)
90×(body real 1280)
75×(body real 160)