Average Error: 15.1 → 5.4
Time: 13.4s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;t \le -2.46028900943459 \cdot 10^{-45}:\\ \;\;\;\;\frac{\sqrt[3]{x}}{z} \cdot \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot y\right)\\ \mathbf{elif}\;t \le -3.261465930284666 \cdot 10^{-285}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x}}{z} \cdot \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot y\right)\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;t \le -2.46028900943459 \cdot 10^{-45}:\\
\;\;\;\;\frac{\sqrt[3]{x}}{z} \cdot \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot y\right)\\

\mathbf{elif}\;t \le -3.261465930284666 \cdot 10^{-285}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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

\end{array}
double f(double x, double y, double z, double t) {
        double r4622443 = x;
        double r4622444 = y;
        double r4622445 = z;
        double r4622446 = r4622444 / r4622445;
        double r4622447 = t;
        double r4622448 = r4622446 * r4622447;
        double r4622449 = r4622448 / r4622447;
        double r4622450 = r4622443 * r4622449;
        return r4622450;
}

double f(double x, double y, double z, double t) {
        double r4622451 = t;
        double r4622452 = -2.46028900943459e-45;
        bool r4622453 = r4622451 <= r4622452;
        double r4622454 = x;
        double r4622455 = cbrt(r4622454);
        double r4622456 = z;
        double r4622457 = r4622455 / r4622456;
        double r4622458 = r4622455 * r4622455;
        double r4622459 = y;
        double r4622460 = r4622458 * r4622459;
        double r4622461 = r4622457 * r4622460;
        double r4622462 = -3.261465930284666e-285;
        bool r4622463 = r4622451 <= r4622462;
        double r4622464 = r4622456 / r4622459;
        double r4622465 = r4622454 / r4622464;
        double r4622466 = r4622463 ? r4622465 : r4622461;
        double r4622467 = r4622453 ? r4622461 : r4622466;
        return r4622467;
}

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 2 regimes
  2. if t < -2.46028900943459e-45 or -3.261465930284666e-285 < t

    1. Initial program 15.1

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

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}}\]
    3. Using strategy rm
    4. Applied *-un-lft-identity6.0

      \[\leadsto y \cdot \frac{x}{\color{blue}{1 \cdot z}}\]
    5. Applied add-cube-cbrt6.8

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

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

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

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

    if -2.46028900943459e-45 < t < -3.261465930284666e-285

    1. Initial program 15.0

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    4. Using strategy rm
    5. Applied associate-/l*5.9

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification5.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.46028900943459 \cdot 10^{-45}:\\ \;\;\;\;\frac{\sqrt[3]{x}}{z} \cdot \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot y\right)\\ \mathbf{elif}\;t \le -3.261465930284666 \cdot 10^{-285}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x}}{z} \cdot \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot y\right)\\ \end{array}\]

Reproduce

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