Average Error: 0.2 → 0.0
Time: 20.6s
Precision: 64
Internal Precision: 128
\[\left(d1 \cdot 10 + d1 \cdot d2\right) + d1 \cdot 20\]
\[\left(30 + d2\right) \cdot d1\]

Error

Bits error versus d1

Bits error versus d2

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.2
Target0.0
Herbie0.0
\[d1 \cdot \left(30 + d2\right)\]

Derivation

  1. Initial program 0.2

    \[\left(d1 \cdot 10 + d1 \cdot d2\right) + d1 \cdot 20\]
  2. Initial simplification0.0

    \[\leadsto \left(d2 + 30\right) \cdot d1\]
  3. Final simplification0.0

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

Reproduce

herbie shell --seed 2018365 +o rules:numerics
(FPCore (d1 d2)
  :name "FastMath test2"

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

  (+ (+ (* d1 10) (* d1 d2)) (* d1 20)))

Details

Time bar (total: 18.7s)Debug log

start61.0ms

Algorithm
intervals

setup115.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
(* (+ d2 30) d1)

rewrite5.0ms

Algorithm
rewrite-expression-head
Counts
1 → 15
Calls

1 calls. Slowest were:

5.0ms
(* (+ d2 30) d1)

series27.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

27.0ms
(* (+ d2 30) d1)

simplify241.0ms

Counts
7 → 18
Calls

7 calls. Slowest were:

171.0ms
(* (- (* d2 d2) (* 30 30)) d1)
30.0ms
(* (+ (pow d2 3) (pow 30 3)) d1)
11.0ms
(+ (* d2 d1) (* 30 d1))

prune142.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.0b

localize12.0ms

Local error

Found 4 expressions with local error:

0.4b
(* (* (cbrt (+ d2 30)) (cbrt (+ d2 30))) (* (cbrt (+ d2 30)) d1))
0.3b
(* (cbrt (+ d2 30)) d1)
0.3b
(cbrt (+ d2 30))
0.3b
(cbrt (+ d2 30))

rewrite32.0ms

Algorithm
rewrite-expression-head
Counts
4 → 92
Calls

4 calls. Slowest were:

20.0ms
(* (* (cbrt (+ d2 30)) (cbrt (+ d2 30))) (* (cbrt (+ d2 30)) d1))
6.0ms
(* (cbrt (+ d2 30)) d1)
1.0ms
(cbrt (+ d2 30))

series251.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

133.0ms
(* (cbrt (+ d2 30)) d1)
55.0ms
(cbrt (+ d2 30))
38.0ms
(cbrt (+ d2 30))
26.0ms
(* (* (cbrt (+ d2 30)) (cbrt (+ d2 30))) (* (cbrt (+ d2 30)) d1))

simplify7.1s

Counts
78 → 104
Calls

78 calls. Slowest were:

839.0ms
(- (+ (* 1/90 (* (pow 30 1/3) d2)) (pow 30 1/3)) (* 1/8100 (* (pow 30 1/3) (pow d2 2))))
448.0ms
(* (* (+ d2 30) (+ d2 30)) (* (* (* (cbrt (+ d2 30)) d1) (* (cbrt (+ d2 30)) d1)) (* (cbrt (+ d2 30)) d1)))
435.0ms
(* (* (* (* (cbrt (+ d2 30)) (cbrt (+ d2 30))) (* (cbrt (+ d2 30)) (cbrt (+ d2 30)))) (* (cbrt (+ d2 30)) (cbrt (+ d2 30)))) (* (* (* (cbrt (+ d2 30)) d1) (* (cbrt (+ d2 30)) d1)) (* (cbrt (+ d2 30)) d1)))

prune1.4s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize47.0ms

Local error

Found 4 expressions with local error:

15.9b
(cbrt (fma (* d2 d2) d2 27000))
11.8b
(cbrt (fma (+ -30 d2) d2 900))
11.8b
(cbrt (fma d2 d2 -900))
7.9b
(/ (* (* (* d1 (cbrt (fma d2 d2 -900))) (cbrt (+ 30 d2))) (cbrt (fma (* d2 d2) d2 27000))) (* (cbrt (+ -30 d2)) (cbrt (fma (+ -30 d2) d2 900))))

rewrite27.0ms

Algorithm
rewrite-expression-head
Counts
4 → 70
Calls

4 calls. Slowest were:

25.0ms
(/ (* (* (* d1 (cbrt (fma d2 d2 -900))) (cbrt (+ 30 d2))) (cbrt (fma (* d2 d2) d2 27000))) (* (cbrt (+ -30 d2)) (cbrt (fma (+ -30 d2) d2 900))))
1.0ms
(cbrt (fma (* d2 d2) d2 27000))
1.0ms
(cbrt (fma (+ -30 d2) d2 900))

series835.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

309.0ms
(cbrt (fma (* d2 d2) d2 27000))
309.0ms
(/ (* (* (* d1 (cbrt (fma d2 d2 -900))) (cbrt (+ 30 d2))) (cbrt (fma (* d2 d2) d2 27000))) (* (cbrt (+ -30 d2)) (cbrt (fma (+ -30 d2) d2 900))))
152.0ms
(cbrt (fma d2 d2 -900))
65.0ms
(cbrt (fma (+ -30 d2) d2 900))

simplify6.5s

Counts
41 → 82
Calls

41 calls. Slowest were:

631.0ms
(- (+ (log (* (* d1 (cbrt (fma d2 d2 -900))) (cbrt (+ 30 d2)))) (log (cbrt (fma (* d2 d2) d2 27000)))) (log (* (cbrt (+ -30 d2)) (cbrt (fma (+ -30 d2) d2 900)))))
499.0ms
(- (log (* (* (* d1 (cbrt (fma d2 d2 -900))) (cbrt (+ 30 d2))) (cbrt (fma (* d2 d2) d2 27000)))) (log (* (cbrt (+ -30 d2)) (cbrt (fma (+ -30 d2) d2 900)))))
428.0ms
(/ (* (* (* (* (* d1 (cbrt (fma d2 d2 -900))) (* d1 (cbrt (fma d2 d2 -900)))) (* d1 (cbrt (fma d2 d2 -900)))) (+ 30 d2)) (fma (* d2 d2) d2 27000)) (* (* (* (cbrt (+ -30 d2)) (cbrt (fma (+ -30 d2) d2 900))) (* (cbrt (+ -30 d2)) (cbrt (fma (+ -30 d2) d2 900)))) (* (cbrt (+ -30 d2)) (cbrt (fma (+ -30 d2) d2 900)))))

prune1.9s

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes106.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms