Average Error: 14.6 → 2.3
Time: 34.1s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.1944059742835766 \cdot 10^{-100} \lor \neg \left(\frac{y}{z} \le 4.214411105027287 \cdot 10^{-203} \lor \neg \left(\frac{y}{z} \le 1.01530627614121036 \cdot 10^{211}\right)\right):\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{-z} \cdot \left(-y\right)\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -1.1944059742835766 \cdot 10^{-100} \lor \neg \left(\frac{y}{z} \le 4.214411105027287 \cdot 10^{-203} \lor \neg \left(\frac{y}{z} \le 1.01530627614121036 \cdot 10^{211}\right)\right):\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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

\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)) <= -1.1944059742835766e-100) || !((((double) (y / z)) <= 4.2144111050272865e-203) || !(((double) (y / z)) <= 1.0153062761412104e+211)))) {
		VAR = ((double) (x / ((double) (z / y))));
	} else {
		VAR = ((double) (((double) (x / ((double) -(z)))) * ((double) -(y))));
	}
	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) < -1.1944059742835766e-100 or 4.2144111050272865e-203 < (/ y z) < 1.0153062761412104e+211

    1. Initial program 11.6

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

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

      \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\]
    5. Applied un-div-inv2.9

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

    if -1.1944059742835766e-100 < (/ y z) < 4.2144111050272865e-203 or 1.0153062761412104e+211 < (/ y z)

    1. Initial program 19.2

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

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

      \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\]
    5. Applied un-div-inv10.2

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    6. Using strategy rm
    7. Applied frac-2neg10.2

      \[\leadsto \frac{x}{\color{blue}{\frac{-z}{-y}}}\]
    8. Applied associate-/r/1.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -1.1944059742835766 \cdot 10^{-100} \lor \neg \left(\frac{y}{z} \le 4.214411105027287 \cdot 10^{-203} \lor \neg \left(\frac{y}{z} \le 1.01530627614121036 \cdot 10^{211}\right)\right):\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{-z} \cdot \left(-y\right)\\ \end{array}\]

Reproduce

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