Average Error: 18.7 → 7.5
Time: 14.0s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.474781728144545 \cdot 10^{+163}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{\sqrt[3]{\frac{1}{V}} \cdot \sqrt[3]{A}}{\frac{1}{\sqrt[3]{\frac{A}{V}}}}} \cdot \sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\ell}}\right)\\ \mathbf{elif}\;V \cdot \ell \le -2.8793218738207274 \cdot 10^{-256}:\\ \;\;\;\;\sqrt{\sqrt{\frac{A}{V \cdot \ell}}} \cdot \left(c0 \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right)\\ \mathbf{elif}\;V \cdot \ell \le 0.0:\\ \;\;\;\;\left|\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}\right| \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 3.4613075593469834 \cdot 10^{+287}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{\sqrt[3]{\frac{1}{V}} \cdot \sqrt[3]{A}}{\frac{1}{\sqrt[3]{\frac{A}{V}}}}} \cdot \sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\ell}}\right)\\ \end{array}\]

Error

Bits error versus c0

Bits error versus A

Bits error versus V

Bits error versus l

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if (* V l) < -1.474781728144545e+163 or 3.4613075593469834e+287 < (* V l)

    1. Initial program 30.7

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied associate-/r*20.8

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt21.0

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{\left(\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}\right) \cdot \sqrt[3]{\frac{A}{V}}}}{\ell}}\]
    6. Applied associate-/l*21.0

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}}{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}}\]
    7. Using strategy rm
    8. Applied div-inv21.0

      \[\leadsto c0 \cdot \sqrt{\frac{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}}{\color{blue}{\ell \cdot \frac{1}{\sqrt[3]{\frac{A}{V}}}}}}\]
    9. Applied times-frac21.0

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{\frac{A}{V}}}{\ell} \cdot \frac{\sqrt[3]{\frac{A}{V}}}{\frac{1}{\sqrt[3]{\frac{A}{V}}}}}}\]
    10. Applied sqrt-prod12.9

      \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\ell}} \cdot \sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\frac{1}{\sqrt[3]{\frac{A}{V}}}}}\right)}\]
    11. Using strategy rm
    12. Applied div-inv12.9

      \[\leadsto c0 \cdot \left(\sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\ell}} \cdot \sqrt{\frac{\sqrt[3]{\color{blue}{A \cdot \frac{1}{V}}}}{\frac{1}{\sqrt[3]{\frac{A}{V}}}}}\right)\]
    13. Applied cbrt-prod12.8

      \[\leadsto c0 \cdot \left(\sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\ell}} \cdot \sqrt{\frac{\color{blue}{\sqrt[3]{A} \cdot \sqrt[3]{\frac{1}{V}}}}{\frac{1}{\sqrt[3]{\frac{A}{V}}}}}\right)\]

    if -1.474781728144545e+163 < (* V l) < -2.8793218738207274e-256

    1. Initial program 7.9

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt8.2

      \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{\sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right)}\]
    4. Applied associate-*r*8.1

      \[\leadsto \color{blue}{\left(c0 \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right) \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}}\]

    if -2.8793218738207274e-256 < (* V l) < 0.0

    1. Initial program 53.0

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied associate-/r*32.2

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt32.5

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{\left(\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}\right) \cdot \sqrt[3]{\frac{A}{V}}}}{\ell}}\]
    6. Applied associate-/l*32.5

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}}{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}}\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt32.5

      \[\leadsto c0 \cdot \sqrt{\frac{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}}{\color{blue}{\sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}} \cdot \sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}}}\]
    9. Applied times-frac32.5

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}} \cdot \frac{\sqrt[3]{\frac{A}{V}}}{\sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}}}\]
    10. Applied rem-sqrt-square18.9

      \[\leadsto c0 \cdot \color{blue}{\left|\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}\right|}\]

    if 0.0 < (* V l) < 3.4613075593469834e+287

    1. Initial program 10.4

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied sqrt-div0.6

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{A}}{\sqrt{V \cdot \ell}}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification7.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.474781728144545 \cdot 10^{+163}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{\sqrt[3]{\frac{1}{V}} \cdot \sqrt[3]{A}}{\frac{1}{\sqrt[3]{\frac{A}{V}}}}} \cdot \sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\ell}}\right)\\ \mathbf{elif}\;V \cdot \ell \le -2.8793218738207274 \cdot 10^{-256}:\\ \;\;\;\;\sqrt{\sqrt{\frac{A}{V \cdot \ell}}} \cdot \left(c0 \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right)\\ \mathbf{elif}\;V \cdot \ell \le 0.0:\\ \;\;\;\;\left|\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}\right| \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 3.4613075593469834 \cdot 10^{+287}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{\sqrt[3]{\frac{1}{V}} \cdot \sqrt[3]{A}}{\frac{1}{\sqrt[3]{\frac{A}{V}}}}} \cdot \sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\ell}}\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019010 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))

Details

Time bar (total: 11.4s)Debug log

sample110.0ms

Algorithm
intervals

simplify4.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
4.0ms
(* c0 (sqrt (/ A (* V l))))

prune6.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 20.0b

localize12.0ms

Local error

Found 3 expressions with local error:

17.8b
(sqrt (/ A (* V l)))
4.7b
(/ A (* V l))
1.2b
(* c0 (sqrt (/ A (* V l))))

rewrite3.0ms

Algorithm
rewrite-expression-head
Rules
sqrt-prod
associate-*r*
add-sqr-sqrt
add-cube-cbrt
*-un-lft-identity
add-log-exp
div-inv
add-exp-log
add-cbrt-cube
pow1
sqrt-div
*-commutative
associate-*r/
pow1/2
frac-2neg
associate-/r*
clear-num
rem-sqrt-square
Counts
3 → 41
Calls
3 calls:
Slowest
2.0ms
(* c0 (sqrt (/ A (* V l))))
1.0ms
(sqrt (/ A (* V l)))
0.0ms
(/ A (* V l))

series95.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
58.0ms
(* c0 (sqrt (/ A (* V l))))
21.0ms
(sqrt (/ A (* V l)))
16.0ms
(/ A (* V l))

simplify71.0ms

Counts
23 → 50
Calls
23 calls:
Slowest
6.0ms
(sqrt (* (cbrt (/ A (* V l))) (cbrt (/ A (* V l)))))
5.0ms
(sqrt (/ A (* V l)))
5.0ms
(cbrt (sqrt (/ A (* V l))))
5.0ms
(sqrt (sqrt (/ A (* V l))))
5.0ms
(sqrt (cbrt (/ A (* V l))))

prune547.0ms

Pruning

14 alts after pruning (14 fresh and 0 done)

Merged error: 11.0b

localize10.0ms

Local error

Found 3 expressions with local error:

17.8b
(sqrt (/ (/ A V) l))
4.1b
(/ (/ A V) l)
1.2b
(* c0 (sqrt (/ (/ A V) l)))

rewrite5.0ms

Algorithm
rewrite-expression-head
Rules
sqrt-prod
add-sqr-sqrt
add-cube-cbrt
associate-*r*
*-un-lft-identity
associate-/l*
div-inv
add-log-exp
add-exp-log
add-cbrt-cube
pow1
sqrt-div
associate-/l/
*-commutative
associate-*r/
pow1/2
frac-2neg
clear-num
rem-sqrt-square
Counts
3 → 45
Calls
3 calls:
Slowest
2.0ms
(/ (/ A V) l)
2.0ms
(* c0 (sqrt (/ (/ A V) l)))
1.0ms
(sqrt (/ (/ A V) l))

series90.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
55.0ms
(* c0 (sqrt (/ (/ A V) l)))
21.0ms
(sqrt (/ (/ A V) l))
14.0ms
(/ (/ A V) l)

simplify91.0ms

Counts
25 → 54
Calls
25 calls:
Slowest
10.0ms
(sqrt (* (cbrt (/ (/ A V) l)) (cbrt (/ (/ A V) l))))
9.0ms
(sqrt (sqrt (/ (/ A V) l)))
8.0ms
(cbrt (sqrt (/ (/ A V) l)))
7.0ms
(sqrt (/ (/ A V) l))
7.0ms
(sqrt (/ (/ A V) l))

prune727.0ms

Pruning

18 alts after pruning (17 fresh and 1 done)

Merged error: 7.1b

localize16.0ms

Local error

Found 4 expressions with local error:

17.8b
(sqrt (/ (* (cbrt (/ A V)) (cbrt (/ A V))) (/ l (cbrt (/ A V)))))
13.0b
(cbrt (/ A V))
13.0b
(cbrt (/ A V))
13.0b
(cbrt (/ A V))

rewrite3.0ms

Algorithm
rewrite-expression-head
Rules
12×cbrt-prod
11×add-sqr-sqrt
10×sqrt-prod
add-cube-cbrt
*-un-lft-identity
times-frac
div-inv
add-log-exp
add-exp-log
add-cbrt-cube
cbrt-div
pow1
pow1/3
associate-/r/
rem-sqrt-square
sqrt-div
pow1/2
Counts
4 → 60
Calls
4 calls:
Slowest
1.0ms
(sqrt (/ (* (cbrt (/ A V)) (cbrt (/ A V))) (/ l (cbrt (/ A V)))))
0.0ms
(cbrt (/ A V))
0.0ms
(cbrt (/ A V))
0.0ms
(cbrt (/ A V))

series291.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
107.0ms
(cbrt (/ A V))
79.0ms
(cbrt (/ A V))
77.0ms
(cbrt (/ A V))
28.0ms
(sqrt (/ (* (cbrt (/ A V)) (cbrt (/ A V))) (/ l (cbrt (/ A V)))))

simplify1.2s

Counts
40 → 72
Calls
40 calls:
Slowest
199.0ms
(exp (* 1/3 (- (log (/ 1 V)) (log (/ 1 A)))))
188.0ms
(exp (* 1/3 (- (log (/ 1 V)) (log (/ 1 A)))))
155.0ms
(exp (* 1/3 (- (log (/ 1 V)) (log (/ 1 A)))))
139.0ms
(exp (* 1/3 (- (log (/ -1 V)) (log (/ -1 A)))))
135.0ms
(exp (* 1/3 (- (log (/ -1 V)) (log (/ -1 A)))))

prune980.0ms

Pruning

20 alts after pruning (19 fresh and 1 done)

Merged error: 5.1b

localize18.0ms

Local error

Found 4 expressions with local error:

13.0b
(cbrt (/ A V))
13.0b
(cbrt (/ A V))
13.0b
(cbrt (/ A V))
6.7b
(sqrt (/ (cbrt (/ A V)) l))

rewrite3.0ms

Algorithm
rewrite-expression-head
Rules
12×cbrt-prod
add-sqr-sqrt
add-cube-cbrt
*-un-lft-identity
add-log-exp
div-inv
sqrt-prod
add-exp-log
add-cbrt-cube
pow1
pow1/3
cbrt-div
sqrt-div
pow1/2
rem-sqrt-square
Counts
4 → 53
Calls
4 calls:
Slowest
1.0ms
(sqrt (/ (cbrt (/ A V)) l))
0.0ms
(cbrt (/ A V))
0.0ms
(cbrt (/ A V))
0.0ms
(cbrt (/ A V))

series391.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
166.0ms
(sqrt (/ (cbrt (/ A V)) l))
79.0ms
(cbrt (/ A V))
79.0ms
(cbrt (/ A V))
66.0ms
(cbrt (/ A V))

simplify967.0ms

Counts
33 → 65
Calls
33 calls:
Slowest
195.0ms
(exp (* 1/3 (- (log (/ 1 V)) (log (/ 1 A)))))
174.0ms
(exp (* 1/3 (- (log (/ 1 V)) (log (/ 1 A)))))
137.0ms
(exp (* 1/3 (- (log (/ 1 V)) (log (/ 1 A)))))
117.0ms
(exp (* 1/3 (- (log (/ -1 V)) (log (/ -1 A)))))
102.0ms
(exp (* 1/3 (- (log (/ -1 V)) (log (/ -1 A)))))

prune909.0ms

Pruning

21 alts after pruning (20 fresh and 1 done)

Merged error: 5.1b

regimes1.8s

Accuracy

70.1% (2.4b remaining)

Error of 7.5b against oracle of 5.1b and baseline of 13.0b

bsearch7.0ms

end0.0ms

sample3.1s

Algorithm
intervals