Math FPCore C Julia 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
\]
↓
\[\mathsf{fma}\left(4, \mathsf{fma}\left(b \cdot b, a + 3, a \cdot a\right) - {a}^{3}, {\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + -1\right)
\]
(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
(fma
4.0
(- (fma (* b b) (+ a 3.0) (* a a)) (pow a 3.0))
(+ (pow (hypot a b) 4.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 fma(4.0, (fma((b * b), (a + 3.0), (a * a)) - pow(a, 3.0)), (pow(hypot(a, b), 4.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 fma(4.0, Float64(fma(Float64(b * b), Float64(a + 3.0), Float64(a * a)) - (a ^ 3.0)), Float64((hypot(a, b) ^ 4.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[(4.0 * N[(N[(N[(b * b), $MachinePrecision] * N[(a + 3.0), $MachinePrecision] + N[(a * a), $MachinePrecision]), $MachinePrecision] - N[Power[a, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[Sqrt[a ^ 2 + b ^ 2], $MachinePrecision], 4.0], $MachinePrecision] + -1.0), $MachinePrecision]), $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
↓
\mathsf{fma}\left(4, \mathsf{fma}\left(b \cdot b, a + 3, a \cdot a\right) - {a}^{3}, {\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + -1\right)
Alternatives Alternative 1 Error 99.8% Cost 27456.00
\[-1 + \left(\mathsf{hypot}\left(b, a\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}\right) + 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)
\]
Alternative 2 Error 99.7% Cost 8192.00
\[-1 + \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(b \cdot b + a \cdot a\right)}^{2}\right)
\]
Alternative 3 Error 97.6% Cost 7561.00
\[\begin{array}{l}
\mathbf{if}\;a \leq -1.26 \cdot 10^{-5} \lor \neg \left(a \leq 1.85 \cdot 10^{-9}\right):\\
\;\;\;\;-1 + \left({a}^{4} + 4 \cdot \left(a \cdot \left(a \cdot \left(1 - a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + \left({b}^{4} + \left(b \cdot b\right) \cdot 12\right)\\
\end{array}
\]
Alternative 4 Error 96.2% Cost 7305.00
\[\begin{array}{l}
\mathbf{if}\;a \leq -1000000000 \lor \neg \left(a \leq 60\right):\\
\;\;\;\;-1 + {a}^{3} \cdot \left(a + -4\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + \left({b}^{4} + \left(b \cdot b\right) \cdot 12\right)\\
\end{array}
\]
Alternative 5 Error 96.1% Cost 7177.00
\[\begin{array}{l}
\mathbf{if}\;a \leq -1000000000 \lor \neg \left(a \leq 5.5\right):\\
\;\;\;\;-1 + {a}^{3} \cdot \left(a + -4\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + b \cdot \left(b \cdot \left(b \cdot b + 4 \cdot a\right) + b \cdot 12\right)\\
\end{array}
\]
Alternative 6 Error 95.6% Cost 6920.00
\[\begin{array}{l}
\mathbf{if}\;a \leq -1000000000:\\
\;\;\;\;{a}^{4}\\
\mathbf{elif}\;a \leq 55:\\
\;\;\;\;-1 + b \cdot \left(b \cdot \left(b \cdot b + 4 \cdot a\right) + b \cdot 12\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + {a}^{4}\\
\end{array}
\]
Alternative 7 Error 95.7% Cost 6793.00
\[\begin{array}{l}
\mathbf{if}\;a \leq -1000000000 \lor \neg \left(a \leq 14.5\right):\\
\;\;\;\;{a}^{4}\\
\mathbf{else}:\\
\;\;\;\;-1 + b \cdot \left(b \cdot \left(b \cdot b + 4 \cdot a\right) + b \cdot 12\right)\\
\end{array}
\]
Alternative 8 Error 95.5% Cost 1353.00
\[\begin{array}{l}
\mathbf{if}\;a \leq -1000000000 \lor \neg \left(a \leq 20\right):\\
\;\;\;\;-1 + \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right) + 4 \cdot \left(a \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + b \cdot \left(b \cdot \left(b \cdot b + 4 \cdot a\right) + b \cdot 12\right)\\
\end{array}
\]
Alternative 9 Error 95.5% Cost 1225.00
\[\begin{array}{l}
\mathbf{if}\;a \leq -1000000000 \lor \neg \left(a \leq 80\right):\\
\;\;\;\;-1 + \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right) + 4 \cdot \left(a \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + b \cdot \left(b \cdot \left(b \cdot b + 12\right)\right)\\
\end{array}
\]
Alternative 10 Error 81.1% Cost 704.00
\[-1 + b \cdot \left(b \cdot \left(b \cdot b + 12\right)\right)
\]
Alternative 11 Error 63.9% Cost 448.00
\[-1 + 4 \cdot \left(a \cdot a\right)
\]
Alternative 12 Error 62.5% Cost 64.00
\[-1
\]