\[-1 \leq x \land x \leq 1\]
\[\frac{x - \sin x}{\tan x}
\]
↓
\[\sqrt{0.16666666666666666} \cdot \left(x \cdot \left(x \cdot \sqrt{0.16666666666666666}\right)\right) + \left(-0.00023644179894179894 \cdot {x}^{8} + \left(-0.0007275132275132275 \cdot {x}^{6} + -0.06388888888888888 \cdot {x}^{4}\right)\right)
\]
(FPCore (x) :precision binary64 (/ (- x (sin x)) (tan x)))
↓
(FPCore (x)
:precision binary64
(+
(* (sqrt 0.16666666666666666) (* x (* x (sqrt 0.16666666666666666))))
(+
(* -0.00023644179894179894 (pow x 8.0))
(+
(* -0.0007275132275132275 (pow x 6.0))
(* -0.06388888888888888 (pow x 4.0))))))double code(double x) {
return (x - sin(x)) / tan(x);
}
↓
double code(double x) {
return (sqrt(0.16666666666666666) * (x * (x * sqrt(0.16666666666666666)))) + ((-0.00023644179894179894 * pow(x, 8.0)) + ((-0.0007275132275132275 * pow(x, 6.0)) + (-0.06388888888888888 * pow(x, 4.0))));
}
real(8) function code(x)
real(8), intent (in) :: x
code = (x - sin(x)) / tan(x)
end function
↓
real(8) function code(x)
real(8), intent (in) :: x
code = (sqrt(0.16666666666666666d0) * (x * (x * sqrt(0.16666666666666666d0)))) + (((-0.00023644179894179894d0) * (x ** 8.0d0)) + (((-0.0007275132275132275d0) * (x ** 6.0d0)) + ((-0.06388888888888888d0) * (x ** 4.0d0))))
end function
public static double code(double x) {
return (x - Math.sin(x)) / Math.tan(x);
}
↓
public static double code(double x) {
return (Math.sqrt(0.16666666666666666) * (x * (x * Math.sqrt(0.16666666666666666)))) + ((-0.00023644179894179894 * Math.pow(x, 8.0)) + ((-0.0007275132275132275 * Math.pow(x, 6.0)) + (-0.06388888888888888 * Math.pow(x, 4.0))));
}
def code(x):
return (x - math.sin(x)) / math.tan(x)
↓
def code(x):
return (math.sqrt(0.16666666666666666) * (x * (x * math.sqrt(0.16666666666666666)))) + ((-0.00023644179894179894 * math.pow(x, 8.0)) + ((-0.0007275132275132275 * math.pow(x, 6.0)) + (-0.06388888888888888 * math.pow(x, 4.0))))
function code(x)
return Float64(Float64(x - sin(x)) / tan(x))
end
↓
function code(x)
return Float64(Float64(sqrt(0.16666666666666666) * Float64(x * Float64(x * sqrt(0.16666666666666666)))) + Float64(Float64(-0.00023644179894179894 * (x ^ 8.0)) + Float64(Float64(-0.0007275132275132275 * (x ^ 6.0)) + Float64(-0.06388888888888888 * (x ^ 4.0)))))
end
function tmp = code(x)
tmp = (x - sin(x)) / tan(x);
end
↓
function tmp = code(x)
tmp = (sqrt(0.16666666666666666) * (x * (x * sqrt(0.16666666666666666)))) + ((-0.00023644179894179894 * (x ^ 8.0)) + ((-0.0007275132275132275 * (x ^ 6.0)) + (-0.06388888888888888 * (x ^ 4.0))));
end
code[x_] := N[(N[(x - N[Sin[x], $MachinePrecision]), $MachinePrecision] / N[Tan[x], $MachinePrecision]), $MachinePrecision]
↓
code[x_] := N[(N[(N[Sqrt[0.16666666666666666], $MachinePrecision] * N[(x * N[(x * N[Sqrt[0.16666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.00023644179894179894 * N[Power[x, 8.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.0007275132275132275 * N[Power[x, 6.0], $MachinePrecision]), $MachinePrecision] + N[(-0.06388888888888888 * N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x - \sin x}{\tan x}
↓
\sqrt{0.16666666666666666} \cdot \left(x \cdot \left(x \cdot \sqrt{0.16666666666666666}\right)\right) + \left(-0.00023644179894179894 \cdot {x}^{8} + \left(-0.0007275132275132275 \cdot {x}^{6} + -0.06388888888888888 \cdot {x}^{4}\right)\right)
Alternatives
| Alternative 1 |
|---|
| Error | 0.62% |
|---|
| Cost | 33216 |
|---|
\[\left(-0.00023644179894179894 \cdot {x}^{8} + \left(-0.0007275132275132275 \cdot {x}^{6} + -0.06388888888888888 \cdot {x}^{4}\right)\right) + {\left(x \cdot \sqrt{0.16666666666666666}\right)}^{2}
\]
| Alternative 2 |
|---|
| Error | 0.53% |
|---|
| Cost | 20480 |
|---|
\[\left(-0.00023644179894179894 \cdot {x}^{8} + \left(-0.0007275132275132275 \cdot {x}^{6} + -0.06388888888888888 \cdot {x}^{4}\right)\right) + 0.16666666666666666 \cdot \left(x \cdot x\right)
\]
| Alternative 3 |
|---|
| Error | 0.64% |
|---|
| Cost | 20096 |
|---|
\[\left(-0.0007275132275132275 \cdot {x}^{6} + -0.06388888888888888 \cdot {x}^{4}\right) + 0.16666666666666666 \cdot {x}^{2}
\]
| Alternative 4 |
|---|
| Error | 0.76% |
|---|
| Cost | 13312 |
|---|
\[\mathsf{fma}\left(-0.06388888888888888, {x}^{4}, x \cdot \left(x \cdot 0.16666666666666666\right)\right)
\]
| Alternative 5 |
|---|
| Error | 1.67% |
|---|
| Cost | 7232 |
|---|
\[\frac{1}{2.3 + \mathsf{fma}\left(0.9078571428571428, x \cdot x, \frac{6}{x \cdot x}\right)}
\]
| Alternative 6 |
|---|
| Error | 1.83% |
|---|
| Cost | 576 |
|---|
\[\frac{1}{2.3 + \frac{6}{x \cdot x}}
\]
| Alternative 7 |
|---|
| Error | 1.39% |
|---|
| Cost | 320 |
|---|
\[0.16666666666666666 \cdot \left(x \cdot x\right)
\]
| Alternative 8 |
|---|
| Error | 1.36% |
|---|
| Cost | 320 |
|---|
\[x \cdot \left(x \cdot 0.16666666666666666\right)
\]