Average Error: 14.5 → 2.2
Time: 3.6s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} = -inf.0 \lor \neg \left(\frac{y}{z} \le -8.1676513292150364 \cdot 10^{-166} \lor \neg \left(\frac{y}{z} \le 2.1792075432183381 \cdot 10^{-134}\right)\right):\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;\frac{y}{z} = -inf.0 \lor \neg \left(\frac{y}{z} \le -8.1676513292150364 \cdot 10^{-166} \lor \neg \left(\frac{y}{z} \le 2.1792075432183381 \cdot 10^{-134}\right)\right):\\
\;\;\;\;\frac{x \cdot y}{z}\\

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

\end{array}
double code(double x, double y, double z, double t) {
	return ((double) (x * ((double) (((double) (((double) (y / z)) * t)) / t))));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if (((((double) (y / z)) <= -inf.0) || !((((double) (y / z)) <= -8.167651329215036e-166) || !(((double) (y / z)) <= 2.179207543218338e-134)))) {
		VAR = ((double) (((double) (x * y)) / z));
	} else {
		VAR = ((double) (x * ((double) (y / z))));
	}
	return VAR;
}

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 (/ y z) < -inf.0 or -8.167651329215036e-166 < (/ y z) < 2.179207543218338e-134

    1. Initial program 19.5

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

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

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

    if -inf.0 < (/ y z) < -8.167651329215036e-166 or 2.179207543218338e-134 < (/ y z)

    1. Initial program 11.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} = -inf.0 \lor \neg \left(\frac{y}{z} \le -8.1676513292150364 \cdot 10^{-166} \lor \neg \left(\frac{y}{z} \le 2.1792075432183381 \cdot 10^{-134}\right)\right):\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array}\]

Reproduce

herbie shell --seed 2020124 
(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)))