Average Error: 14.5 → 1.2
Time: 28.0s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -3.5482495456651053 \cdot 10^{-302}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{z}}\right) \cdot \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;\frac{y}{z} = -\infty:\\
\;\;\;\;\frac{x \cdot y}{z}\\

\mathbf{elif}\;\frac{y}{z} \le -3.5482495456651053 \cdot 10^{-302}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{z}}\right) \cdot \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\\

\end{array}
double f(double x, double y, double z, double t) {
        double r4996264 = x;
        double r4996265 = y;
        double r4996266 = z;
        double r4996267 = r4996265 / r4996266;
        double r4996268 = t;
        double r4996269 = r4996267 * r4996268;
        double r4996270 = r4996269 / r4996268;
        double r4996271 = r4996264 * r4996270;
        return r4996271;
}

double f(double x, double y, double z, double __attribute__((unused)) t) {
        double r4996272 = y;
        double r4996273 = z;
        double r4996274 = r4996272 / r4996273;
        double r4996275 = -inf.0;
        bool r4996276 = r4996274 <= r4996275;
        double r4996277 = x;
        double r4996278 = r4996277 * r4996272;
        double r4996279 = r4996278 / r4996273;
        double r4996280 = -3.5482495456651053e-302;
        bool r4996281 = r4996274 <= r4996280;
        double r4996282 = r4996273 / r4996272;
        double r4996283 = r4996277 / r4996282;
        double r4996284 = cbrt(r4996277);
        double r4996285 = cbrt(r4996273);
        double r4996286 = r4996284 / r4996285;
        double r4996287 = r4996272 * r4996286;
        double r4996288 = r4996284 * r4996284;
        double r4996289 = r4996285 * r4996285;
        double r4996290 = r4996288 / r4996289;
        double r4996291 = r4996287 * r4996290;
        double r4996292 = r4996281 ? r4996283 : r4996291;
        double r4996293 = r4996276 ? r4996279 : r4996292;
        return r4996293;
}

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

Derivation

  1. Split input into 3 regimes
  2. if (/ y z) < -inf.0

    1. Initial program 60.1

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified0.2

      \[\leadsto \color{blue}{\frac{x}{z} \cdot y}\]
    3. Taylor expanded around inf 0.3

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]

    if -inf.0 < (/ y z) < -3.5482495456651053e-302

    1. Initial program 10.9

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified7.8

      \[\leadsto \color{blue}{\frac{x}{z} \cdot y}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt8.7

      \[\leadsto \frac{x}{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}} \cdot y\]
    5. Applied *-un-lft-identity8.7

      \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}} \cdot y\]
    6. Applied times-frac8.7

      \[\leadsto \color{blue}{\left(\frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{x}{\sqrt[3]{z}}\right)} \cdot y\]
    7. Applied associate-*l*6.7

      \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \left(\frac{x}{\sqrt[3]{z}} \cdot y\right)}\]
    8. Using strategy rm
    9. Applied div-inv6.7

      \[\leadsto \color{blue}{\left(1 \cdot \frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\right)} \cdot \left(\frac{x}{\sqrt[3]{z}} \cdot y\right)\]
    10. Applied associate-*l*6.7

      \[\leadsto \color{blue}{1 \cdot \left(\frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \left(\frac{x}{\sqrt[3]{z}} \cdot y\right)\right)}\]
    11. Simplified0.3

      \[\leadsto 1 \cdot \color{blue}{\frac{x}{\frac{z}{y}}}\]

    if -3.5482495456651053e-302 < (/ y z)

    1. Initial program 15.1

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified5.4

      \[\leadsto \color{blue}{\frac{x}{z} \cdot y}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt6.2

      \[\leadsto \frac{x}{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}} \cdot y\]
    5. Applied add-cube-cbrt6.3

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}} \cdot y\]
    6. Applied times-frac6.3

      \[\leadsto \color{blue}{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{z}}\right)} \cdot y\]
    7. Applied associate-*l*1.8

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \left(\frac{\sqrt[3]{x}}{\sqrt[3]{z}} \cdot y\right)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -3.5482495456651053 \cdot 10^{-302}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{z}}\right) \cdot \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019144 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))