Average Error: 0.2 → 0.0
Time: 11.4s
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. Simplified0.0

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

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

Reproduce

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

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

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

Details

Time bar (total: 11.1s)Debug log

sample32.0ms

Algorithm
intervals
Results
19.0ms288×body80valid
1.0msbody640valid
0.0msbody320valid
0.0msbody1280valid

simplify34.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
34.0ms
(+ (+ (* d1 10) (* d1 d2)) (* d1 20))

prune15.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize21.0ms

Local error

Found 1 expressions with local error:

0.0b
(* d1 (+ 30 d2))

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

series25.0ms

Counts
1 → 3
Calls
1 calls:
Slowest
25.0ms
(* d1 (+ 30 d2))

simplify117.0ms

Counts
10 → 18
Calls
10 calls:
Slowest
72.0ms
(+ (* 30 30) (- (* d2 d2) (* 30 d2)))
12.0ms
(+ (* d2 d1) (* 30 d1))
9.0ms
(+ (* d2 d1) (* 30 d1))
9.0ms
(+ (* d2 d1) (* 30 d1))
3.0ms
(cbrt (+ 30 d2))

prune173.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize17.0ms

Local error

Found 4 expressions with local error:

0.6b
(cbrt (* d1 (+ 30 d2)))
0.6b
(cbrt (* d1 (+ 30 d2)))
0.6b
(cbrt (* d1 (+ 30 d2)))
0.5b
(* (cbrt (* d1 (+ 30 d2))) (cbrt (* d1 (+ 30 d2))))

rewrite17.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
11.0ms
(* (cbrt (* d1 (+ 30 d2))) (cbrt (* d1 (+ 30 d2))))
2.0ms
(cbrt (* d1 (+ 30 d2)))
2.0ms
(cbrt (* d1 (+ 30 d2)))
2.0ms
(cbrt (* d1 (+ 30 d2)))

series364.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
102.0ms
(* (cbrt (* d1 (+ 30 d2))) (cbrt (* d1 (+ 30 d2))))
91.0ms
(cbrt (* d1 (+ 30 d2)))
90.0ms
(cbrt (* d1 (+ 30 d2)))
80.0ms
(cbrt (* d1 (+ 30 d2)))

simplify5.4s

Counts
49 → 77
Calls
49 calls:
Slowest
375.0ms
(cbrt (+ (* 30 30) (- (* d2 d2) (* 30 d2))))
335.0ms
(- (+ (* 1/45 (* (exp (* 1/3 (+ (* 2 (log d1)) (log 900)))) d2)) (exp (* 1/3 (+ (* 2 (log d1)) (log 900))))) (* 1/8100 (* (exp (* 1/3 (+ (* 2 (log d1)) (log 900)))) (pow d2 2))))
324.0ms
(* (* d1 (+ 30 d2)) (* d1 (+ 30 d2)))
307.0ms
(* (cbrt (* d1 (- (* 30 30) (* d2 d2)))) (cbrt (* d1 (+ 30 d2))))
295.0ms
(- (+ (* 20 (/ (* (pow (cbrt -1) 2) (exp (* -1/3 (+ (* 2 (log (/ -1 d1))) (* 2 (log (/ -1 d2))))))) d2)) (* (pow (cbrt -1) 2) (exp (* -1/3 (+ (* 2 (log (/ -1 d1))) (* 2 (log (/ -1 d2)))))))) (* 100 (/ (* (pow (cbrt -1) 2) (exp (* -1/3 (+ (* 2 (log (/ -1 d1))) (* 2 (log (/ -1 d2))))))) (pow d2 2))))

prune639.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize7.0ms

Local error

Found 4 expressions with local error:

0.2b
(* (* d1 (sqrt (+ 30 d2))) (sqrt (+ 30 d2)))
0.1b
(* d1 (sqrt (+ 30 d2)))
0.0b
(sqrt (+ 30 d2))
0.0b
(sqrt (+ 30 d2))

rewrite10.0ms

Algorithm
rewrite-expression-head
Rules
18×sqrt-div
12×sqrt-prod
12×associate-*r*
12×add-sqr-sqrt
10×add-cube-cbrt
10×associate-*r/
10×*-un-lft-identity
flip-+
flip3-+
add-exp-log
add-cbrt-cube
pow1
add-log-exp
frac-times
*-commutative
associate-*l/
pow1/2
rem-sqrt-square
cbrt-unprod
prod-exp
pow-prod-down
associate-*l*
Counts
4 → 70
Calls
4 calls:
Slowest
7.0ms
(* (* d1 (sqrt (+ 30 d2))) (sqrt (+ 30 d2)))
2.0ms
(* d1 (sqrt (+ 30 d2)))
1.0ms
(sqrt (+ 30 d2))
1.0ms
(sqrt (+ 30 d2))

series89.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
31.0ms
(* d1 (sqrt (+ 30 d2)))
27.0ms
(* (* d1 (sqrt (+ 30 d2))) (sqrt (+ 30 d2)))
19.0ms
(sqrt (+ 30 d2))
12.0ms
(sqrt (+ 30 d2))

simplify2.6s

Counts
53 → 82
Calls
53 calls:
Slowest
655.0ms
(* (* (* (* d1 (sqrt (+ 30 d2))) (* d1 (sqrt (+ 30 d2)))) (* d1 (sqrt (+ 30 d2)))) (* (* (sqrt (+ 30 d2)) (sqrt (+ 30 d2))) (sqrt (+ 30 d2))))
380.0ms
(- (+ (* 1/2 (/ d2 (sqrt 30))) (sqrt 30)) (* 1/8 (/ (pow d2 2) (pow (sqrt 30) 3))))
290.0ms
(- (+ (* 1/2 (/ d2 (sqrt 30))) (sqrt 30)) (* 1/8 (/ (pow d2 2) (pow (sqrt 30) 3))))
246.0ms
(- (+ (* (sqrt 30) d1) (* 1/2 (/ (* d2 d1) (sqrt 30)))) (* 1/8 (/ (* (pow d2 2) d1) (pow (sqrt 30) 3))))
173.0ms
(* (* d1 (sqrt (- (* 30 30) (* d2 d2)))) (sqrt (- (* 30 30) (* d2 d2))))

prune544.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes76.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms

end0.0ms

sample828.0ms

Algorithm
intervals
Results
726.0ms8991×body80valid
24.0ms71×body1280valid
12.0ms45×body640valid
3.0ms18×body320valid
1.0msbody160valid