Average Error: 8.2 → 6.7
Time: 5.2s
Precision: binary64
\[\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19\]
\[\begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19 = -inf.0 \lor \neg \left(\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19 \le 4.10287070432322919 \cdot 10^{259}\right):\\ \;\;\;\;\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - \left(tmp14 \cdot \left(tmp16 - tmp18 \cdot tmp3\right) + tmp18 \cdot tmp19\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19\\ \end{array}\]
\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19 = -inf.0 \lor \neg \left(\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19 \le 4.10287070432322919 \cdot 10^{259}\right):\\
\;\;\;\;\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - \left(tmp14 \cdot \left(tmp16 - tmp18 \cdot tmp3\right) + tmp18 \cdot tmp19\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19\\

\end{array}
double code(double hDD02, double hDD12, double tmp10, double tmp8, double tmp12, double tmp3, double tmp14, double tmp16, double tmp18, double tmp19) {
	return ((double) (((double) (((double) (((double) (((double) (((double) (((double) (hDD02 * hDD12)) * tmp10)) * tmp8)) - ((double) (tmp12 * tmp3)))) - ((double) (tmp14 * tmp16)))) + ((double) (((double) (tmp14 * tmp18)) * tmp3)))) - ((double) (tmp18 * tmp19))));
}
double code(double hDD02, double hDD12, double tmp10, double tmp8, double tmp12, double tmp3, double tmp14, double tmp16, double tmp18, double tmp19) {
	double VAR;
	if (((((double) (((double) (((double) (((double) (((double) (((double) (((double) (hDD02 * hDD12)) * tmp10)) * tmp8)) - ((double) (tmp12 * tmp3)))) - ((double) (tmp14 * tmp16)))) + ((double) (((double) (tmp14 * tmp18)) * tmp3)))) - ((double) (tmp18 * tmp19)))) <= -inf.0) || !(((double) (((double) (((double) (((double) (((double) (((double) (((double) (hDD02 * hDD12)) * tmp10)) * tmp8)) - ((double) (tmp12 * tmp3)))) - ((double) (tmp14 * tmp16)))) + ((double) (((double) (tmp14 * tmp18)) * tmp3)))) - ((double) (tmp18 * tmp19)))) <= 4.102870704323229e+259))) {
		VAR = ((double) (((double) (((double) (((double) (((double) (hDD02 * hDD12)) * tmp10)) * tmp8)) - ((double) (tmp12 * tmp3)))) - ((double) (((double) (tmp14 * ((double) (tmp16 - ((double) (tmp18 * tmp3)))))) + ((double) (tmp18 * tmp19))))));
	} else {
		VAR = ((double) (((double) (((double) (((double) (((double) (((double) (((double) (hDD02 * hDD12)) * tmp10)) * tmp8)) - ((double) (tmp12 * tmp3)))) - ((double) (tmp14 * tmp16)))) + ((double) (((double) (tmp14 * tmp18)) * tmp3)))) - ((double) (tmp18 * tmp19))));
	}
	return VAR;
}

Error

Bits error versus hDD02

Bits error versus hDD12

Bits error versus tmp10

Bits error versus tmp8

Bits error versus tmp12

Bits error versus tmp3

Bits error versus tmp14

Bits error versus tmp16

Bits error versus tmp18

Bits error versus tmp19

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (- (+ (- (- (* (* (* hDD02 hDD12) tmp10) tmp8) (* tmp12 tmp3)) (* tmp14 tmp16)) (* (* tmp14 tmp18) tmp3)) (* tmp18 tmp19)) < -inf.0 or 4.10287070432322919e259 < (- (+ (- (- (* (* (* hDD02 hDD12) tmp10) tmp8) (* tmp12 tmp3)) (* tmp14 tmp16)) (* (* tmp14 tmp18) tmp3)) (* tmp18 tmp19))

    1. Initial program 38.5

      \[\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19\]
    2. Simplified31.3

      \[\leadsto \color{blue}{\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - \left(tmp14 \cdot \left(tmp16 - tmp18 \cdot tmp3\right) + tmp18 \cdot tmp19\right)}\]

    if -inf.0 < (- (+ (- (- (* (* (* hDD02 hDD12) tmp10) tmp8) (* tmp12 tmp3)) (* tmp14 tmp16)) (* (* tmp14 tmp18) tmp3)) (* tmp18 tmp19)) < 4.10287070432322919e259

    1. Initial program 0.5

      \[\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19\]
  3. Recombined 2 regimes into one program.
  4. Final simplification6.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19 = -inf.0 \lor \neg \left(\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19 \le 4.10287070432322919 \cdot 10^{259}\right):\\ \;\;\;\;\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - \left(tmp14 \cdot \left(tmp16 - tmp18 \cdot tmp3\right) + tmp18 \cdot tmp19\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(\left(hDD02 \cdot hDD12\right) \cdot tmp10\right) \cdot tmp8 - tmp12 \cdot tmp3\right) - tmp14 \cdot tmp16\right) + \left(tmp14 \cdot tmp18\right) \cdot tmp3\right) - tmp18 \cdot tmp19\\ \end{array}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (hDD02 hDD12 tmp10 tmp8 tmp12 tmp3 tmp14 tmp16 tmp18 tmp19)
  :name "(- (+ (- (- (* (* (* hDD02 hDD12) tmp10) tmp8) (* tmp12 tmp3)) (* tmp14 tmp16)) (* (* tmp14 tmp18) tmp3)) (* tmp18 tmp19))"
  :precision binary64
  (- (+ (- (- (* (* (* hDD02 hDD12) tmp10) tmp8) (* tmp12 tmp3)) (* tmp14 tmp16)) (* (* tmp14 tmp18) tmp3)) (* tmp18 tmp19)))