Average Error: 58.2 → 33.5
Time: 52.0s
Precision: 64
Internal Precision: 128
\[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\]
\[0\]

Error

Bits error versus c0

Bits error versus w

Bits error versus h

Bits error versus D

Bits error versus d

Bits error versus M

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 58.2

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\]
  2. Taylor expanded around -inf 35.2

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{0}\]
  3. Using strategy rm
  4. Applied mul033.5

    \[\leadsto \color{blue}{0}\]
  5. Final simplification33.5

    \[\leadsto 0\]

Reproduce

herbie shell --seed 2019010 +o rules:numerics
(FPCore (c0 w h D d M)
  :name "Henrywood and Agarwal, Equation (13)"
  (* (/ c0 (* 2 w)) (+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))))

Details

Time bar (total: 50.8s)Debug log

sample656.0ms

Algorithm
intervals

simplify412.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
412.0ms
(* (/ c0 (* 2 w)) (+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M)))))

prune21.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 57.9b

localize68.0ms

Local error

Found 4 expressions with local error:

30.3b
(+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))
18.2b
(/ (* c0 (* d d)) (* (* w h) (* D D)))
18.2b
(/ (* c0 (* d d)) (* (* w h) (* D D)))
18.2b
(/ (* c0 (* d d)) (* (* w h) (* D D)))

rewrite89.0ms

Algorithm
rewrite-expression-head
Rules
19×add-exp-log
19×add-cbrt-cube
*-un-lft-identity
add-log-exp
div-exp
cbrt-undiv
add-cube-cbrt
fma-def
add-sqr-sqrt
div-inv
log1p-expm1-u
times-frac
pow1
expm1-log1p-u
associate-/l*
cbrt-unprod
prod-exp
frac-2neg
associate-/r*
clear-num
frac-add
sqrt-div
distribute-lft-out
flip--
flip-+
flip3--
flip3-+
sum-log
+-commutative
Counts
4 → 78
Calls
4 calls:
Slowest
71.0ms
(+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))
6.0ms
(/ (* c0 (* d d)) (* (* w h) (* D D)))
5.0ms
(/ (* c0 (* d d)) (* (* w h) (* D D)))
5.0ms
(/ (* c0 (* d d)) (* (* w h) (* D D)))

series476.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
197.0ms
(+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))
100.0ms
(/ (* c0 (* d d)) (* (* w h) (* D D)))
98.0ms
(/ (* c0 (* d d)) (* (* w h) (* D D)))
81.0ms
(/ (* c0 (* d d)) (* (* w h) (* D D)))

simplify13.0s

Counts
43 → 90
Calls
43 calls:
Slowest
1.1s
(+ (* (* c0 (* d d)) (sqrt (+ (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M)))) (* (* (* w h) (* D D)) (sqrt (- (* (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D))))) (* (* M M) (* M M))))))
971.0ms
(+ (* (* c0 (* d d)) (sqrt (+ (* (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D))))) (+ (* (* M M) (* M M)) (* (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M)))))) (* (* (* w h) (* D D)) (sqrt (- (pow (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) 3) (pow (* M M) 3)))))
819.0ms
(* (* (* w h) (* D D)) (sqrt (+ (* (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D))))) (+ (* (* M M) (* M M)) (* (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))))
659.0ms
(/ (* (* (* c0 (* d d)) (* c0 (* d d))) (* c0 (* d d))) (* (* (* (* w h) (* w h)) (* w h)) (* (* (* D D) (* D D)) (* D D))))
638.0ms
(/ (* (* (* c0 (* d d)) (* c0 (* d d))) (* c0 (* d d))) (* (* (* (* w h) (* w h)) (* w h)) (* (* (* D D) (* D D)) (* D D))))

prune1.5s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 28.5b

localize3.0ms

Local error

Found 1 expressions with local error:

4.2b
(* (/ c0 (* 2 w)) 0)

rewrite3.0ms

Algorithm
rewrite-expression-head
Rules
associate-*l*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
div-inv
log1p-expm1-u
*-commutative
add-exp-log
associate-*l/
mul0
add-cbrt-cube
pow1
expm1-log1p-u
Counts
1 → 16
Calls
1 calls:
Slowest
3.0ms
(* (/ c0 (* 2 w)) 0)

series2.0ms

Counts
1 → 3
Calls
1 calls:
Slowest
2.0ms
(* (/ c0 (* 2 w)) 0)

simplify8.0ms

Counts
6 → 19
Calls
6 calls:
Slowest
4.0ms
(* (cbrt (/ c0 (* 2 w))) (cbrt (/ c0 (* 2 w))))
2.0ms
(sqrt (/ c0 (* 2 w)))
1.0ms
(* c0 0)
0.0ms
0
0.0ms
0

prune220.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 26.9b

localize0.0ms

Local error

Found 0 expressions with local error:

rewrite0.0ms

Algorithm
rewrite-expression-head
Rules
Counts
0 → 0
Calls
0 calls:
Slowest

series0.0ms

Counts
0 → 0
Calls
0 calls:
Slowest

simplify0.0ms

Counts
0 → 0
Calls
0 calls:
Slowest

prune34.0ms

Pruning

8 alts after pruning (7 fresh and 1 done)

Merged error: 26.9b

localize54.0ms

Local error

Found 4 expressions with local error:

30.3b
(+ (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (sqrt (fma (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (* (- M) M))))
14.7b
(* (* (/ d D) (/ d D)) (/ (/ c0 h) w))
14.7b
(* (* (/ d D) (/ d D)) (/ (/ c0 h) w))
14.7b
(* (* (/ d D) (/ d D)) (/ (/ c0 h) w))

rewrite75.0ms

Algorithm
rewrite-expression-head
Rules
19×add-exp-log
19×add-cbrt-cube
19×pow1
15×associate-*l/
15×frac-times
12×associate-*r*
cbrt-unprod
associate-*r/
prod-exp
pow-prod-down
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
log1p-expm1-u
expm1-log1p-u
div-inv
*-commutative
associate-*l*
flip-+
flip3-+
fma-def
sum-log
+-commutative
Counts
4 → 98
Calls
4 calls:
Slowest
19.0ms
(+ (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (sqrt (fma (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (* (- M) M))))
18.0ms
(* (* (/ d D) (/ d D)) (/ (/ c0 h) w))
18.0ms
(* (* (/ d D) (/ d D)) (/ (/ c0 h) w))
18.0ms
(* (* (/ d D) (/ d D)) (/ (/ c0 h) w))

series336.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
207.0ms
(+ (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (sqrt (fma (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (* (- M) M))))
48.0ms
(* (* (/ d D) (/ d D)) (/ (/ c0 h) w))
41.0ms
(* (* (/ d D) (/ d D)) (/ (/ c0 h) w))
40.0ms
(* (* (/ d D) (/ d D)) (/ (/ c0 h) w))

simplify10.9s

Counts
74 → 110
Calls
74 calls:
Slowest
713.0ms
(/ (* c0 (pow d 2)) (* (pow D 2) (* w h)))
488.0ms
(+ (+ (log (/ d D)) (log (/ d D))) (log (/ (/ c0 h) w)))
478.0ms
(* (exp (* (* (/ d D) (/ d D)) (/ (/ c0 h) w))) (exp (sqrt (fma (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (* (- M) M)))))
433.0ms
(/ (* c0 (pow d 2)) (* w (* (pow D 2) h)))
430.0ms
(+ (+ (log (/ d D)) (log (/ d D))) (log (/ (/ c0 h) w)))

prune2.1s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 26.9b

regimes863.0ms

Accuracy

0% (2.6b remaining)

Error of 33.5b against oracle of 30.9b and baseline of 33.5b

bsearch0.0ms

end0.0ms

sample20.0s

Algorithm
intervals