Average Error: 18.1 → 6.2
Time: 16.2s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -3.334876225266701 \cdot 10^{+183}:\\ \;\;\;\;\left(c0 \cdot \frac{\left|\sqrt[3]{\frac{A}{V}}\right|}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{1}{\ell}}}\\ \mathbf{elif}\;V \cdot \ell \le -1.175718995950725 \cdot 10^{-219}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 1.98613222286689 \cdot 10^{-309} \lor \neg \left(V \cdot \ell \le 4.4098284317428 \cdot 10^{+306}\right):\\ \;\;\;\;\left(c0 \cdot \frac{\left|\sqrt[3]{\frac{A}{V}}\right|}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{1}{\ell}}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right) \cdot c0\\ \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 3 regimes
  2. if (* V l) < -3.334876225266701e+183 or -1.175718995950725e-219 < (* V l) < 1.98613222286689e-309 or 4.4098284317428e+306 < (* V l)

    1. Initial program 37.3

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

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\left(\sqrt[3]{\frac{\frac{A}{V}}{\ell}} \cdot \sqrt[3]{\frac{\frac{A}{V}}{\ell}}\right) \cdot \sqrt[3]{\frac{\frac{A}{V}}{\ell}}}}\]
    6. Applied sqrt-prod25.2

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

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

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

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

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

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

      \[\leadsto \left(c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{1}{\ell}}}\]
    15. Applied sqrt-div12.0

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

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

    if -3.334876225266701e+183 < (* V l) < -1.175718995950725e-219

    1. Initial program 6.8

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

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

    if 1.98613222286689e-309 < (* V l) < 4.4098284317428e+306

    1. Initial program 9.7

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

      \[\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)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification6.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -3.334876225266701 \cdot 10^{+183}:\\ \;\;\;\;\left(c0 \cdot \frac{\left|\sqrt[3]{\frac{A}{V}}\right|}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{1}{\ell}}}\\ \mathbf{elif}\;V \cdot \ell \le -1.175718995950725 \cdot 10^{-219}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 1.98613222286689 \cdot 10^{-309} \lor \neg \left(V \cdot \ell \le 4.4098284317428 \cdot 10^{+306}\right):\\ \;\;\;\;\left(c0 \cdot \frac{\left|\sqrt[3]{\frac{A}{V}}\right|}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{1}{\ell}}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right) \cdot c0\\ \end{array}\]

Reproduce

herbie shell --seed 2019016 +o rules:numerics
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))

Details

Time bar (total: 14.6s)Debug log

sample143.0ms

Algorithm
intervals
Results
601×(pre true 80)
305×(body nan 80)
296×(body real 80)

simplify6.0ms

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

prune6.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 21.9b

localize12.0ms

Local error

Found 3 expressions with local error:

18.5b
(sqrt (/ A (* V l)))
4.3b
(/ A (* V l))
1.6b
(* c0 (sqrt (/ A (* V l))))

rewrite7.0ms

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

series119.0ms

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

simplify77.0ms

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

prune971.0ms

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 13.7b

localize18.0ms

Local error

Found 3 expressions with local error:

18.5b
(sqrt (/ (/ A V) l))
3.8b
(/ (/ A V) l)
1.6b
(* c0 (sqrt (/ (/ A V) l)))

rewrite15.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
log1p-expm1-u
add-exp-log
add-cbrt-cube
pow1
expm1-log1p-u
sqrt-div
associate-/l/
*-commutative
associate-*r/
pow1/2
frac-2neg
clear-num
rem-sqrt-square
Counts
3 → 51
Calls
3 calls:
Slowest
8.0ms
(/ (/ A V) l)
4.0ms
(* c0 (sqrt (/ (/ A V) l)))
2.0ms
(sqrt (/ (/ A V) l))

series93.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
36.0ms
(* c0 (sqrt (/ (/ A V) l)))
34.0ms
(sqrt (/ (/ A V) l))
22.0ms
(/ (/ A V) l)

simplify82.0ms

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

prune578.0ms

Pruning

12 alts after pruning (11 fresh and 1 done)

Merged error: 8.5b

localize25.0ms

Local error

Found 4 expressions with local error:

21.0b
(cbrt (/ (/ A V) l))
21.0b
(cbrt (/ (/ A V) l))
21.0b
(cbrt (/ (/ A V) l))
7.2b
(sqrt (* (cbrt (/ (/ A V) l)) (cbrt (/ (/ A V) l))))

rewrite5.0ms

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

series486.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
126.0ms
(cbrt (/ (/ A V) l))
124.0ms
(cbrt (/ (/ A V) l))
123.0ms
(sqrt (* (cbrt (/ (/ A V) l)) (cbrt (/ (/ A V) l))))
113.0ms
(cbrt (/ (/ A V) l))

simplify3.1s

Counts
32 → 72
Calls
32 calls:
Slowest
416.0ms
(exp (* 1/3 (- (+ (log (/ 1 l)) (log (/ 1 V))) (log (/ 1 A)))))
411.0ms
(exp (* 1/3 (- (+ (log (/ 1 l)) (log (/ 1 V))) (log (/ 1 A)))))
398.0ms
(exp (* 1/3 (- (+ (log (/ 1 l)) (log (/ 1 V))) (log (/ 1 A)))))
385.0ms
(exp (* 1/3 (- (+ (log (/ 1 l)) (log (/ 1 V))) (log (/ 1 A)))))
201.0ms
(* (exp (* 1/3 (- (+ (log (/ -1 V)) (log (/ -1 l))) (log (/ -1 A))))) (cbrt -1))

prune1.0s

Pruning

13 alts after pruning (12 fresh and 1 done)

Merged error: 8.5b

localize18.0ms

Local error

Found 4 expressions with local error:

21.0b
(cbrt (/ (/ A V) l))
21.0b
(cbrt (/ (/ A V) l))
11.1b
(cbrt (/ A V))
7.2b
(sqrt (* (cbrt (/ (/ A V) l)) (cbrt (/ (/ A V) l))))

rewrite5.0ms

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

series378.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
118.0ms
(cbrt (/ (/ A V) l))
106.0ms
(sqrt (* (cbrt (/ (/ A V) l)) (cbrt (/ (/ A V) l))))
92.0ms
(cbrt (/ (/ A V) l))
63.0ms
(cbrt (/ A V))

simplify2.9s

Counts
32 → 72
Calls
32 calls:
Slowest
466.0ms
(exp (* 1/3 (- (+ (log (/ 1 l)) (log (/ 1 V))) (log (/ 1 A)))))
384.0ms
(exp (* 1/3 (- (+ (log (/ 1 l)) (log (/ 1 V))) (log (/ 1 A)))))
380.0ms
(exp (* 1/3 (- (+ (log (/ 1 l)) (log (/ 1 V))) (log (/ 1 A)))))
230.0ms
(* (exp (* 1/3 (- (+ (log (/ -1 V)) (log (/ -1 l))) (log (/ -1 A))))) (cbrt -1))
227.0ms
(exp (* 1/3 (- (log (/ 1 V)) (log (/ 1 A)))))

prune1.1s

Pruning

12 alts after pruning (11 fresh and 1 done)

Merged error: 4.4b

regimes767.0ms

Accuracy

78.5% (1.5b remaining)

Error of 6.2b against oracle of 4.7b and baseline of 11.7b

bsearch8.0ms

end0.0ms

sample2.7s

Algorithm
intervals
Results
17798×(pre true 80)
8941×(body real 80)
8857×(body nan 80)