Average Error: 7.9 → 1.8
Time: 4.0s
Precision: binary64
\[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\]
\[\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}} \cdot \left(\sqrt[3]{x} \cdot \left(\frac{\sqrt[3]{x}}{y - z} \cdot \left(\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}} \cdot \sqrt[3]{\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}}\right)\right)\right)\right)\right)\]
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}} \cdot \left(\sqrt[3]{x} \cdot \left(\frac{\sqrt[3]{x}}{y - z} \cdot \left(\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}} \cdot \sqrt[3]{\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}}\right)\right)\right)\right)\right)
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
(FPCore (x y z t)
 :precision binary64
 (*
  (cbrt (/ (cbrt x) (- t z)))
  (*
   (cbrt x)
   (*
    (/ (cbrt x) (- y z))
    (*
     (cbrt (/ (cbrt x) (- t z)))
     (*
      (cbrt (cbrt (/ (cbrt x) (- t z))))
      (*
       (cbrt (cbrt (/ (cbrt x) (- t z))))
       (cbrt (cbrt (/ (cbrt x) (- t z)))))))))))
double code(double x, double y, double z, double t) {
	return (x / ((double) (((double) (y - z)) * ((double) (t - z)))));
}
double code(double x, double y, double z, double t) {
	return ((double) (((double) cbrt((((double) cbrt(x)) / ((double) (t - z))))) * ((double) (((double) cbrt(x)) * ((double) ((((double) cbrt(x)) / ((double) (y - z))) * ((double) (((double) cbrt((((double) cbrt(x)) / ((double) (t - z))))) * ((double) (((double) cbrt(((double) cbrt((((double) cbrt(x)) / ((double) (t - z))))))) * ((double) (((double) cbrt(((double) cbrt((((double) cbrt(x)) / ((double) (t - z))))))) * ((double) cbrt(((double) cbrt((((double) cbrt(x)) / ((double) (t - z)))))))))))))))))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original7.9
Target8.8
Herbie1.8
\[\begin{array}{l} \mathbf{if}\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} < 0:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{\left(y - z\right) \cdot \left(t - z\right)}\\ \end{array}\]

Derivation

  1. Initial program Error: 7.9 bits

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\]
  2. Using strategy rm
  3. Applied add-cube-cbrtError: 8.4 bits

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)}\]
  4. Applied times-fracError: 1.6 bits

    \[\leadsto \color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}}\]
  5. SimplifiedError: 1.6 bits

    \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \frac{\sqrt[3]{x}}{y - z}\right)} \cdot \frac{\sqrt[3]{x}}{t - z}\]
  6. Using strategy rm
  7. Applied add-cube-cbrtError: 1.8 bits

    \[\leadsto \left(\sqrt[3]{x} \cdot \frac{\sqrt[3]{x}}{y - z}\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}} \cdot \sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}\right)}\]
  8. Applied associate-*r*Error: 1.8 bits

    \[\leadsto \color{blue}{\left(\left(\sqrt[3]{x} \cdot \frac{\sqrt[3]{x}}{y - z}\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}} \cdot \sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}\right)\right) \cdot \sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}}\]
  9. SimplifiedError: 1.6 bits

    \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \left(\frac{\sqrt[3]{x}}{y - z} \cdot \left(\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}} \cdot \sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}\right)\right)\right)} \cdot \sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}\]
  10. Using strategy rm
  11. Applied add-cube-cbrtError: 1.8 bits

    \[\leadsto \left(\sqrt[3]{x} \cdot \left(\frac{\sqrt[3]{x}}{y - z} \cdot \left(\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}} \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}} \cdot \sqrt[3]{\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}}\right) \cdot \sqrt[3]{\sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}}\right)}\right)\right)\right) \cdot \sqrt[3]{\frac{\sqrt[3]{x}}{t - z}}\]
  12. Final simplificationError: 1.8 bits

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

Reproduce

herbie shell --seed 2020203 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
  :precision binary64

  :herbie-target
  (if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))

  (/ x (* (- y z) (- t z))))