Average Error: 18.5 → 12.6
Time: 17.2s
Precision: 64
Internal Precision: 576
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.2628732016174605 \cdot 10^{-255}:\\ \;\;\;\;\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \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 3 regimes
  2. if (* V l) < -1.2628732016174605e-255

    1. Initial program 14.2

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

    if -1.2628732016174605e-255 < (* V l) < -0.0

    1. Initial program 52.9

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Initial simplification32.6

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

    if -0.0 < (* V l)

    1. Initial program 14.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.2628732016174605 \cdot 10^{-255}:\\ \;\;\;\;\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \end{array}\]

Runtime

Time bar (total: 17.2s)Debug logProfile

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