Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d4 \cdot d1\right) - d1 \cdot d1
\]
↓
\[d1 \cdot \left(d2 + \left(\left(d4 - d1\right) - d3\right)\right)
\]
(FPCore (d1 d2 d3 d4)
:precision binary64
(- (+ (- (* d1 d2) (* d1 d3)) (* d4 d1)) (* d1 d1))) ↓
(FPCore (d1 d2 d3 d4) :precision binary64 (* d1 (+ d2 (- (- d4 d1) d3)))) double code(double d1, double d2, double d3, double d4) {
return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1);
}
↓
double code(double d1, double d2, double d3, double d4) {
return d1 * (d2 + ((d4 - d1) - d3));
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
code = (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1)
end function
↓
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
code = d1 * (d2 + ((d4 - d1) - d3))
end function
public static double code(double d1, double d2, double d3, double d4) {
return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1);
}
↓
public static double code(double d1, double d2, double d3, double d4) {
return d1 * (d2 + ((d4 - d1) - d3));
}
def code(d1, d2, d3, d4):
return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1)
↓
def code(d1, d2, d3, d4):
return d1 * (d2 + ((d4 - d1) - d3))
function code(d1, d2, d3, d4)
return Float64(Float64(Float64(Float64(d1 * d2) - Float64(d1 * d3)) + Float64(d4 * d1)) - Float64(d1 * d1))
end
↓
function code(d1, d2, d3, d4)
return Float64(d1 * Float64(d2 + Float64(Float64(d4 - d1) - d3)))
end
function tmp = code(d1, d2, d3, d4)
tmp = (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1);
end
↓
function tmp = code(d1, d2, d3, d4)
tmp = d1 * (d2 + ((d4 - d1) - d3));
end
code[d1_, d2_, d3_, d4_] := N[(N[(N[(N[(d1 * d2), $MachinePrecision] - N[(d1 * d3), $MachinePrecision]), $MachinePrecision] + N[(d4 * d1), $MachinePrecision]), $MachinePrecision] - N[(d1 * d1), $MachinePrecision]), $MachinePrecision]
↓
code[d1_, d2_, d3_, d4_] := N[(d1 * N[(d2 + N[(N[(d4 - d1), $MachinePrecision] - d3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d4 \cdot d1\right) - d1 \cdot d1
↓
d1 \cdot \left(d2 + \left(\left(d4 - d1\right) - d3\right)\right)
Alternatives Alternative 1 Accuracy 67.9% Cost 1773
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 + d4\right)\\
t_1 := d1 \cdot \left(d2 - d1\right)\\
t_2 := d1 \cdot \left(d4 - d3\right)\\
\mathbf{if}\;d1 \leq -4.8 \cdot 10^{+134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d1 \leq -6.6 \cdot 10^{-57}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d1 \leq -3.1 \cdot 10^{-135}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d1 \leq -1.42 \cdot 10^{-157}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d1 \leq -1.3 \cdot 10^{-172}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{elif}\;d1 \leq -7 \cdot 10^{-292}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d1 \leq 5.6 \cdot 10^{-249}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d1 \leq 2.85 \cdot 10^{-68}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d1 \leq 8200000000 \lor \neg \left(d1 \leq 1.5 \cdot 10^{+157}\right) \land d1 \leq 8.5 \cdot 10^{+185}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Accuracy 63.1% Cost 1508
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d3\right)\\
t_1 := d1 \cdot \left(d2 - d1\right)\\
t_2 := \left(d1 + d3\right) \cdot \left(-d1\right)\\
\mathbf{if}\;d4 \leq -520000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d4 \leq -1.25 \cdot 10^{-99}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.32 \cdot 10^{-267}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d4 \leq 1.5 \cdot 10^{-204}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d4 \leq 6 \cdot 10^{-180}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d4 \leq 2 \cdot 10^{-154}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d4 \leq 1.34 \cdot 10^{-107}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.4 \cdot 10^{+56}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d4 \leq 6.2 \cdot 10^{+212}:\\
\;\;\;\;d1 \cdot \left(d2 + d4\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\]
Alternative 3 Accuracy 38.9% Cost 1444
\[\begin{array}{l}
t_0 := d1 \cdot \left(-d1\right)\\
t_1 := d1 \cdot \left(-d3\right)\\
\mathbf{if}\;d2 \leq -4.2 \cdot 10^{+113}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d2 \leq -1.2 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d2 \leq -240000:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d2 \leq -1.75 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d2 \leq -1.02 \cdot 10^{-252}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d2 \leq 3.8 \cdot 10^{-294}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d2 \leq 4.6 \cdot 10^{-181}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d2 \leq 1.7 \cdot 10^{-89}:\\
\;\;\;\;d1 \cdot d4\\
\mathbf{elif}\;d2 \leq 7.8 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\]
Alternative 4 Accuracy 65.6% Cost 1376
\[\begin{array}{l}
t_0 := d1 \cdot \left(-d3\right)\\
t_1 := d1 \cdot \left(d2 - d1\right)\\
t_2 := d1 \cdot \left(d2 + d4\right)\\
\mathbf{if}\;d3 \leq -3.7 \cdot 10^{+209}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d3 \leq -2.1 \cdot 10^{+136}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d3 \leq -9 \cdot 10^{+59}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d3 \leq -5.8 \cdot 10^{-197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d3 \leq -3.9 \cdot 10^{-212}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d3 \leq 2.35 \cdot 10^{-183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d3 \leq 4.8 \cdot 10^{-142}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d3 \leq 3.6 \cdot 10^{+161}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Accuracy 64.7% Cost 1112
\[\begin{array}{l}
t_0 := d1 \cdot \left(-d3\right)\\
t_1 := d1 \cdot \left(d2 + d4\right)\\
\mathbf{if}\;d3 \leq -3.4 \cdot 10^{+209}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d3 \leq -1.55 \cdot 10^{+133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d3 \leq -9 \cdot 10^{+59}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d3 \leq 3.9 \cdot 10^{-175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d3 \leq 1.65 \cdot 10^{-142}:\\
\;\;\;\;d1 \cdot \left(-d1\right)\\
\mathbf{elif}\;d3 \leq 1.05 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 6 Accuracy 63.7% Cost 848
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d1\right)\\
t_1 := d1 \cdot \left(d2 - d3\right)\\
\mathbf{if}\;d4 \leq -1.35 \cdot 10^{+18}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq -1.4 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d4 \leq 3.1 \cdot 10^{-222}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 3.2 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d2 + d4\right)\\
\end{array}
\]
Alternative 7 Accuracy 88.1% Cost 712
\[\begin{array}{l}
\mathbf{if}\;d1 \leq -4.5 \cdot 10^{+133}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{elif}\;d1 \leq 2.6 \cdot 10^{+64}:\\
\;\;\;\;d1 \cdot \left(d2 + \left(d4 - d3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(d1 + d3\right) \cdot \left(-d1\right)\\
\end{array}
\]
Alternative 8 Accuracy 85.6% Cost 580
\[\begin{array}{l}
\mathbf{if}\;d4 \leq 6.2 \cdot 10^{+54}:\\
\;\;\;\;d1 \cdot \left(d2 - \left(d1 + d3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d2 + \left(d4 - d3\right)\right)\\
\end{array}
\]
Alternative 9 Accuracy 39.1% Cost 520
\[\begin{array}{l}
\mathbf{if}\;d2 \leq -21000000000:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d2 \leq 3.5 \cdot 10^{-181}:\\
\;\;\;\;d1 \cdot \left(-d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\]
Alternative 10 Accuracy 36.9% Cost 324
\[\begin{array}{l}
\mathbf{if}\;d2 \leq -5.8 \cdot 10^{-53}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\]
Alternative 11 Accuracy 30.4% Cost 192
\[d1 \cdot d4
\]