\[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\]
↓
\[3 \cdot \left(\sqrt{x} \cdot \left(\frac{1}{x \cdot 9} + \left(y + -1\right)\right)\right)
\]
(FPCore (x y)
:precision binary64
(* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))
↓
(FPCore (x y)
:precision binary64
(* 3.0 (* (sqrt x) (+ (/ 1.0 (* x 9.0)) (+ y -1.0)))))
double code(double x, double y) {
return (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
↓
double code(double x, double y) {
return 3.0 * (sqrt(x) * ((1.0 / (x * 9.0)) + (y + -1.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (3.0d0 * sqrt(x)) * ((y + (1.0d0 / (x * 9.0d0))) - 1.0d0)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 3.0d0 * (sqrt(x) * ((1.0d0 / (x * 9.0d0)) + (y + (-1.0d0))))
end function
public static double code(double x, double y) {
return (3.0 * Math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
↓
public static double code(double x, double y) {
return 3.0 * (Math.sqrt(x) * ((1.0 / (x * 9.0)) + (y + -1.0)));
}
def code(x, y):
return (3.0 * math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0)
↓
def code(x, y):
return 3.0 * (math.sqrt(x) * ((1.0 / (x * 9.0)) + (y + -1.0)))
function code(x, y)
return Float64(Float64(3.0 * sqrt(x)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) - 1.0))
end
↓
function code(x, y)
return Float64(3.0 * Float64(sqrt(x) * Float64(Float64(1.0 / Float64(x * 9.0)) + Float64(y + -1.0))))
end
function tmp = code(x, y)
tmp = (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
end
↓
function tmp = code(x, y)
tmp = 3.0 * (sqrt(x) * ((1.0 / (x * 9.0)) + (y + -1.0)));
end
code[x_, y_] := N[(N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
↓
3 \cdot \left(\sqrt{x} \cdot \left(\frac{1}{x \cdot 9} + \left(y + -1\right)\right)\right)
Alternatives
| Alternative 1 |
|---|
| Error | 23.8 |
|---|
| Cost | 7776 |
|---|
\[\begin{array}{l}
t_0 := -3 \cdot \sqrt{x}\\
t_1 := \sqrt{x} \cdot \frac{0.3333333333333333}{x}\\
t_2 := 3 \cdot \left(\sqrt{x} \cdot y\right)\\
\mathbf{if}\;x \leq 2.75 \cdot 10^{-136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-112}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.12 \cdot 10^{+107}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+232}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{+245}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 10.7 |
|---|
| Cost | 7636 |
|---|
\[\begin{array}{l}
t_0 := 3 \cdot \left(\left(\frac{0.1111111111111111}{x} - 1\right) \cdot \sqrt{x}\right)\\
\mathbf{if}\;x \leq 2.75 \cdot 10^{-136}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-112}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-64}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-52}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\
\mathbf{elif}\;x \leq 180:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(-3 + 3 \cdot y\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 10.8 |
|---|
| Cost | 7636 |
|---|
\[\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)\\
\mathbf{if}\;x \leq 2.75 \cdot 10^{-136}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-112}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-64}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-50}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\
\mathbf{elif}\;x \leq 155:\\
\;\;\;\;3 \cdot \left(\left(\frac{0.1111111111111111}{x} - 1\right) \cdot \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(-3 + 3 \cdot y\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 10.8 |
|---|
| Cost | 7508 |
|---|
\[\begin{array}{l}
t_0 := \sqrt{x} \cdot \frac{0.3333333333333333}{x}\\
\mathbf{if}\;x \leq 2.75 \cdot 10^{-136}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-112}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-64}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-50}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(-3 + 3 \cdot y\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 0.4 |
|---|
| Cost | 7104 |
|---|
\[3 \cdot \left(\sqrt{x} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)\right)
\]
| Alternative 6 |
|---|
| Error | 26.8 |
|---|
| Cost | 6984 |
|---|
\[\begin{array}{l}
t_0 := 3 \cdot \left(\sqrt{x} \cdot y\right)\\
\mathbf{if}\;y \leq -0.0027:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-9}:\\
\;\;\;\;-3 \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 26.8 |
|---|
| Cost | 6984 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -0.0027:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-9}:\\
\;\;\;\;-3 \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 46.8 |
|---|
| Cost | 6592 |
|---|
\[-3 \cdot \sqrt{x}
\]