\[\left(x + y\right) \cdot \left(z + 1\right)
\]
↓
\[\left(x + y\right) \cdot \left(z + 1\right)
\]
(FPCore (x y z) :precision binary64 (* (+ x y) (+ z 1.0)))
↓
(FPCore (x y z) :precision binary64 (* (+ x y) (+ z 1.0)))
double code(double x, double y, double z) {
return (x + y) * (z + 1.0);
}
↓
double code(double x, double y, double z) {
return (x + y) * (z + 1.0);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + y) * (z + 1.0d0)
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + y) * (z + 1.0d0)
end function
public static double code(double x, double y, double z) {
return (x + y) * (z + 1.0);
}
↓
public static double code(double x, double y, double z) {
return (x + y) * (z + 1.0);
}
def code(x, y, z):
return (x + y) * (z + 1.0)
↓
def code(x, y, z):
return (x + y) * (z + 1.0)
function code(x, y, z)
return Float64(Float64(x + y) * Float64(z + 1.0))
end
↓
function code(x, y, z)
return Float64(Float64(x + y) * Float64(z + 1.0))
end
function tmp = code(x, y, z)
tmp = (x + y) * (z + 1.0);
end
↓
function tmp = code(x, y, z)
tmp = (x + y) * (z + 1.0);
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) \cdot \left(z + 1\right)
↓
\left(x + y\right) \cdot \left(z + 1\right)
Alternatives
| Alternative 1 |
|---|
| Error | 61.99% |
|---|
| Cost | 852 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.26 \cdot 10^{-17}:\\
\;\;\;\;x \cdot z\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-131}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-273}:\\
\;\;\;\;y\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-303}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 19.39% |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -0.048:\\
\;\;\;\;y \cdot \left(z + 1\right)\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-16}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+100}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 19.81% |
|---|
| Cost | 588 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 14.5:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+100}:\\
\;\;\;\;x \cdot z\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 19.54% |
|---|
| Cost | 588 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -0.026:\\
\;\;\;\;y \cdot \left(z + 1\right)\\
\mathbf{elif}\;z \leq 13.5:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+101}:\\
\;\;\;\;x \cdot z\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 2.56% |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;z \cdot \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 60.22% |
|---|
| Cost | 460 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.5 \cdot 10^{-110}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-55}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-21}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 61.41% |
|---|
| Cost | 460 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.4 \cdot 10^{+70}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-18}:\\
\;\;\;\;x \cdot z\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-131}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 66.76% |
|---|
| Cost | 64 |
|---|
\[x
\]