\[\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d4 \cdot d1\right) - d1 \cdot d1
\]
↓
\[d1 \cdot \left(d2 + \left(d4 - \left(d1 + d3\right)\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(d4 - Float64(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[(d4 - N[(d1 + d3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d4 \cdot d1\right) - d1 \cdot d1
↓
d1 \cdot \left(d2 + \left(d4 - \left(d1 + d3\right)\right)\right)
Alternatives
| Alternative 1 |
|---|
| Error | 38.2 |
|---|
| Cost | 1312 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(-d3\right)\\
\mathbf{if}\;d4 \leq -1.0240183063868827 \cdot 10^{-168}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d4 \leq -1.3335588599319317 \cdot 10^{-290}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.5016396958542261 \cdot 10^{-182}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d4 \leq 1.8526296186257632 \cdot 10^{-143}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 9.444204634317629 \cdot 10^{-91}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d4 \leq 5.879112490701724 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 3.330876381759067 \cdot 10^{+42}:\\
\;\;\;\;d1 \cdot d4\\
\mathbf{elif}\;d4 \leq 4.061150536304023 \cdot 10^{+89}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 22.0 |
|---|
| Cost | 1240 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d3\right)\\
\mathbf{if}\;d4 \leq -1.3335588599319317 \cdot 10^{-290}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.5016396958542261 \cdot 10^{-182}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{elif}\;d4 \leq 5.879112490701724 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 3.330876381759067 \cdot 10^{+42}:\\
\;\;\;\;d1 \cdot \left(d2 + d4\right)\\
\mathbf{elif}\;d4 \leq 5.975992571673666 \cdot 10^{+76}:\\
\;\;\;\;\left(d1 + d3\right) \cdot \left(-d1\right)\\
\mathbf{elif}\;d4 \leq 1.5720687059774793 \cdot 10^{+117}:\\
\;\;\;\;d1 \cdot d2 + d1 \cdot d4\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 21.8 |
|---|
| Cost | 1112 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d3\right)\\
\mathbf{if}\;d4 \leq -1.3335588599319317 \cdot 10^{-290}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.5016396958542261 \cdot 10^{-182}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{elif}\;d4 \leq 4.3015370338658823 \cdot 10^{+33}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 4.681502574014293 \cdot 10^{+45}:\\
\;\;\;\;d1 \cdot \left(d4 - d1\right)\\
\mathbf{elif}\;d4 \leq 8.738221724990441 \cdot 10^{+86}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.5720687059774793 \cdot 10^{+117}:\\
\;\;\;\;d1 \cdot \left(d2 + d4\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 22.0 |
|---|
| Cost | 1112 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d3\right)\\
t_1 := d1 \cdot \left(d2 + d4\right)\\
\mathbf{if}\;d4 \leq -1.3335588599319317 \cdot 10^{-290}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.5016396958542261 \cdot 10^{-182}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{elif}\;d4 \leq 5.879112490701724 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 3.330876381759067 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d4 \leq 5.975992571673666 \cdot 10^{+76}:\\
\;\;\;\;\left(d1 + d3\right) \cdot \left(-d1\right)\\
\mathbf{elif}\;d4 \leq 1.5720687059774793 \cdot 10^{+117}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 23.1 |
|---|
| Cost | 980 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d1\right)\\
t_1 := d1 \cdot \left(d4 - d3\right)\\
\mathbf{if}\;d2 \leq -1.499302884301287 \cdot 10^{+124}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d2 \leq -7.515565707230057 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d2 \leq -3.21908658503192 \cdot 10^{-9}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d2 \leq -7.858136923995412 \cdot 10^{-257}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d2 \leq 6.420767691291201 \cdot 10^{-249}:\\
\;\;\;\;d1 \cdot \left(d4 - d1\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 22.2 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(d4 - d3\right)\\
\mathbf{if}\;d2 \leq -1.499302884301287 \cdot 10^{+124}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d2 \leq -7.515565707230057 \cdot 10^{+59}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d2 \leq -2521890924.964147:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 29.5 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d1\right)\\
\mathbf{if}\;d4 \leq 1.5016396958542261 \cdot 10^{-182}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.8526296186257632 \cdot 10^{-143}:\\
\;\;\;\;d1 \cdot \left(-d3\right)\\
\mathbf{elif}\;d4 \leq 3.4990594534881605 \cdot 10^{-40}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 21.4 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d3\right)\\
\mathbf{if}\;d4 \leq -1.3335588599319317 \cdot 10^{-290}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;d4 \leq 1.5016396958542261 \cdot 10^{-182}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{elif}\;d4 \leq 4.3015370338658823 \cdot 10^{+33}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 7.7 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;d3 \leq -4.18581583900377 \cdot 10^{+120}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{elif}\;d3 \leq 1.7391305552174773 \cdot 10^{+110}:\\
\;\;\;\;d1 \cdot \left(\left(d2 + d4\right) - d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 38.5 |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;d2 \leq -3.784289850813809 \cdot 10^{-46}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 60.8 |
|---|
| Cost | 192 |
|---|
\[d1 \cdot d1
\]
| Alternative 12 |
|---|
| Error | 43.6 |
|---|
| Cost | 192 |
|---|
\[d1 \cdot d2
\]