Average Error: 18.7 → 10.3
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 -6.279111945542786 \cdot 10^{-272}:\\ \;\;\;\;\left(\sqrt{\frac{\sqrt[3]{\frac{1}{V \cdot \ell}} \cdot \sqrt[3]{\frac{1}{V \cdot \ell}}}{\sqrt[3]{\frac{1}{A}} \cdot \sqrt[3]{\frac{1}{A}}}} \cdot c0\right) \cdot \sqrt{\frac{\sqrt[3]{\frac{1}{V \cdot \ell}}}{\sqrt[3]{\frac{1}{A}}}}\\ \mathbf{elif}\;V \cdot \ell \le 0.0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\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 3 regimes
  2. if (* V l) < -6.279111945542786e-272

    1. Initial program 13.9

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}}\]
    4. Using strategy rm
    5. Applied div-inv14.3

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

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

      \[\leadsto c0 \cdot \sqrt{\frac{\frac{1}{V \cdot \ell}}{\color{blue}{\left(\sqrt[3]{\frac{1}{A}} \cdot \sqrt[3]{\frac{1}{A}}\right) \cdot \sqrt[3]{\frac{1}{A}}}}}\]
    9. Applied add-cube-cbrt14.4

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{\frac{1}{V \cdot \ell}} \cdot \sqrt[3]{\frac{1}{V \cdot \ell}}}{\sqrt[3]{\frac{1}{A}} \cdot \sqrt[3]{\frac{1}{A}}} \cdot \frac{\sqrt[3]{\frac{1}{V \cdot \ell}}}{\sqrt[3]{\frac{1}{A}}}}}\]
    11. Applied sqrt-prod8.2

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

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

    if -6.279111945542786e-272 < (* V l) < 0.0

    1. Initial program 54.6

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}}\]
    4. Using strategy rm
    5. Applied div-inv54.6

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{1}{V \cdot \ell}}{\frac{1}{A}}}}\]
    7. Using strategy rm
    8. Applied *-un-lft-identity55.6

      \[\leadsto c0 \cdot \sqrt{\frac{\frac{1}{V \cdot \ell}}{\color{blue}{1 \cdot \frac{1}{A}}}}\]
    9. Applied div-inv55.6

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot \frac{1}{V \cdot \ell}}}{1 \cdot \frac{1}{A}}}\]
    10. Applied times-frac55.6

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

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

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

    if 0.0 < (* V l)

    1. Initial program 15.7

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}}\]
    4. Using strategy rm
    5. Applied associate-/r/16.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -6.279111945542786 \cdot 10^{-272}:\\ \;\;\;\;\left(\sqrt{\frac{\sqrt[3]{\frac{1}{V \cdot \ell}} \cdot \sqrt[3]{\frac{1}{V \cdot \ell}}}{\sqrt[3]{\frac{1}{A}} \cdot \sqrt[3]{\frac{1}{A}}}} \cdot c0\right) \cdot \sqrt{\frac{\sqrt[3]{\frac{1}{V \cdot \ell}}}{\sqrt[3]{\frac{1}{A}}}}\\ \mathbf{elif}\;V \cdot \ell \le 0.0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right)\\ \end{array}\]

Reproduce

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

Details

Time bar (total: 9.8s)Debug log

start160.0ms

Algorithm
intervals

setup31.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 13.1b

localize38.0ms

Local error

Found 3 expressions with local error:

16.0b
(sqrt (/ A (* V l)))
3.2b
(/ A (* V l))
0.6b
(* c0 (sqrt (/ A (* V l))))

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
3 → 41
Calls

3 calls. Slowest were:

2.0ms
(* c0 (sqrt (/ A (* V l))))
1.0ms
(sqrt (/ A (* V l)))
0.0ms
(/ A (* V l))

series103.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

54.0ms
(* c0 (sqrt (/ A (* V l))))
26.0ms
(sqrt (/ A (* V l)))
23.0ms
(/ A (* V l))

simplify83.0ms

Counts
23 → 50
Calls

23 calls. Slowest were:

10.0ms
(sqrt (/ A (* V l)))
6.0ms
(sqrt (* (cbrt (/ A (* V l))) (cbrt (/ A (* V l)))))
6.0ms
(sqrt (sqrt (/ A (* V l))))

prune542.0ms

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 9.9b

localize9.0ms

Local error

Found 4 expressions with local error:

16.0b
(sqrt (/ A (* V l)))
16.0b
(sqrt (/ A (* V l)))
3.2b
(/ A (* V l))
3.2b
(/ A (* V l))

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
4 → 50
Calls

4 calls. Slowest were:

1.0ms
(sqrt (/ A (* V l)))
1.0ms
(sqrt (/ A (* V l)))
0.0ms
(/ A (* V l))

series80.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

30.0ms
(sqrt (/ A (* V l)))
23.0ms
(sqrt (/ A (* V l)))
15.0ms
(/ A (* V l))
13.0ms
(/ A (* V l))

simplify49.0ms

Counts
24 → 62
Calls

24 calls. Slowest were:

6.0ms
(sqrt (* (cbrt (/ A (* V l))) (cbrt (/ A (* V l)))))
5.0ms
(sqrt (sqrt (/ A (* V l))))
5.0ms
(sqrt (/ A (* V l)))

prune818.0ms

Pruning

10 alts after pruning (9 fresh and 1 done)

Merged error: 9.9b

localize22.0ms

Local error

Found 4 expressions with local error:

16.0b
(sqrt (/ 1 (/ (* V l) A)))
3.1b
(/ (* V l) A)
0.6b
(* c0 (sqrt (/ 1 (/ (* V l) A))))
0.4b
(/ 1 (/ (* V l) A))

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

5.0ms
(/ (* V l) A)
3.0ms
(* c0 (sqrt (/ 1 (/ (* V l) A))))
2.0ms
(/ 1 (/ (* V l) A))

series148.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

57.0ms
(* c0 (sqrt (/ 1 (/ (* V l) A))))
46.0ms
(sqrt (/ 1 (/ (* V l) A)))
23.0ms
(/ 1 (/ (* V l) A))
22.0ms
(/ (* V l) A)

simplify496.0ms

Counts
33 → 73
Calls

33 calls. Slowest were:

61.0ms
(sqrt (* (cbrt (/ 1 (/ (* V l) A))) (cbrt (/ 1 (/ (* V l) A)))))
58.0ms
(sqrt (/ 1 (/ (* V l) A)))
48.0ms
(sqrt (sqrt (/ 1 (/ (* V l) A))))

prune936.0ms

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 9.8b

localize26.0ms

Local error

Found 4 expressions with local error:

16.0b
(sqrt (/ (/ 1 (* V l)) (/ 1 A)))
3.3b
(/ (/ 1 (* V l)) (/ 1 A))
0.6b
(* c0 (sqrt (/ (/ 1 (* V l)) (/ 1 A))))
0.4b
(/ 1 (* V l))

rewrite13.0ms

Algorithm
rewrite-expression-head
Counts
4 → 118
Calls

4 calls. Slowest were:

5.0ms
(/ (/ 1 (* V l)) (/ 1 A))
3.0ms
(sqrt (/ (/ 1 (* V l)) (/ 1 A)))
3.0ms
(* c0 (sqrt (/ (/ 1 (* V l)) (/ 1 A))))

series92.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

47.0ms
(* c0 (sqrt (/ (/ 1 (* V l)) (/ 1 A))))
25.0ms
(sqrt (/ (/ 1 (* V l)) (/ 1 A)))
13.0ms
(/ (/ 1 (* V l)) (/ 1 A))
7.0ms
(/ 1 (* V l))

simplify3.5s

Counts
103 → 130
Calls

103 calls. Slowest were:

234.0ms
(- (log (/ 1 (* V l))) (log (/ 1 A)))
173.0ms
(/ (/ 1 (* V l)) (/ 1 A))
144.0ms
(- (- (log (* V l))) (log (/ 1 A)))

prune1.7s

Pruning

12 alts after pruning (12 fresh and 0 done)

Merged error: 5.5b

regimes969.0ms

Accuracy

45.3% (3.7b remaining)

Error of 10.3b against oracle of 6.6b and baseline of 13.3b

bsearch11.0ms