Average Error: 14.5 → 1.1
Time: 26.6s
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{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \left(y \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{z}}\right)\\ \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{y}{z} \cdot x\\

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

\end{array}
double f(double x, double y, double z, double t) {
        double r2749248 = x;
        double r2749249 = y;
        double r2749250 = z;
        double r2749251 = r2749249 / r2749250;
        double r2749252 = t;
        double r2749253 = r2749251 * r2749252;
        double r2749254 = r2749253 / r2749252;
        double r2749255 = r2749248 * r2749254;
        return r2749255;
}

double f(double x, double y, double z, double __attribute__((unused)) t) {
        double r2749256 = y;
        double r2749257 = z;
        double r2749258 = r2749256 / r2749257;
        double r2749259 = -inf.0;
        bool r2749260 = r2749258 <= r2749259;
        double r2749261 = x;
        double r2749262 = r2749261 * r2749256;
        double r2749263 = r2749262 / r2749257;
        double r2749264 = -3.5482495456651053e-302;
        bool r2749265 = r2749258 <= r2749264;
        double r2749266 = r2749258 * r2749261;
        double r2749267 = cbrt(r2749261);
        double r2749268 = r2749267 * r2749267;
        double r2749269 = cbrt(r2749257);
        double r2749270 = r2749269 * r2749269;
        double r2749271 = r2749268 / r2749270;
        double r2749272 = r2749267 / r2749269;
        double r2749273 = r2749256 * r2749272;
        double r2749274 = r2749271 * r2749273;
        double r2749275 = r2749265 ? r2749266 : r2749274;
        double r2749276 = r2749260 ? r2749263 : r2749275;
        return r2749276;
}

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 0 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 div-inv7.9

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

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

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

    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.1

    \[\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{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \left(y \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{z}}\right)\\ \end{array}\]

Reproduce

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