Average Error: 0.0 → 0.0
Time: 7.1s
Precision: 64
Internal Precision: 128
\[a \cdot \left(\left(b + c\right) + d\right)\]
\[(a \cdot \left(b + d\right) + \left(c \cdot a\right))_*\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Target

Original0.0
Target0.0
Herbie0.0
\[a \cdot b + a \cdot \left(c + d\right)\]

Derivation

  1. Initial program 0.0

    \[a \cdot \left(\left(b + c\right) + d\right)\]
  2. Initial simplification0.0

    \[\leadsto (a \cdot \left(b + d\right) + \left(a \cdot c\right))_*\]
  3. Final simplification0.0

    \[\leadsto (a \cdot \left(b + d\right) + \left(c \cdot a\right))_*\]

Reproduce

herbie shell --seed 2018360 +o rules:numerics
(FPCore (a b c d)
  :name "Expression, p14"
  :pre (and (<= 56789 a 98765) (<= 0 b 1) (<= 0 c 0.0016773) (<= 0 d 0.0016773))

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

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

Details

Time bar (total: 5.2s)Debug log

start29.0ms

Algorithm
intervals

setup50.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize11.0ms

Local error

Found 1 expressions with local error:

0.0b
(fma a (+ b d) (* a c))

rewrite0.0ms

Algorithm
rewrite-expression-head
Counts
1 → 10
Calls

1 calls. Slowest were:

0.0ms
(fma a (+ b d) (* a c))

series33.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

33.0ms
(fma a (+ b d) (* a c))

simplify95.0ms

Counts
3 → 13
Calls

3 calls. Slowest were:

56.0ms
(+ (* a d) (+ (* a b) (* a c)))
37.0ms
(+ (* a d) (+ (* a b) (* a c)))
1.0ms
0

prune126.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0.0b

localize18.0ms

Local error

Found 4 expressions with local error:

0.6b
(cbrt (fma a (+ b d) (* a c)))
0.6b
(cbrt (fma a (+ b d) (* a c)))
0.6b
(cbrt (fma a (+ b d) (* a c)))
0.5b
(* (cbrt (fma a (+ b d) (* a c))) (cbrt (fma a (+ b d) (* a c))))

rewrite13.0ms

Algorithm
rewrite-expression-head
Counts
4 → 69
Calls

4 calls. Slowest were:

9.0ms
(* (cbrt (fma a (+ b d) (* a c))) (cbrt (fma a (+ b d) (* a c))))
1.0ms
(cbrt (fma a (+ b d) (* a c)))
1.0ms
(cbrt (fma a (+ b d) (* a c)))

series520.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

165.0ms
(* (cbrt (fma a (+ b d) (* a c))) (cbrt (fma a (+ b d) (* a c))))
129.0ms
(cbrt (fma a (+ b d) (* a c)))
115.0ms
(cbrt (fma a (+ b d) (* a c)))
111.0ms
(cbrt (fma a (+ b d) (* a c)))

simplify3.2s

Counts
41 → 81
Calls

41 calls. Slowest were:

390.0ms
(exp (* -1/3 (+ (* 2 (log (/ 1 b))) (* 2 (log (/ 1 a))))))
313.0ms
(exp (* -1/3 (+ (* 2 (log (/ -1 a))) (* 2 (log (/ -1 b))))))
258.0ms
(exp (* -1/3 (+ (log (/ -1 a)) (log (/ -1 b)))))

prune968.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0.0b

regimes215.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms