Average Error: 3.1 → 2.9
Time: 27.4s
Precision: 64
\[\left(-\left(df_sum \cdot dRho + \left(z2p \cdot \frac{1.0}{\sqrt{dist}} - \left(z2 \cdot \frac{1.0}{\sqrt{dist}}\right) \cdot \frac{1.0}{\sqrt{dist}}\right)\right)\right) \cdot \frac{1.0}{\sqrt{dist}}\]
\[\frac{\left(-\left(dRho \cdot df_sum + \left(z2p \cdot \frac{1.0}{\sqrt{dist}} - 1.0 \cdot \frac{z2}{dist}\right)\right)\right) \cdot 1.0}{\sqrt{dist}}\]
\left(-\left(df_sum \cdot dRho + \left(z2p \cdot \frac{1.0}{\sqrt{dist}} - \left(z2 \cdot \frac{1.0}{\sqrt{dist}}\right) \cdot \frac{1.0}{\sqrt{dist}}\right)\right)\right) \cdot \frac{1.0}{\sqrt{dist}}
\frac{\left(-\left(dRho \cdot df_sum + \left(z2p \cdot \frac{1.0}{\sqrt{dist}} - 1.0 \cdot \frac{z2}{dist}\right)\right)\right) \cdot 1.0}{\sqrt{dist}}
double f(double df_sum, double dRho, double z2p, double dist, double z2) {
        double r20122591 = df_sum;
        double r20122592 = dRho;
        double r20122593 = r20122591 * r20122592;
        double r20122594 = z2p;
        double r20122595 = 1.0;
        double r20122596 = dist;
        double r20122597 = sqrt(r20122596);
        double r20122598 = r20122595 / r20122597;
        double r20122599 = r20122594 * r20122598;
        double r20122600 = z2;
        double r20122601 = r20122600 * r20122598;
        double r20122602 = r20122601 * r20122598;
        double r20122603 = r20122599 - r20122602;
        double r20122604 = r20122593 + r20122603;
        double r20122605 = -r20122604;
        double r20122606 = r20122605 * r20122598;
        return r20122606;
}

double f(double df_sum, double dRho, double z2p, double dist, double z2) {
        double r20122607 = dRho;
        double r20122608 = df_sum;
        double r20122609 = r20122607 * r20122608;
        double r20122610 = z2p;
        double r20122611 = 1.0;
        double r20122612 = dist;
        double r20122613 = sqrt(r20122612);
        double r20122614 = r20122611 / r20122613;
        double r20122615 = r20122610 * r20122614;
        double r20122616 = z2;
        double r20122617 = r20122616 / r20122612;
        double r20122618 = r20122611 * r20122617;
        double r20122619 = r20122615 - r20122618;
        double r20122620 = r20122609 + r20122619;
        double r20122621 = -r20122620;
        double r20122622 = r20122621 * r20122611;
        double r20122623 = r20122622 / r20122613;
        return r20122623;
}

Error

Bits error versus df_sum

Bits error versus dRho

Bits error versus z2p

Bits error versus dist

Bits error versus z2

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 3.1

    \[\left(-\left(df_sum \cdot dRho + \left(z2p \cdot \frac{1.0}{\sqrt{dist}} - \left(z2 \cdot \frac{1.0}{\sqrt{dist}}\right) \cdot \frac{1.0}{\sqrt{dist}}\right)\right)\right) \cdot \frac{1.0}{\sqrt{dist}}\]
  2. Taylor expanded around 0 3.0

    \[\leadsto \left(-\left(df_sum \cdot dRho + \left(z2p \cdot \frac{1.0}{\sqrt{dist}} - \color{blue}{1.0 \cdot \frac{z2}{dist}}\right)\right)\right) \cdot \frac{1.0}{\sqrt{dist}}\]
  3. Using strategy rm
  4. Applied associate-*r/2.9

    \[\leadsto \color{blue}{\frac{\left(-\left(df_sum \cdot dRho + \left(z2p \cdot \frac{1.0}{\sqrt{dist}} - 1.0 \cdot \frac{z2}{dist}\right)\right)\right) \cdot 1.0}{\sqrt{dist}}}\]
  5. Final simplification2.9

    \[\leadsto \frac{\left(-\left(dRho \cdot df_sum + \left(z2p \cdot \frac{1.0}{\sqrt{dist}} - 1.0 \cdot \frac{z2}{dist}\right)\right)\right) \cdot 1.0}{\sqrt{dist}}\]

Reproduce

herbie shell --seed 1 
(FPCore (df_sum dRho z2p dist z2)
  :name "-(df_sum * dRho + (z2p * (1.0 / (sqrt(dist)))- (z2 * (1.0 /(sqrt(dist))))* (1.0 / (sqrt(dist)))))* (1.0 / (sqrt(dist)))"
  (* (- (+ (* df_sum dRho) (- (* z2p (/ 1.0 (sqrt dist))) (* (* z2 (/ 1.0 (sqrt dist))) (/ 1.0 (sqrt dist)))))) (/ 1.0 (sqrt dist))))