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

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.0
Target0.0
Herbie0.0
\[d1 \cdot \left(d2 + d3\right)\]

Derivation

  1. Initial program 0.0

    \[d1 \cdot d2 + d1 \cdot d3\]
  2. Simplified0.0

    \[\leadsto \color{blue}{d1 \cdot \left(d2 + d3\right)}\]
  3. Final simplification0.0

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

Reproduce

herbie shell --seed 2019021 
(FPCore (d1 d2 d3)
  :name "FastMath dist"

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

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

Details

Time bar (total: 6.2s)Debug log

sample37.0ms

Algorithm
intervals
Results
26.0ms325×body80valid

simplify4.0ms

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

prune8.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize6.0ms

Local error

Found 1 expressions with local error:

0.0b
(* d1 (+ d2 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 d3))

series17.0ms

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

simplify81.0ms

Counts
10 → 18
Calls
10 calls:
Slowest
53.0ms
(+ (* d2 d2) (- (* d3 d3) (* d2 d3)))
6.0ms
(+ (* d3 d1) (* d2 d1))
5.0ms
(+ (* d2 d1) (* d3 d1))
4.0ms
(+ (* d3 d1) (* d2 d1))
3.0ms
(cbrt (+ d2 d3))

prune151.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0.0b

localize15.0ms

Local error

Found 1 expressions with local error:

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

rewrite4.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
distribute-lft-out
flip-+
add-cube-cbrt
add-exp-log
add-cbrt-cube
flip3-+
*-un-lft-identity
sum-log
+-commutative
pow1
add-sqr-sqrt
Counts
1 → 12
Calls
1 calls:
Slowest
4.0ms
(+ (* d1 d2) (* d1 d3))

series22.0ms

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

simplify25.0ms

Counts
5 → 15
Calls
5 calls:
Slowest
9.0ms
(* (exp (* d1 d2)) (exp (* d1 d3)))
5.0ms
(+ (* d2 d1) (* d3 d1))
5.0ms
(+ (* d3 d1) (* d2 d1))
4.0ms
(+ (* d3 d1) (* d2 d1))
1.0ms
(+ d2 d3)

prune136.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0.0b

localize10.0ms

Local error

Found 4 expressions with local error:

0.6b
(cbrt (+ d2 d3))
0.6b
(cbrt (+ d2 d3))
0.6b
(cbrt (+ d2 d3))
0.6b
(* (cbrt (+ d2 d3)) (cbrt (+ d2 d3)))

rewrite13.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
9.0ms
(* (cbrt (+ d2 d3)) (cbrt (+ d2 d3)))
1.0ms
(cbrt (+ d2 d3))
0.0ms
(cbrt (+ d2 d3))
0.0ms
(cbrt (+ d2 d3))

series644.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
221.0ms
(* (cbrt (+ d2 d3)) (cbrt (+ d2 d3)))
167.0ms
(cbrt (+ d2 d3))
137.0ms
(cbrt (+ d2 d3))
120.0ms
(cbrt (+ d2 d3))

simplify1.3s

Counts
59 → 87
Calls
59 calls:
Slowest
144.0ms
(- (+ (pow d3 1/3) (* 1/3 (* (pow (/ 1 (pow d3 2)) 1/3) d2))) (* 1/9 (* (pow (/ 1 (pow d3 5)) 1/3) (pow d2 2))))
137.0ms
(- (+ (pow d3 1/3) (* 1/3 (* (pow (/ 1 (pow d3 2)) 1/3) d2))) (* 1/9 (* (pow (/ 1 (pow d3 5)) 1/3) (pow d2 2))))
126.0ms
(- (+ (* 2/3 (* (pow (/ 1 d3) 1/3) d2)) (pow d3 2/3)) (* 1/9 (* (pow (/ 1 (pow d3 4)) 1/3) (pow d2 2))))
114.0ms
(- (+ (pow d3 1/3) (* 1/3 (* (pow (/ 1 (pow d3 2)) 1/3) d2))) (* 1/9 (* (pow (/ 1 (pow d3 5)) 1/3) (pow d2 2))))
71.0ms
(* (cbrt (+ (pow d2 3) (pow d3 3))) (cbrt (- (* d2 d2) (* d3 d3))))

prune723.0ms

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0b

localize34.0ms

Local error

Found 4 expressions with local error:

25.8b
(cbrt (- (* d2 d2) (* d3 d3)))
2.7b
(- (* d2 d2) (* d3 d3))
0.6b
(cbrt (- d2 d3))
0.6b
(cbrt (+ d2 d3))

rewrite9.0ms

Algorithm
rewrite-expression-head
Rules
10×cbrt-prod
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
cbrt-div
add-exp-log
add-cbrt-cube
pow1
flip--
pow1/3
flip3--
difference-of-squares
flip-+
diff-log
flip3-+
sub-neg
Counts
4 → 53
Calls
4 calls:
Slowest
4.0ms
(- (* d2 d2) (* d3 d3))
3.0ms
(cbrt (- (* d2 d2) (* d3 d3)))
1.0ms
(cbrt (- d2 d3))
1.0ms
(cbrt (+ d2 d3))

series374.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
132.0ms
(cbrt (- d2 d3))
119.0ms
(cbrt (+ d2 d3))
104.0ms
(cbrt (- (* d2 d2) (* d3 d3)))
19.0ms
(- (* d2 d2) (* d3 d3))

simplify1.2s

Counts
31 → 65
Calls
31 calls:
Slowest
214.0ms
(- (exp (* 1/3 (+ (log d3) (log -1)))) (+ (* 1/9 (* (exp (* 1/3 (- (log -1) (* 5 (log d3))))) (pow d2 2))) (* 1/3 (* (exp (* 1/3 (- (log -1) (* 2 (log d3))))) d2))))
197.0ms
(- (exp (* 1/3 (+ (* 2 (log d3)) (log -1)))) (* 1/3 (* (exp (* 1/3 (- (log -1) (* 4 (log d3))))) (pow d2 2))))
150.0ms
(cbrt (- (pow (* d2 d2) 3) (pow (* d3 d3) 3)))
130.0ms
(- (+ (pow d3 1/3) (* 1/3 (* (pow (/ 1 (pow d3 2)) 1/3) d2))) (* 1/9 (* (pow (/ 1 (pow d3 5)) 1/3) (pow d2 2))))
123.0ms
(cbrt (- (* (* d2 d2) (* d2 d2)) (* (* d3 d3) (* d3 d3))))

prune687.0ms

Pruning

4 alts after pruning (0 fresh and 4 done)

Merged error: 0b

regimes127.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms

end0.0ms

sample657.0ms

Algorithm
intervals
Results
546.0ms10094×body80valid