\[\left(0 \leq a \land a \leq 1000000000\right) \land \left(0 \leq x \land x \leq 1000000000\right)\]
Math FPCore C Julia Wolfram TeX \[\left(\left(4 \cdot e^{\left(-a\right) \cdot x} - 3\right) - e^{\left(-2\right) \cdot \left(a \cdot x\right)}\right) + 2 \cdot \left(a \cdot x\right)
\]
↓
\[\mathsf{fma}\left({x}^{4} \cdot -0.5, {a}^{4}, \mathsf{fma}\left(x \cdot -2 + x \cdot 2, a, \mathsf{fma}\left({a}^{3}, {x}^{3} \cdot 0.6666666666666666, \log \left(e^{0.23333333333333334 \cdot {\left(x \cdot a\right)}^{5}}\right)\right)\right)\right)
\]
(FPCore (a x)
:precision binary64
(+
(- (- (* 4.0 (exp (* (- a) x))) 3.0) (exp (* (- 2.0) (* a x))))
(* 2.0 (* a x)))) ↓
(FPCore (a x)
:precision binary64
(fma
(* (pow x 4.0) -0.5)
(pow a 4.0)
(fma
(+ (* x -2.0) (* x 2.0))
a
(fma
(pow a 3.0)
(* (pow x 3.0) 0.6666666666666666)
(log (exp (* 0.23333333333333334 (pow (* x a) 5.0)))))))) double code(double a, double x) {
return (((4.0 * exp((-a * x))) - 3.0) - exp((-2.0 * (a * x)))) + (2.0 * (a * x));
}
↓
double code(double a, double x) {
return fma((pow(x, 4.0) * -0.5), pow(a, 4.0), fma(((x * -2.0) + (x * 2.0)), a, fma(pow(a, 3.0), (pow(x, 3.0) * 0.6666666666666666), log(exp((0.23333333333333334 * pow((x * a), 5.0)))))));
}
function code(a, x)
return Float64(Float64(Float64(Float64(4.0 * exp(Float64(Float64(-a) * x))) - 3.0) - exp(Float64(Float64(-2.0) * Float64(a * x)))) + Float64(2.0 * Float64(a * x)))
end
↓
function code(a, x)
return fma(Float64((x ^ 4.0) * -0.5), (a ^ 4.0), fma(Float64(Float64(x * -2.0) + Float64(x * 2.0)), a, fma((a ^ 3.0), Float64((x ^ 3.0) * 0.6666666666666666), log(exp(Float64(0.23333333333333334 * (Float64(x * a) ^ 5.0)))))))
end
code[a_, x_] := N[(N[(N[(N[(4.0 * N[Exp[N[((-a) * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision] - N[Exp[N[((-2.0) * N[(a * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[a_, x_] := N[(N[(N[Power[x, 4.0], $MachinePrecision] * -0.5), $MachinePrecision] * N[Power[a, 4.0], $MachinePrecision] + N[(N[(N[(x * -2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] * a + N[(N[Power[a, 3.0], $MachinePrecision] * N[(N[Power[x, 3.0], $MachinePrecision] * 0.6666666666666666), $MachinePrecision] + N[Log[N[Exp[N[(0.23333333333333334 * N[Power[N[(x * a), $MachinePrecision], 5.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(4 \cdot e^{\left(-a\right) \cdot x} - 3\right) - e^{\left(-2\right) \cdot \left(a \cdot x\right)}\right) + 2 \cdot \left(a \cdot x\right)
↓
\mathsf{fma}\left({x}^{4} \cdot -0.5, {a}^{4}, \mathsf{fma}\left(x \cdot -2 + x \cdot 2, a, \mathsf{fma}\left({a}^{3}, {x}^{3} \cdot 0.6666666666666666, \log \left(e^{0.23333333333333334 \cdot {\left(x \cdot a\right)}^{5}}\right)\right)\right)\right)
Alternatives Alternative 1 Error 0.1 Cost 59328
\[\mathsf{fma}\left({x}^{4} \cdot -0.5, {a}^{4}, \mathsf{fma}\left(x \cdot -2 + x \cdot 2, a, \mathsf{fma}\left({a}^{3}, {x}^{3} \cdot 0.6666666666666666, {x}^{5} \cdot \left(0.23333333333333334 \cdot {a}^{5}\right)\right)\right)\right)
\]
Alternative 2 Error 0.1 Cost 52864
\[\mathsf{fma}\left({x}^{4} \cdot -0.5, {a}^{4}, \mathsf{fma}\left(x \cdot -2 + x \cdot 2, a, \mathsf{fma}\left({x}^{3}, {a}^{3} \cdot 0.6666666666666666, 0.23333333333333334 \cdot {\left(x \cdot a\right)}^{5}\right)\right)\right)
\]
Alternative 3 Error 0.1 Cost 46080
\[0.6666666666666666 \cdot {\left(x \cdot a\right)}^{3} + \mathsf{fma}\left(-0.5 \cdot {a}^{4}, {x}^{4}, \mathsf{fma}\left(0.23333333333333334 \cdot {a}^{5}, {x}^{5}, 0\right)\right)
\]
Alternative 4 Error 0.2 Cost 27456
\[\mathsf{fma}\left(x \cdot x, 2 \cdot \left(a \cdot a\right) + -2 \cdot \left(a \cdot a\right), \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(-4, {a}^{3} \cdot 0.16666666666666666, {a}^{3} \cdot 1.3333333333333333\right)\right)\right)
\]
Alternative 5 Error 0.2 Cost 7040
\[x \cdot \left(\left(x \cdot x\right) \cdot \left({a}^{3} \cdot 0.6666666666666666\right)\right)
\]
Alternative 6 Error 0.2 Cost 6784
\[0.6666666666666666 \cdot {\left(x \cdot a\right)}^{3}
\]
Alternative 7 Error 4.2 Cost 64
\[0
\]