Average Error: 2.2 → 0.4
Time: 10.5s
Precision: 64
\[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\]
\[\left(a \cdot \frac{\sqrt[3]{z - y} \cdot \sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1} \cdot \sqrt[3]{\left(t - z\right) + 1}}\right) \cdot \frac{\sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1}} + x\]
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\left(a \cdot \frac{\sqrt[3]{z - y} \cdot \sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1} \cdot \sqrt[3]{\left(t - z\right) + 1}}\right) \cdot \frac{\sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1}} + x
double f(double x, double y, double z, double t, double a) {
        double r574227 = x;
        double r574228 = y;
        double r574229 = z;
        double r574230 = r574228 - r574229;
        double r574231 = t;
        double r574232 = r574231 - r574229;
        double r574233 = 1.0;
        double r574234 = r574232 + r574233;
        double r574235 = a;
        double r574236 = r574234 / r574235;
        double r574237 = r574230 / r574236;
        double r574238 = r574227 - r574237;
        return r574238;
}

double f(double x, double y, double z, double t, double a) {
        double r574239 = a;
        double r574240 = z;
        double r574241 = y;
        double r574242 = r574240 - r574241;
        double r574243 = cbrt(r574242);
        double r574244 = r574243 * r574243;
        double r574245 = t;
        double r574246 = r574245 - r574240;
        double r574247 = 1.0;
        double r574248 = r574246 + r574247;
        double r574249 = cbrt(r574248);
        double r574250 = r574249 * r574249;
        double r574251 = r574244 / r574250;
        double r574252 = r574239 * r574251;
        double r574253 = r574243 / r574249;
        double r574254 = r574252 * r574253;
        double r574255 = x;
        double r574256 = r574254 + r574255;
        return r574256;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original2.2
Target0.3
Herbie0.4
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Derivation

  1. Initial program 2.2

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\]
  2. Simplified0.3

    \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{z - y}{\left(t - z\right) + 1}, x\right)}\]
  3. Using strategy rm
  4. Applied fma-udef0.3

    \[\leadsto \color{blue}{a \cdot \frac{z - y}{\left(t - z\right) + 1} + x}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.7

    \[\leadsto a \cdot \frac{z - y}{\color{blue}{\left(\sqrt[3]{\left(t - z\right) + 1} \cdot \sqrt[3]{\left(t - z\right) + 1}\right) \cdot \sqrt[3]{\left(t - z\right) + 1}}} + x\]
  7. Applied add-cube-cbrt0.6

    \[\leadsto a \cdot \frac{\color{blue}{\left(\sqrt[3]{z - y} \cdot \sqrt[3]{z - y}\right) \cdot \sqrt[3]{z - y}}}{\left(\sqrt[3]{\left(t - z\right) + 1} \cdot \sqrt[3]{\left(t - z\right) + 1}\right) \cdot \sqrt[3]{\left(t - z\right) + 1}} + x\]
  8. Applied times-frac0.6

    \[\leadsto a \cdot \color{blue}{\left(\frac{\sqrt[3]{z - y} \cdot \sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1} \cdot \sqrt[3]{\left(t - z\right) + 1}} \cdot \frac{\sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1}}\right)} + x\]
  9. Applied associate-*r*0.4

    \[\leadsto \color{blue}{\left(a \cdot \frac{\sqrt[3]{z - y} \cdot \sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1} \cdot \sqrt[3]{\left(t - z\right) + 1}}\right) \cdot \frac{\sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1}}} + x\]
  10. Final simplification0.4

    \[\leadsto \left(a \cdot \frac{\sqrt[3]{z - y} \cdot \sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1} \cdot \sqrt[3]{\left(t - z\right) + 1}}\right) \cdot \frac{\sqrt[3]{z - y}}{\sqrt[3]{\left(t - z\right) + 1}} + x\]

Reproduce

herbie shell --seed 2020046 +o rules:numerics
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (- x (* (/ (- y z) (+ (- t z) 1)) a))

  (- x (/ (- y z) (/ (+ (- t z) 1) a))))