Average Error: 11.2 → 4.1
Time: 53.4s
Precision: 64
Internal Precision: 576
\[\left(l_M2 + r_M2\right) + \frac{\left(\left(delta \cdot delta\right) \cdot l_count\right) \cdot r_count}{n_count}\]
\[\begin{array}{l} \mathbf{if}\;delta \cdot \left(delta \cdot l_count\right) \le -6.0834062117458714 \cdot 10^{+287}:\\ \;\;\;\;r_M2 + l_M2\\ \mathbf{if}\;delta \cdot \left(delta \cdot l_count\right) \le -1.0913444575209753 \cdot 10^{+30}:\\ \;\;\;\;\frac{delta \cdot \left(delta \cdot l_count\right)}{\frac{n_count}{r_count}} + \left(r_M2 + l_M2\right)\\ \mathbf{if}\;delta \cdot \left(delta \cdot l_count\right) \le 2.502756361315338 \cdot 10^{-84} \lor \neg \left(delta \cdot \left(delta \cdot l_count\right) \le 3.785759227063715 \cdot 10^{+299}\right):\\ \;\;\;\;\left(r_M2 + l_M2\right) + \frac{\left(r_count \cdot \left(delta \cdot l_count\right)\right) \cdot delta}{n_count}\\ \mathbf{else}:\\ \;\;\;\;\frac{delta \cdot \left(delta \cdot l_count\right)}{\frac{n_count}{r_count}} + \left(r_M2 + l_M2\right)\\ \end{array}\]

Error

Bits error versus l_M2

Bits error versus r_M2

Bits error versus delta

Bits error versus l_count

Bits error versus r_count

Bits error versus n_count

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if (* delta (* delta l_count)) < -6.0834062117458714e+287

    1. Initial program 58.3

      \[\left(l_M2 + r_M2\right) + \frac{\left(\left(delta \cdot delta\right) \cdot l_count\right) \cdot r_count}{n_count}\]
    2. Taylor expanded around 0 37.9

      \[\leadsto \left(l_M2 + r_M2\right) + \frac{\color{blue}{0} \cdot r_count}{n_count}\]
    3. Applied simplify37.9

      \[\leadsto \color{blue}{r_M2 + l_M2}\]

    if -6.0834062117458714e+287 < (* delta (* delta l_count)) < -1.0913444575209753e+30 or 2.502756361315338e-84 < (* delta (* delta l_count)) < 3.785759227063715e+299

    1. Initial program 16.9

      \[\left(l_M2 + r_M2\right) + \frac{\left(\left(delta \cdot delta\right) \cdot l_count\right) \cdot r_count}{n_count}\]
    2. Using strategy rm
    3. Applied associate-*l*5.7

      \[\leadsto \left(l_M2 + r_M2\right) + \frac{\color{blue}{\left(delta \cdot \left(delta \cdot l_count\right)\right)} \cdot r_count}{n_count}\]
    4. Using strategy rm
    5. Applied associate-/l*0.7

      \[\leadsto \left(l_M2 + r_M2\right) + \color{blue}{\frac{delta \cdot \left(delta \cdot l_count\right)}{\frac{n_count}{r_count}}}\]

    if -1.0913444575209753e+30 < (* delta (* delta l_count)) < 2.502756361315338e-84 or 3.785759227063715e+299 < (* delta (* delta l_count))

    1. Initial program 5.7

      \[\left(l_M2 + r_M2\right) + \frac{\left(\left(delta \cdot delta\right) \cdot l_count\right) \cdot r_count}{n_count}\]
    2. Using strategy rm
    3. Applied associate-*l*4.8

      \[\leadsto \left(l_M2 + r_M2\right) + \frac{\color{blue}{\left(delta \cdot \left(delta \cdot l_count\right)\right)} \cdot r_count}{n_count}\]
    4. Using strategy rm
    5. Applied associate-*l*3.1

      \[\leadsto \left(l_M2 + r_M2\right) + \frac{\color{blue}{delta \cdot \left(\left(delta \cdot l_count\right) \cdot r_count\right)}}{n_count}\]
  3. Recombined 3 regimes into one program.
  4. Applied simplify4.1

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;delta \cdot \left(delta \cdot l_count\right) \le -6.0834062117458714 \cdot 10^{+287}:\\ \;\;\;\;r_M2 + l_M2\\ \mathbf{if}\;delta \cdot \left(delta \cdot l_count\right) \le -1.0913444575209753 \cdot 10^{+30}:\\ \;\;\;\;\frac{delta \cdot \left(delta \cdot l_count\right)}{\frac{n_count}{r_count}} + \left(r_M2 + l_M2\right)\\ \mathbf{if}\;delta \cdot \left(delta \cdot l_count\right) \le 2.502756361315338 \cdot 10^{-84} \lor \neg \left(delta \cdot \left(delta \cdot l_count\right) \le 3.785759227063715 \cdot 10^{+299}\right):\\ \;\;\;\;\left(r_M2 + l_M2\right) + \frac{\left(r_count \cdot \left(delta \cdot l_count\right)\right) \cdot delta}{n_count}\\ \mathbf{else}:\\ \;\;\;\;\frac{delta \cdot \left(delta \cdot l_count\right)}{\frac{n_count}{r_count}} + \left(r_M2 + l_M2\right)\\ \end{array}}\]

Runtime

Time bar (total: 53.4s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (l_M2 r_M2 delta l_count r_count n_count)
  :name "l_M2 + r_M2 + delta * delta * l_count * r_count / n_count"
  (+ (+ l_M2 r_M2) (/ (* (* (* delta delta) l_count) r_count) n_count)))