Math FPCore C Java Python Julia MATLAB Wolfram TeX \[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + \left(b \cdot b\right) \cdot \left(3 + a\right)\right)\right) - 1
\]
↓
\[\left({\left(\mathsf{hypot}\left(b, a\right)\right)}^{4} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + \left(b \cdot b\right) \cdot \left(a + 3\right)\right)\right) + -1
\]
(FPCore (a b)
:precision binary64
(-
(+
(pow (+ (* a a) (* b b)) 2.0)
(* 4.0 (+ (* (* a a) (- 1.0 a)) (* (* b b) (+ 3.0 a)))))
1.0)) ↓
(FPCore (a b)
:precision binary64
(+
(+
(pow (hypot b a) 4.0)
(* 4.0 (+ (* (* a a) (- 1.0 a)) (* (* b b) (+ a 3.0)))))
-1.0)) double code(double a, double b) {
return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (3.0 + a))))) - 1.0;
}
↓
double code(double a, double b) {
return (pow(hypot(b, a), 4.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (a + 3.0))))) + -1.0;
}
public static double code(double a, double b) {
return (Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (3.0 + a))))) - 1.0;
}
↓
public static double code(double a, double b) {
return (Math.pow(Math.hypot(b, a), 4.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (a + 3.0))))) + -1.0;
}
def code(a, b):
return (math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (3.0 + a))))) - 1.0
↓
def code(a, b):
return (math.pow(math.hypot(b, a), 4.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (a + 3.0))))) + -1.0
function code(a, b)
return Float64(Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(Float64(Float64(a * a) * Float64(1.0 - a)) + Float64(Float64(b * b) * Float64(3.0 + a))))) - 1.0)
end
↓
function code(a, b)
return Float64(Float64((hypot(b, a) ^ 4.0) + Float64(4.0 * Float64(Float64(Float64(a * a) * Float64(1.0 - a)) + Float64(Float64(b * b) * Float64(a + 3.0))))) + -1.0)
end
function tmp = code(a, b)
tmp = ((((a * a) + (b * b)) ^ 2.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (3.0 + a))))) - 1.0;
end
↓
function tmp = code(a, b)
tmp = ((hypot(b, a) ^ 4.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (a + 3.0))))) + -1.0;
end
code[a_, b_] := N[(N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(N[(N[(a * a), $MachinePrecision] * N[(1.0 - a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(3.0 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]
↓
code[a_, b_] := N[(N[(N[Power[N[Sqrt[b ^ 2 + a ^ 2], $MachinePrecision], 4.0], $MachinePrecision] + N[(4.0 * N[(N[(N[(a * a), $MachinePrecision] * N[(1.0 - a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(a + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]
\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + \left(b \cdot b\right) \cdot \left(3 + a\right)\right)\right) - 1
↓
\left({\left(\mathsf{hypot}\left(b, a\right)\right)}^{4} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + \left(b \cdot b\right) \cdot \left(a + 3\right)\right)\right) + -1
Alternatives Alternative 1 Error 0.2 Cost 8192
\[\left(4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + \left(b \cdot b\right) \cdot \left(a + 3\right)\right) + {\left(a \cdot a + b \cdot b\right)}^{2}\right) + -1
\]
Alternative 2 Error 1.4 Cost 7936
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(a \cdot a + \left(b \cdot b\right) \cdot \left(a + 3\right)\right)\right) + -1
\]
Alternative 3 Error 1.9 Cost 7560
\[\begin{array}{l}
t_0 := \left({a}^{4} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right)\right)\right) + -1\\
\mathbf{if}\;a \leq -0.0132:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 4100:\\
\;\;\;\;\left({b}^{4} + \left(b \cdot b\right) \cdot 12\right) + -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 1.5 Cost 7424
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + \left(b \cdot b\right) \cdot 12\right) + -1
\]
Alternative 5 Error 2.0 Cost 7304
\[\begin{array}{l}
t_0 := \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right) + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + b \cdot \left(b \cdot a\right)\right)\right) + -1\\
\mathbf{if}\;a \leq -0.0132:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 4100:\\
\;\;\;\;\left({b}^{4} + \left(b \cdot b\right) \cdot 12\right) + -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 6 Error 2.1 Cost 1864
\[\begin{array}{l}
t_0 := \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right) + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + b \cdot \left(b \cdot a\right)\right)\right) + -1\\
\mathbf{if}\;a \leq -0.0132:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 4100:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(b \cdot b + 12\right) + -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 7 Error 2.9 Cost 1736
\[\begin{array}{l}
t_0 := \left(4 \cdot \left(a \cdot a + \left(b \cdot b\right) \cdot \left(a + 3\right)\right) + \left(a \cdot a\right) \cdot \left(a \cdot a\right)\right) + -1\\
\mathbf{if}\;a \leq -0.5:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 6600:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(b \cdot b + 12\right) + -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 8 Error 12.5 Cost 960
\[\left(b \cdot b\right) \cdot \left(b \cdot b + 4 \cdot \left(a + 3\right)\right) + -1
\]
Alternative 9 Error 12.6 Cost 704
\[\left(b \cdot b\right) \cdot \left(b \cdot b + 12\right) + -1
\]
Alternative 10 Error 13.4 Cost 576
\[\left(b \cdot b\right) \cdot \left(b \cdot b\right) + -1
\]
Alternative 11 Error 23.0 Cost 448
\[4 \cdot \left(a \cdot a\right) + -1
\]
Alternative 12 Error 22.9 Cost 448
\[\left(b \cdot b\right) \cdot 12 + -1
\]