Average Error: 18.6 → 12.0
Time: 12.1s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}\\ \mathbf{elif}\;V \cdot \ell \le -7.872123674130423 \cdot 10^{-308}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{1}{\ell}}\right) \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 2.3827088884260915 \cdot 10^{+191}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}\\ \end{array}\]

Error

Bits error versus c0

Bits error versus A

Bits error versus V

Bits error versus l

Derivation

  1. Split input into 4 regimes
  2. if (* V l) < -inf.0 or 2.3827088884260915e+191 < (* V l)

    1. Initial program 33.8

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

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

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

    if -inf.0 < (* V l) < -7.872123674130423e-308

    1. Initial program 9.6

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

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{A}{V} \cdot \frac{1}{\ell}}}\]
    6. Taylor expanded around 0 9.6

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

    if -7.872123674130423e-308 < (* V l) < -0.0

    1. Initial program 59.7

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

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{A}{V} \cdot \frac{1}{\ell}}}\]
    6. Using strategy rm
    7. Applied sqrt-prod39.2

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

    if -0.0 < (* V l) < 2.3827088884260915e+191

    1. Initial program 8.8

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}\\ \mathbf{elif}\;V \cdot \ell \le -7.872123674130423 \cdot 10^{-308}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{1}{\ell}}\right) \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 2.3827088884260915 \cdot 10^{+191}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}\\ \end{array}\]

Reproduce

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