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(1 - 3 \cdot a\right)\right)\right) - 1
\]
↓
\[\mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), b \cdot \left(b \cdot \mathsf{fma}\left(a, -3, 1\right)\right)\right), {\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right) + -1
\]
(FPCore (a b)
:precision binary64
(-
(+
(pow (+ (* a a) (* b b)) 2.0)
(* 4.0 (+ (* (* a a) (+ 1.0 a)) (* (* b b) (- 1.0 (* 3.0 a))))))
1.0)) ↓
(FPCore (a b)
:precision binary64
(+
(fma
4.0
(fma a (fma a a a) (* b (* b (fma a -3.0 1.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) * (1.0 - (3.0 * a)))))) - 1.0;
}
↓
double code(double a, double b) {
return fma(4.0, fma(a, fma(a, a, a), (b * (b * fma(a, -3.0, 1.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(1.0 - Float64(3.0 * a)))))) - 1.0)
end
↓
function code(a, b)
return Float64(fma(4.0, fma(a, fma(a, a, a), Float64(b * Float64(b * fma(a, -3.0, 1.0)))), (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[(1.0 - N[(3.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]
↓
code[a_, b_] := N[(N[(4.0 * N[(a * N[(a * a + a), $MachinePrecision] + N[(b * N[(b * N[(a * -3.0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[N[Sqrt[a ^ 2 + b ^ 2], $MachinePrecision], 4.0], $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(1 - 3 \cdot a\right)\right)\right) - 1
↓
\mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), b \cdot \left(b \cdot \mathsf{fma}\left(a, -3, 1\right)\right)\right), {\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right) + -1
Alternatives Alternative 1 Error 0.1 Cost 15104
\[-1 + \left(\left(b \cdot \left(b \cdot \mathsf{fma}\left(a, a \cdot 2, b \cdot b\right)\right) + {a}^{4}\right) + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right) + \left(b \cdot b\right) \cdot \left(1 + a \cdot -3\right)\right)\right)
\]
Alternative 2 Error 0.1 Cost 14720
\[-1 + \left(\left(b \cdot \left(b \cdot \mathsf{fma}\left(a, a \cdot 2, b \cdot b\right)\right) + {a}^{4}\right) + 4 \cdot \left(b \cdot b + \left(a \cdot a\right) \cdot \left(a + 1\right)\right)\right)
\]
Alternative 3 Error 0.2 Cost 8320
\[-1 + \left(4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right) + \left(b \cdot b\right) \cdot \left(1 + a \cdot -3\right)\right) + {\left(b \cdot b + a \cdot a\right)}^{2}\right)
\]
Alternative 4 Error 0.2 Cost 7936
\[-1 + \left(4 \cdot \left(b \cdot b + \left(a \cdot a\right) \cdot \left(a + 1\right)\right) + {\left(b \cdot b + a \cdot a\right)}^{2}\right)
\]
Alternative 5 Error 1.2 Cost 7880
\[\begin{array}{l}
t_0 := b \cdot b + a \cdot a\\
\mathbf{if}\;b \leq -1.265338730824238 \cdot 10^{-6}:\\
\;\;\;\;-1 + \left({t_0}^{2} + 4 \cdot t_0\right)\\
\mathbf{elif}\;b \leq 4.388974274734128 \cdot 10^{-26}:\\
\;\;\;\;-1 + a \cdot \left(\left(a \cdot a\right) \cdot \left(4 + a\right) + a \cdot \mathsf{fma}\left(2, b \cdot b, 4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + \left(4 \cdot \left(b \cdot b + \left(a \cdot a\right) \cdot \left(a + 1\right)\right) + {b}^{4}\right)\\
\end{array}
\]
Alternative 6 Error 1.9 Cost 7816
\[\begin{array}{l}
t_0 := a \cdot \left(4 + a\right)\\
\mathbf{if}\;a \leq -343057.2405204232:\\
\;\;\;\;-1 + a \cdot \left(a \cdot \left(\mathsf{fma}\left(2, b \cdot b, 4\right) + t_0\right)\right)\\
\mathbf{elif}\;a \leq 1.1575162236971233 \cdot 10^{-14}:\\
\;\;\;\;-1 + \left(4 \cdot \left(b \cdot b + \left(a \cdot a\right) \cdot \left(a + 1\right)\right) + {b}^{4}\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + \left(a \cdot a\right) \cdot \left(t_0 + \mathsf{fma}\left(b, b \cdot 2, 4\right)\right)\\
\end{array}
\]
Alternative 7 Error 2.2 Cost 7560
\[\begin{array}{l}
t_0 := -1 + b \cdot \left(b \cdot \left(4 + a \cdot -12\right) + {b}^{3}\right)\\
\mathbf{if}\;b \leq -60.24881923261011:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 4.388974274734128 \cdot 10^{-26}:\\
\;\;\;\;-1 + a \cdot \left(a \cdot \left(4 + a \cdot \left(4 + a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 8 Error 2.2 Cost 7364
\[\begin{array}{l}
\mathbf{if}\;b \leq -60.24881923261011:\\
\;\;\;\;-1 + b \cdot \left(b \cdot \left(a \cdot -12 + \mathsf{fma}\left(b, b, 4\right)\right)\right)\\
\mathbf{elif}\;b \leq 4.388974274734128 \cdot 10^{-26}:\\
\;\;\;\;-1 + a \cdot \left(a \cdot \left(4 + a \cdot \left(4 + a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + b \cdot \left(b \cdot \mathsf{fma}\left(b, b, 4\right)\right)\\
\end{array}
\]
Alternative 9 Error 2.2 Cost 7240
\[\begin{array}{l}
t_0 := -1 + b \cdot \left(b \cdot \mathsf{fma}\left(b, b, 4\right)\right)\\
\mathbf{if}\;b \leq -60.24881923261011:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 4.388974274734128 \cdot 10^{-26}:\\
\;\;\;\;-1 + a \cdot \left(a \cdot \left(4 + a \cdot \left(4 + a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 10 Error 2.7 Cost 6920
\[\begin{array}{l}
t_0 := -1 + {b}^{4}\\
\mathbf{if}\;b \leq -60.24881923261011:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 4.388974274734128 \cdot 10^{-26}:\\
\;\;\;\;-1 + a \cdot \left(a \cdot \left(4 + a \cdot \left(4 + a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 11 Error 2.7 Cost 1096
\[\begin{array}{l}
t_0 := -1 + b \cdot \left(b \cdot \left(b \cdot b\right)\right)\\
\mathbf{if}\;b \leq -60.24881923261011:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 4.388974274734128 \cdot 10^{-26}:\\
\;\;\;\;-1 + a \cdot \left(a \cdot \left(4 + a \cdot \left(4 + a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 12 Error 4.1 Cost 968
\[\begin{array}{l}
t_0 := -1 + a \cdot \left(a \cdot \left(a \cdot \left(4 + a\right)\right)\right)\\
\mathbf{if}\;a \leq -535237866132439100:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 1.1575162236971233 \cdot 10^{-14}:\\
\;\;\;\;-1 + b \cdot \left(b \cdot \left(b \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 13 Error 23.9 Cost 576
\[-1 + a \cdot \left(b \cdot \left(b \cdot -12\right)\right)
\]
Alternative 14 Error 13.1 Cost 576
\[-1 + b \cdot \left(b \cdot \left(b \cdot b\right)\right)
\]
Alternative 15 Error 24.1 Cost 64
\[-1
\]