\[\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d4 \cdot d1\right) - d1 \cdot d1
\]
↓
\[\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d1 \cdot d4\right) - d1 \cdot d1
\]
(FPCore (d1 d2 d3 d4)
:precision binary64
(- (+ (- (* d1 d2) (* d1 d3)) (* d4 d1)) (* d1 d1)))
↓
(FPCore (d1 d2 d3 d4)
:precision binary64
(- (+ (- (* d1 d2) (* d1 d3)) (* d1 d4)) (* d1 d1)))
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) - (d1 * d3)) + (d1 * d4)) - (d1 * d1);
}
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) - (d1 * d3)) + (d1 * d4)) - (d1 * d1)
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) - (d1 * d3)) + (d1 * d4)) - (d1 * d1);
}
def code(d1, d2, d3, d4):
return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1)
↓
def code(d1, d2, d3, d4):
return (((d1 * d2) - (d1 * d3)) + (d1 * d4)) - (d1 * d1)
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(Float64(Float64(Float64(d1 * d2) - Float64(d1 * d3)) + Float64(d1 * d4)) - Float64(d1 * d1))
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) - (d1 * d3)) + (d1 * d4)) - (d1 * d1);
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[(N[(N[(N[(d1 * d2), $MachinePrecision] - N[(d1 * d3), $MachinePrecision]), $MachinePrecision] + N[(d1 * d4), $MachinePrecision]), $MachinePrecision] - N[(d1 * d1), $MachinePrecision]), $MachinePrecision]
\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d4 \cdot d1\right) - d1 \cdot d1
↓
\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d1 \cdot d4\right) - d1 \cdot d1
Alternatives
| Alternative 1 |
|---|
| Error | 39.6 |
|---|
| Cost | 1048 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(-d3\right)\\
\mathbf{if}\;d4 \leq -4.5 \cdot 10^{-195}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d4 \leq -1.95 \cdot 10^{-222}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 6 \cdot 10^{-301}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d4 \leq 2.8 \cdot 10^{-151}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 7.8 \cdot 10^{-107}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d4 \leq 2.2 \cdot 10^{+31}:\\
\;\;\;\;-d1 \cdot d1\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 21.9 |
|---|
| Cost | 980 |
|---|
\[\begin{array}{l}
t_0 := \left(-d1\right) \cdot \left(d1 + d3\right)\\
\mathbf{if}\;d4 \leq 4.1 \cdot 10^{-107}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{elif}\;d4 \leq 3 \cdot 10^{-64}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.05 \cdot 10^{-49}:\\
\;\;\;\;d1 \cdot \left(d2 + d4\right)\\
\mathbf{elif}\;d4 \leq 2.8 \cdot 10^{-13}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 3.5 \cdot 10^{+21}:\\
\;\;\;\;d1 \cdot \left(d4 - d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 17.9 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(-d3\right)\\
t_1 := d1 \cdot \left(d2 + d4\right)\\
\mathbf{if}\;d3 \leq -7.2 \cdot 10^{+139}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d3 \leq -8.8 \cdot 10^{-307}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d3 \leq 9.6 \cdot 10^{-253}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{elif}\;d3 \leq 5 \cdot 10^{+90}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 14.5 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d3\right)\\
t_1 := d1 \cdot \left(d2 + d4\right)\\
\mathbf{if}\;d3 \leq -5 \cdot 10^{+62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d3 \leq -7.6 \cdot 10^{-307}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d3 \leq 8.8 \cdot 10^{-253}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{elif}\;d3 \leq 1.2 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 0.0 |
|---|
| Cost | 832 |
|---|
\[\left(d1 \cdot d4 - d1 \cdot d1\right) + d1 \cdot \left(d2 - d3\right)
\]
| Alternative 6 |
|---|
| Error | 7.3 |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;d3 \leq -5.5 \cdot 10^{+44} \lor \neg \left(d3 \leq 1.25 \cdot 10^{+72}\right):\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(\left(d2 + d4\right) - d1\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 2.8 |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;d3 \leq -1.55 \cdot 10^{+30} \lor \neg \left(d3 \leq 2.6 \cdot 10^{+51}\right):\\
\;\;\;\;d1 \cdot \left(\left(d2 + d4\right) - d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(\left(d2 + d4\right) - d1\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 17.3 |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;d3 \leq -7.2 \cdot 10^{+140} \lor \neg \left(d3 \leq 9 \cdot 10^{+89}\right):\\
\;\;\;\;d1 \cdot \left(-d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d2 + d4\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 23.2 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;d4 \leq 7.8 \cdot 10^{-107}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{elif}\;d4 \leq 1.45 \cdot 10^{+21}:\\
\;\;\;\;d1 \cdot \left(d4 - d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 0.0 |
|---|
| Cost | 576 |
|---|
\[d1 \cdot \left(\left(d2 - d3\right) + \left(d4 - d1\right)\right)
\]
| Alternative 11 |
|---|
| Error | 39.7 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
\mathbf{if}\;d4 \leq 7.4 \cdot 10^{-107}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d4 \leq 1.25 \cdot 10^{+38}:\\
\;\;\;\;-d1 \cdot d1\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 39.6 |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;d4 \leq 2.25 \cdot 10^{-94}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 43.1 |
|---|
| Cost | 192 |
|---|
\[d1 \cdot d4
\]