Average Error: 0.0 → 0.0
Time: 10.9s
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 2019022 
(FPCore (d1 d2 d3)
  :name "FastMath dist"

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

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

Details

Time bar (total: 10.6s)Debug log

sample25.0ms

Algorithm
intervals
Results
17.0ms333×body80valid

simplify5.0ms

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

prune8.0ms

Pruning

1 alts after pruning (1 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))

series18.0ms

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

simplify91.0ms

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

prune164.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize8.0ms

Local error

Found 4 expressions with local error:

1.9b
(cbrt (* d1 (+ d2 d3)))
1.9b
(cbrt (* d1 (+ d2 d3)))
1.9b
(cbrt (* d1 (+ d2 d3)))
0.5b
(* (cbrt (* d1 (+ d2 d3))) (cbrt (* d1 (+ d2 d3))))

rewrite10.0ms

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

series480.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
134.0ms
(cbrt (* d1 (+ d2 d3)))
121.0ms
(cbrt (* d1 (+ d2 d3)))
121.0ms
(* (cbrt (* d1 (+ d2 d3))) (cbrt (* d1 (+ d2 d3))))
103.0ms
(cbrt (* d1 (+ d2 d3)))

simplify4.4s

Counts
49 → 77
Calls
49 calls:
Slowest
331.0ms
(exp (* -1/3 (+ (* 2 (log (/ -1 d1))) (* 2 (log (/ -1 d2))))))
324.0ms
(* (cbrt (* d1 (+ (pow d2 3) (pow d3 3)))) (cbrt (* d1 (- (* d2 d2) (* d3 d3)))))
315.0ms
(exp (* -1/3 (+ (log (/ 1 d1)) (log (/ 1 d2)))))
303.0ms
(exp (* -1/3 (+ (log (/ 1 d1)) (log (/ 1 d2)))))
298.0ms
(* (cbrt (* d1 (- (* d2 d2) (* d3 d3)))) (cbrt (* d1 (- (* d2 d2) (* d3 d3)))))

prune770.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize11.0ms

Local error

Found 4 expressions with local error:

1.5b
(sqrt (* d1 (+ d2 d3)))
1.5b
(sqrt (* d1 (+ d2 d3)))
0.2b
(* (sqrt (* d1 (+ d2 d3))) (sqrt (* d1 (+ d2 d3))))
0.0b
(* d1 (+ d2 d3))

rewrite18.0ms

Algorithm
rewrite-expression-head
Rules
20×associate-*r/
16×sqrt-div
flip-+
flip3-+
pow1
add-cube-cbrt
associate-*r*
*-un-lft-identity
add-sqr-sqrt
add-exp-log
pow1/2
add-cbrt-cube
add-log-exp
sqrt-prod
associate-*l*
frac-times
pow-prod-up
*-commutative
associate-*l/
pow-prod-down
cbrt-unprod
prod-exp
sqrt-unprod
pow-plus
distribute-lft-in
rem-square-sqrt
distribute-rgt-in
pow2
Counts
4 → 71
Calls
4 calls:
Slowest
12.0ms
(* (sqrt (* d1 (+ d2 d3))) (sqrt (* d1 (+ d2 d3))))
2.0ms
(* d1 (+ d2 d3))
1.0ms
(sqrt (* d1 (+ d2 d3)))
1.0ms
(sqrt (* d1 (+ d2 d3)))

series125.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
47.0ms
(sqrt (* d1 (+ d2 d3)))
30.0ms
(sqrt (* d1 (+ d2 d3)))
28.0ms
(* d1 (+ d2 d3))
20.0ms
(* (sqrt (* d1 (+ d2 d3))) (sqrt (* d1 (+ d2 d3))))

simplify2.9s

Counts
55 → 83
Calls
55 calls:
Slowest
395.0ms
(* (sqrt (+ (* d2 d2) (- (* d3 d3) (* d2 d3)))) (sqrt (+ (* d2 d2) (- (* d3 d3) (* d2 d3)))))
353.0ms
(* (sqrt (* d1 (+ (pow d2 3) (pow d3 3)))) (sqrt (* d1 (- (* d2 d2) (* d3 d3)))))
294.0ms
(* (sqrt (* d1 (- (* d2 d2) (* d3 d3)))) (sqrt (* d1 (+ (pow d2 3) (pow d3 3)))))
293.0ms
(* (* (* (sqrt (* d1 (+ d2 d3))) (sqrt (* d1 (+ d2 d3)))) (sqrt (* d1 (+ d2 d3)))) (* (* (sqrt (* d1 (+ d2 d3))) (sqrt (* d1 (+ d2 d3)))) (sqrt (* d1 (+ d2 d3)))))
291.0ms
(* (sqrt (* d1 (- (* d2 d2) (* d3 d3)))) (sqrt (* d1 (+ d2 d3))))

prune646.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes93.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms

end0.0ms

sample758.0ms

Algorithm
intervals
Results
542.0ms10104×body80valid