Average Error: 18.8 → 11.9
Time: 17.4s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.5639852807279934 \cdot 10^{+283}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -1.1042076494745178 \cdot 10^{-148}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{V \cdot \ell} \cdot A}\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \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) < -1.5639852807279934e+283 or -1.1042076494745178e-148 < (* V l) < -0.0

    1. Initial program 39.7

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Taylor expanded around inf 39.7

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

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

    if -1.5639852807279934e+283 < (* V l) < -1.1042076494745178e-148

    1. Initial program 7.4

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Taylor expanded around inf 7.4

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

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

    if -0.0 < (* V l)

    1. Initial program 14.8

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Taylor expanded around inf 14.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.5639852807279934 \cdot 10^{+283}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -1.1042076494745178 \cdot 10^{-148}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{V \cdot \ell} \cdot A}\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \end{array}\]

Runtime

Time bar (total: 17.4s)Debug logProfile

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