\[\sin \left(x + \varepsilon\right) - \sin x
\]
↓
\[\begin{array}{l}
t_0 := \sin \left(x + \varepsilon\right)\\
\mathbf{if}\;\varepsilon \leq -0.06:\\
\;\;\;\;t_0 \cdot \left(\frac{1}{\sin \varepsilon} \cdot t_0\right) - \sin x\\
\mathbf{elif}\;\varepsilon \leq 2.3 \cdot 10^{-12}:\\
\;\;\;\;\cos x \cdot \left(-0.16666666666666666 \cdot {\varepsilon}^{3} + \varepsilon\right) + \sin x \cdot \left(0.041666666666666664 \cdot {\varepsilon}^{4} + -0.5 \cdot {\varepsilon}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\frac{1}{\cos \varepsilon \cdot x + \sin \varepsilon} \cdot t_0\right) - \sin x\\
\end{array}
\]
(FPCore (x eps) :precision binary64 (- (sin (+ x eps)) (sin x)))
↓
(FPCore (x eps)
:precision binary64
(let* ((t_0 (sin (+ x eps))))
(if (<= eps -0.06)
(- (* t_0 (* (/ 1.0 (sin eps)) t_0)) (sin x))
(if (<= eps 2.3e-12)
(+
(* (cos x) (+ (* -0.16666666666666666 (pow eps 3.0)) eps))
(*
(sin x)
(+ (* 0.041666666666666664 (pow eps 4.0)) (* -0.5 (pow eps 2.0)))))
(- (* t_0 (* (/ 1.0 (+ (* (cos eps) x) (sin eps))) t_0)) (sin x))))))double code(double x, double eps) {
return sin((x + eps)) - sin(x);
}
↓
double code(double x, double eps) {
double t_0 = sin((x + eps));
double tmp;
if (eps <= -0.06) {
tmp = (t_0 * ((1.0 / sin(eps)) * t_0)) - sin(x);
} else if (eps <= 2.3e-12) {
tmp = (cos(x) * ((-0.16666666666666666 * pow(eps, 3.0)) + eps)) + (sin(x) * ((0.041666666666666664 * pow(eps, 4.0)) + (-0.5 * pow(eps, 2.0))));
} else {
tmp = (t_0 * ((1.0 / ((cos(eps) * x) + sin(eps))) * t_0)) - sin(x);
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = sin((x + eps)) - sin(x)
end function
↓
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = sin((x + eps))
if (eps <= (-0.06d0)) then
tmp = (t_0 * ((1.0d0 / sin(eps)) * t_0)) - sin(x)
else if (eps <= 2.3d-12) then
tmp = (cos(x) * (((-0.16666666666666666d0) * (eps ** 3.0d0)) + eps)) + (sin(x) * ((0.041666666666666664d0 * (eps ** 4.0d0)) + ((-0.5d0) * (eps ** 2.0d0))))
else
tmp = (t_0 * ((1.0d0 / ((cos(eps) * x) + sin(eps))) * t_0)) - sin(x)
end if
code = tmp
end function
public static double code(double x, double eps) {
return Math.sin((x + eps)) - Math.sin(x);
}
↓
public static double code(double x, double eps) {
double t_0 = Math.sin((x + eps));
double tmp;
if (eps <= -0.06) {
tmp = (t_0 * ((1.0 / Math.sin(eps)) * t_0)) - Math.sin(x);
} else if (eps <= 2.3e-12) {
tmp = (Math.cos(x) * ((-0.16666666666666666 * Math.pow(eps, 3.0)) + eps)) + (Math.sin(x) * ((0.041666666666666664 * Math.pow(eps, 4.0)) + (-0.5 * Math.pow(eps, 2.0))));
} else {
tmp = (t_0 * ((1.0 / ((Math.cos(eps) * x) + Math.sin(eps))) * t_0)) - Math.sin(x);
}
return tmp;
}
def code(x, eps):
return math.sin((x + eps)) - math.sin(x)
↓
def code(x, eps):
t_0 = math.sin((x + eps))
tmp = 0
if eps <= -0.06:
tmp = (t_0 * ((1.0 / math.sin(eps)) * t_0)) - math.sin(x)
elif eps <= 2.3e-12:
tmp = (math.cos(x) * ((-0.16666666666666666 * math.pow(eps, 3.0)) + eps)) + (math.sin(x) * ((0.041666666666666664 * math.pow(eps, 4.0)) + (-0.5 * math.pow(eps, 2.0))))
else:
tmp = (t_0 * ((1.0 / ((math.cos(eps) * x) + math.sin(eps))) * t_0)) - math.sin(x)
return tmp
function code(x, eps)
return Float64(sin(Float64(x + eps)) - sin(x))
end
↓
function code(x, eps)
t_0 = sin(Float64(x + eps))
tmp = 0.0
if (eps <= -0.06)
tmp = Float64(Float64(t_0 * Float64(Float64(1.0 / sin(eps)) * t_0)) - sin(x));
elseif (eps <= 2.3e-12)
tmp = Float64(Float64(cos(x) * Float64(Float64(-0.16666666666666666 * (eps ^ 3.0)) + eps)) + Float64(sin(x) * Float64(Float64(0.041666666666666664 * (eps ^ 4.0)) + Float64(-0.5 * (eps ^ 2.0)))));
else
tmp = Float64(Float64(t_0 * Float64(Float64(1.0 / Float64(Float64(cos(eps) * x) + sin(eps))) * t_0)) - sin(x));
end
return tmp
end
function tmp = code(x, eps)
tmp = sin((x + eps)) - sin(x);
end
↓
function tmp_2 = code(x, eps)
t_0 = sin((x + eps));
tmp = 0.0;
if (eps <= -0.06)
tmp = (t_0 * ((1.0 / sin(eps)) * t_0)) - sin(x);
elseif (eps <= 2.3e-12)
tmp = (cos(x) * ((-0.16666666666666666 * (eps ^ 3.0)) + eps)) + (sin(x) * ((0.041666666666666664 * (eps ^ 4.0)) + (-0.5 * (eps ^ 2.0))));
else
tmp = (t_0 * ((1.0 / ((cos(eps) * x) + sin(eps))) * t_0)) - sin(x);
end
tmp_2 = tmp;
end
code[x_, eps_] := N[(N[Sin[N[(x + eps), $MachinePrecision]], $MachinePrecision] - N[Sin[x], $MachinePrecision]), $MachinePrecision]
↓
code[x_, eps_] := Block[{t$95$0 = N[Sin[N[(x + eps), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eps, -0.06], N[(N[(t$95$0 * N[(N[(1.0 / N[Sin[eps], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] - N[Sin[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[eps, 2.3e-12], N[(N[(N[Cos[x], $MachinePrecision] * N[(N[(-0.16666666666666666 * N[Power[eps, 3.0], $MachinePrecision]), $MachinePrecision] + eps), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[x], $MachinePrecision] * N[(N[(0.041666666666666664 * N[Power[eps, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Power[eps, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[(N[(1.0 / N[(N[(N[Cos[eps], $MachinePrecision] * x), $MachinePrecision] + N[Sin[eps], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] - N[Sin[x], $MachinePrecision]), $MachinePrecision]]]]
\sin \left(x + \varepsilon\right) - \sin x
↓
\begin{array}{l}
t_0 := \sin \left(x + \varepsilon\right)\\
\mathbf{if}\;\varepsilon \leq -0.06:\\
\;\;\;\;t_0 \cdot \left(\frac{1}{\sin \varepsilon} \cdot t_0\right) - \sin x\\
\mathbf{elif}\;\varepsilon \leq 2.3 \cdot 10^{-12}:\\
\;\;\;\;\cos x \cdot \left(-0.16666666666666666 \cdot {\varepsilon}^{3} + \varepsilon\right) + \sin x \cdot \left(0.041666666666666664 \cdot {\varepsilon}^{4} + -0.5 \cdot {\varepsilon}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\frac{1}{\cos \varepsilon \cdot x + \sin \varepsilon} \cdot t_0\right) - \sin x\\
\end{array}