Average Error: 18.3 → 10.4
Time: 8.5s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -3.759573221325006 \cdot 10^{-219}:\\ \;\;\;\;\sqrt{\frac{1}{V \cdot \ell} \cdot A} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 4.5117310137652915 \cdot 10^{-291}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 4.368285262596396 \cdot 10^{+294}:\\ \;\;\;\;\left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right) \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}} \cdot c0\right) \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\\ \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) < -inf.0 or -3.759573221325006e-219 < (* V l) < 4.5117310137652915e-291

    1. Initial program 44.9

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]

    if -inf.0 < (* V l) < -3.759573221325006e-219

    1. Initial program 7.8

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{A \cdot \frac{1}{V \cdot \ell}}}\]

    if 4.5117310137652915e-291 < (* V l) < 4.368285262596396e+294

    1. Initial program 9.1

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{A \cdot \frac{1}{V \cdot \ell}}}\]
    4. Applied sqrt-prod0.4

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

    if 4.368285262596396e+294 < (* V l)

    1. Initial program 38.5

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

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

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

      \[\leadsto \color{blue}{\left(c0 \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\right) \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification10.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -3.759573221325006 \cdot 10^{-219}:\\ \;\;\;\;\sqrt{\frac{1}{V \cdot \ell} \cdot A} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 4.5117310137652915 \cdot 10^{-291}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 4.368285262596396 \cdot 10^{+294}:\\ \;\;\;\;\left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right) \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}} \cdot c0\right) \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\\ \end{array}\]

Reproduce

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

Details

Time bar (total: 7.3s)Debug log

sample64.0ms

Algorithm
intervals
Results
23.0ms290×body80nan
23.0ms278×body80valid

simplify4.0ms

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

prune5.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 17.2b

localize29.0ms

Local error

Found 3 expressions with local error:

14.7b
(sqrt (/ A (* V l)))
6.6b
(/ A (* V l))
1.1b
(* c0 (sqrt (/ A (* V l))))

rewrite4.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))

series80.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
40.0ms
(* c0 (sqrt (/ A (* V l))))
25.0ms
(sqrt (/ A (* V l)))
15.0ms
(/ A (* V l))

simplify42.0ms

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

prune391.0ms

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 8.3b

localize9.0ms

Local error

Found 3 expressions with local error:

14.7b
(sqrt (/ (/ A V) l))
4.0b
(/ (/ A V) l)
1.1b
(* 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))

series71.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
33.0ms
(* c0 (sqrt (/ (/ A V) l)))
19.0ms
(/ (/ A V) l)
19.0ms
(sqrt (/ (/ A V) l))

simplify81.0ms

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

prune392.0ms

Pruning

14 alts after pruning (13 fresh and 1 done)

Merged error: 6.2b

localize11.0ms

Local error

Found 4 expressions with local error:

14.7b
(sqrt (/ (/ A V) l))
14.7b
(sqrt (/ (/ A V) l))
4.0b
(/ (/ A V) l)
4.0b
(/ (/ A V) l)

rewrite12.0ms

Algorithm
rewrite-expression-head
Rules
10×add-sqr-sqrt
associate-/l*
sqrt-prod
add-cube-cbrt
*-un-lft-identity
div-inv
add-log-exp
add-exp-log
add-cbrt-cube
pow1
associate-/l/
sqrt-div
pow1/2
frac-2neg
clear-num
rem-sqrt-square
Counts
4 → 58
Calls
4 calls:
Slowest
6.0ms
(/ (/ A V) l)
3.0ms
(/ (/ A V) l)
1.0ms
(sqrt (/ (/ A V) l))
1.0ms
(sqrt (/ (/ A V) l))

series82.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
28.0ms
(sqrt (/ (/ A V) l))
21.0ms
(sqrt (/ (/ A V) l))
19.0ms
(/ (/ A V) l)
14.0ms
(/ (/ A V) l)

simplify71.0ms

Counts
28 → 70
Calls
28 calls:
Slowest
7.0ms
(sqrt (* (cbrt (/ (/ A V) l)) (cbrt (/ (/ A V) l))))
7.0ms
(sqrt (/ (/ A V) l))
6.0ms
(sqrt (* (cbrt (/ (/ A V) l)) (cbrt (/ (/ A V) l))))
6.0ms
(sqrt (sqrt (/ (/ A V) l)))
6.0ms
(sqrt (sqrt (/ (/ A V) l)))

prune735.0ms

Pruning

14 alts after pruning (12 fresh and 2 done)

Merged error: 6.2b

localize27.0ms

Local error

Found 4 expressions with local error:

16.3b
(cbrt (/ (/ A V) l))
16.3b
(cbrt (/ (/ A V) l))
14.7b
(sqrt (/ (/ A V) l))
4.0b
(/ (/ A V) l)

rewrite5.0ms

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

series202.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
86.0ms
(cbrt (/ (/ A V) l))
84.0ms
(cbrt (/ (/ A V) l))
19.0ms
(sqrt (/ (/ A V) l))
13.0ms
(/ (/ A V) l)

simplify1.1s

Counts
30 → 67
Calls
30 calls:
Slowest
252.0ms
(exp (* 1/3 (- (+ (log (/ 1 l)) (log (/ 1 V))) (log (/ 1 A)))))
239.0ms
(exp (* 1/3 (- (+ (log (/ 1 l)) (log (/ 1 V))) (log (/ 1 A)))))
144.0ms
(* (exp (* 1/3 (- (+ (log (/ -1 V)) (log (/ -1 l))) (log (/ -1 A))))) (cbrt -1))
139.0ms
(exp (* 1/3 (- (log A) (+ (log l) (log V)))))
133.0ms
(exp (* 1/3 (- (log A) (+ (log l) (log V)))))

prune829.0ms

Pruning

12 alts after pruning (10 fresh and 2 done)

Merged error: 6.2b

regimes776.0ms

Accuracy

71.6% (3.1b remaining)

Error of 10.4b against oracle of 7.3b and baseline of 18.3b

bsearch7.0ms

end0.0ms

sample2.3s

Algorithm
intervals
Results
1.1s8861×body80valid
740.0ms8813×body80nan