Average Error: 15.3 → 0.6
Time: 18.1s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.548240730790440881436662006949490760264 \cdot 10^{219}:\\ \;\;\;\;\frac{1}{\frac{z}{y \cdot x}}\\ \mathbf{elif}\;\frac{y}{z} \le -8.577400369799064208368387316979607426764 \cdot 10^{-204}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -0.0:\\ \;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\ \mathbf{elif}\;\frac{y}{z} \le 1.9347234214895972433294907337595387054 \cdot 10^{240}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -1.548240730790440881436662006949490760264 \cdot 10^{219}:\\
\;\;\;\;\frac{1}{\frac{z}{y \cdot x}}\\

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

\mathbf{elif}\;\frac{y}{z} \le -0.0:\\
\;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\

\mathbf{elif}\;\frac{y}{z} \le 1.9347234214895972433294907337595387054 \cdot 10^{240}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\

\end{array}
double f(double x, double y, double z, double t) {
        double r4276484 = x;
        double r4276485 = y;
        double r4276486 = z;
        double r4276487 = r4276485 / r4276486;
        double r4276488 = t;
        double r4276489 = r4276487 * r4276488;
        double r4276490 = r4276489 / r4276488;
        double r4276491 = r4276484 * r4276490;
        return r4276491;
}

double f(double x, double y, double z, double __attribute__((unused)) t) {
        double r4276492 = y;
        double r4276493 = z;
        double r4276494 = r4276492 / r4276493;
        double r4276495 = -1.548240730790441e+219;
        bool r4276496 = r4276494 <= r4276495;
        double r4276497 = 1.0;
        double r4276498 = x;
        double r4276499 = r4276492 * r4276498;
        double r4276500 = r4276493 / r4276499;
        double r4276501 = r4276497 / r4276500;
        double r4276502 = -8.577400369799064e-204;
        bool r4276503 = r4276494 <= r4276502;
        double r4276504 = r4276498 * r4276494;
        double r4276505 = -0.0;
        bool r4276506 = r4276494 <= r4276505;
        double r4276507 = r4276497 / r4276493;
        double r4276508 = r4276507 * r4276499;
        double r4276509 = 1.9347234214895972e+240;
        bool r4276510 = r4276494 <= r4276509;
        double r4276511 = r4276493 / r4276492;
        double r4276512 = r4276498 / r4276511;
        double r4276513 = r4276510 ? r4276512 : r4276508;
        double r4276514 = r4276506 ? r4276508 : r4276513;
        double r4276515 = r4276503 ? r4276504 : r4276514;
        double r4276516 = r4276496 ? r4276501 : r4276515;
        return r4276516;
}

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 4 regimes
  2. if (/ y z) < -1.548240730790441e+219

    1. Initial program 44.8

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    3. Using strategy rm
    4. Applied clear-num1.0

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

    if -1.548240730790441e+219 < (/ y z) < -8.577400369799064e-204

    1. Initial program 9.2

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

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{1 \cdot z}}\]
    5. Applied times-frac0.2

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

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

    if -8.577400369799064e-204 < (/ y z) < -0.0 or 1.9347234214895972e+240 < (/ y z)

    1. Initial program 23.4

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    3. Using strategy rm
    4. Applied div-inv0.6

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

    if -0.0 < (/ y z) < 1.9347234214895972e+240

    1. Initial program 10.8

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.548240730790440881436662006949490760264 \cdot 10^{219}:\\ \;\;\;\;\frac{1}{\frac{z}{y \cdot x}}\\ \mathbf{elif}\;\frac{y}{z} \le -8.577400369799064208368387316979607426764 \cdot 10^{-204}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -0.0:\\ \;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\ \mathbf{elif}\;\frac{y}{z} \le 1.9347234214895972433294907337595387054 \cdot 10^{240}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\ \end{array}\]

Reproduce

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