Average Error: 8.3 → 1.4
Time: 1.8s
Precision: binary64
\[\frac{\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t}{k}\]
\[\begin{array}{l} \mathbf{if}\;\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le -4.9540809269170364 \cdot 10^{224} \lor \neg \left(\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le -4.78204861129760943 \cdot 10^{-159} \lor \neg \left(\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le 1.93757189176354794 \cdot 10^{-213} \lor \neg \left(\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le 7.6522900087570287 \cdot 10^{174}\right)\right)\right):\\ \;\;\;\;\frac{t}{\frac{k}{\left(0.5 \cdot x\right) \cdot t + y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t}{k}\\ \end{array}\]
\frac{\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t}{k}
\begin{array}{l}
\mathbf{if}\;\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le -4.9540809269170364 \cdot 10^{224} \lor \neg \left(\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le -4.78204861129760943 \cdot 10^{-159} \lor \neg \left(\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le 1.93757189176354794 \cdot 10^{-213} \lor \neg \left(\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le 7.6522900087570287 \cdot 10^{174}\right)\right)\right):\\
\;\;\;\;\frac{t}{\frac{k}{\left(0.5 \cdot x\right) \cdot t + y}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t}{k}\\

\end{array}
double code(double x, double t, double y, double k) {
	return ((double) (((double) (((double) (((double) (((double) (0.5 * x)) * t)) * t)) + ((double) (y * t)))) / k));
}
double code(double x, double t, double y, double k) {
	double VAR;
	if (((((double) (((double) (((double) (((double) (0.5 * x)) * t)) * t)) + ((double) (y * t)))) <= -4.954080926917036e+224) || !((((double) (((double) (((double) (((double) (0.5 * x)) * t)) * t)) + ((double) (y * t)))) <= -4.782048611297609e-159) || !((((double) (((double) (((double) (((double) (0.5 * x)) * t)) * t)) + ((double) (y * t)))) <= 1.937571891763548e-213) || !(((double) (((double) (((double) (((double) (0.5 * x)) * t)) * t)) + ((double) (y * t)))) <= 7.652290008757029e+174))))) {
		VAR = ((double) (t / ((double) (k / ((double) (((double) (((double) (0.5 * x)) * t)) + y))))));
	} else {
		VAR = ((double) (((double) (((double) (((double) (((double) (0.5 * x)) * t)) * t)) + ((double) (y * t)))) / k));
	}
	return VAR;
}

Error

Bits error versus x

Bits error versus t

Bits error versus y

Bits error versus k

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (+ (* (* (* 0.5 x) t) t) (* y t)) < -4.9540809269170364e224 or -4.78204861129760943e-159 < (+ (* (* (* 0.5 x) t) t) (* y t)) < 1.93757189176354794e-213 or 7.6522900087570287e174 < (+ (* (* (* 0.5 x) t) t) (* y t))

    1. Initial program 18.7

      \[\frac{\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t}{k}\]
    2. Simplified2.8

      \[\leadsto \color{blue}{\frac{t}{\frac{k}{\left(0.5 \cdot x\right) \cdot t + y}}}\]

    if -4.9540809269170364e224 < (+ (* (* (* 0.5 x) t) t) (* y t)) < -4.78204861129760943e-159 or 1.93757189176354794e-213 < (+ (* (* (* 0.5 x) t) t) (* y t)) < 7.6522900087570287e174

    1. Initial program 0.3

      \[\frac{\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t}{k}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le -4.9540809269170364 \cdot 10^{224} \lor \neg \left(\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le -4.78204861129760943 \cdot 10^{-159} \lor \neg \left(\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le 1.93757189176354794 \cdot 10^{-213} \lor \neg \left(\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t \le 7.6522900087570287 \cdot 10^{174}\right)\right)\right):\\ \;\;\;\;\frac{t}{\frac{k}{\left(0.5 \cdot x\right) \cdot t + y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\left(0.5 \cdot x\right) \cdot t\right) \cdot t + y \cdot t}{k}\\ \end{array}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x t y k)
  :name "(/ (+ (* (* (* 0.5 x) t) t) (* y t)) k)"
  :precision binary64
  (/ (+ (* (* (* 0.5 x) t) t) (* y t)) k))