Average Error: 15.2 → 1.0
Time: 26.9s
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{x \cdot y}{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{x \cdot y}{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 r68135 = x;
        double r68136 = y;
        double r68137 = z;
        double r68138 = r68136 / r68137;
        double r68139 = t;
        double r68140 = r68138 * r68139;
        double r68141 = r68140 / r68139;
        double r68142 = r68135 * r68141;
        return r68142;
}

double f(double x, double y, double z, double __attribute__((unused)) t) {
        double r68143 = y;
        double r68144 = z;
        double r68145 = r68143 / r68144;
        double r68146 = -1.3561375991187766e+280;
        bool r68147 = r68145 <= r68146;
        double r68148 = x;
        double r68149 = r68148 / r68144;
        double r68150 = r68143 * r68149;
        double r68151 = -8.828782166850766e-175;
        bool r68152 = r68145 <= r68151;
        double r68153 = r68145 * r68148;
        double r68154 = 6.939139322974091e-194;
        bool r68155 = r68145 <= r68154;
        double r68156 = r68148 * r68143;
        double r68157 = r68156 / r68144;
        double r68158 = 2.459953299034684e+86;
        bool r68159 = r68145 <= r68158;
        double r68160 = r68159 ? r68153 : r68150;
        double r68161 = r68155 ? r68157 : r68160;
        double r68162 = r68152 ? r68153 : r68161;
        double r68163 = r68147 ? r68150 : r68162;
        return r68163;
}

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 *-un-lft-identity9.7

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

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

      \[\leadsto 1 \cdot \color{blue}{\frac{x \cdot y}{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{x \cdot y}{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)))