Average Error: 15.2 → 1.0
Time: 26.4s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.35613759911877656476275151503320492094 \cdot 10^{280}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -8.828782166850766038005620975563547450989 \cdot 10^{-175}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 6.939139322974091469623957424428358865557 \cdot 10^{-194}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 2.459953299034684076090573649758520228965 \cdot 10^{86}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -1.35613759911877656476275151503320492094 \cdot 10^{280}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

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

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

\mathbf{elif}\;\frac{y}{z} \le 2.459953299034684076090573649758520228965 \cdot 10^{86}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\end{array}
double f(double x, double y, double z, double t) {
        double r62000 = x;
        double r62001 = y;
        double r62002 = z;
        double r62003 = r62001 / r62002;
        double r62004 = t;
        double r62005 = r62003 * r62004;
        double r62006 = r62005 / r62004;
        double r62007 = r62000 * r62006;
        return r62007;
}

double f(double x, double y, double z, double __attribute__((unused)) t) {
        double r62008 = y;
        double r62009 = z;
        double r62010 = r62008 / r62009;
        double r62011 = -1.3561375991187766e+280;
        bool r62012 = r62010 <= r62011;
        double r62013 = x;
        double r62014 = r62013 / r62009;
        double r62015 = r62008 * r62014;
        double r62016 = -8.828782166850766e-175;
        bool r62017 = r62010 <= r62016;
        double r62018 = r62010 * r62013;
        double r62019 = 6.939139322974091e-194;
        bool r62020 = r62010 <= r62019;
        double r62021 = r62008 * r62013;
        double r62022 = r62021 / r62009;
        double r62023 = 2.459953299034684e+86;
        bool r62024 = r62010 <= r62023;
        double r62025 = r62024 ? r62018 : r62015;
        double r62026 = r62020 ? r62022 : r62025;
        double r62027 = r62017 ? r62018 : r62026;
        double r62028 = r62012 ? r62015 : r62027;
        return r62028;
}

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) < -1.3561375991187766e+280 or 2.459953299034684e+86 < (/ y z)

    1. Initial program 34.5

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

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

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

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

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

    if -1.3561375991187766e+280 < (/ y z) < -8.828782166850766e-175 or 6.939139322974091e-194 < (/ y z) < 2.459953299034684e+86

    1. Initial program 8.3

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

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

    if -8.828782166850766e-175 < (/ y z) < 6.939139322974091e-194

    1. Initial program 17.1

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \left(\frac{y}{\sqrt[3]{z}} \cdot x\right)}\]
    8. Using strategy rm
    9. Applied associate-*l/1.3

      \[\leadsto \frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \color{blue}{\frac{y \cdot x}{\sqrt[3]{z}}}\]
    10. Applied frac-times1.3

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.35613759911877656476275151503320492094 \cdot 10^{280}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -8.828782166850766038005620975563547450989 \cdot 10^{-175}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 6.939139322974091469623957424428358865557 \cdot 10^{-194}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 2.459953299034684076090573649758520228965 \cdot 10^{86}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array}\]

Reproduce

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