\[\sin \left(x + \varepsilon\right) - \sin x
\]
↓
\[\begin{array}{l}
t_0 := \sin \varepsilon - \sin x\\
\mathbf{if}\;\varepsilon \leq -8.6 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\varepsilon \leq 4.2 \cdot 10^{-6}:\\
\;\;\;\;\cos x \cdot \varepsilon\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
(FPCore (x eps) :precision binary64 (- (sin (+ x eps)) (sin x)))
↓
(FPCore (x eps)
:precision binary64
(let* ((t_0 (- (sin eps) (sin x))))
(if (<= eps -8.6e-6) t_0 (if (<= eps 4.2e-6) (* (cos x) eps) t_0))))
double code(double x, double eps) {
return sin((x + eps)) - sin(x);
}
↓
double code(double x, double eps) {
double t_0 = sin(eps) - sin(x);
double tmp;
if (eps <= -8.6e-6) {
tmp = t_0;
} else if (eps <= 4.2e-6) {
tmp = cos(x) * eps;
} else {
tmp = t_0;
}
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(eps) - sin(x)
if (eps <= (-8.6d-6)) then
tmp = t_0
else if (eps <= 4.2d-6) then
tmp = cos(x) * eps
else
tmp = t_0
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(eps) - Math.sin(x);
double tmp;
if (eps <= -8.6e-6) {
tmp = t_0;
} else if (eps <= 4.2e-6) {
tmp = Math.cos(x) * eps;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps):
return math.sin((x + eps)) - math.sin(x)
↓
def code(x, eps):
t_0 = math.sin(eps) - math.sin(x)
tmp = 0
if eps <= -8.6e-6:
tmp = t_0
elif eps <= 4.2e-6:
tmp = math.cos(x) * eps
else:
tmp = t_0
return tmp
function code(x, eps)
return Float64(sin(Float64(x + eps)) - sin(x))
end
↓
function code(x, eps)
t_0 = Float64(sin(eps) - sin(x))
tmp = 0.0
if (eps <= -8.6e-6)
tmp = t_0;
elseif (eps <= 4.2e-6)
tmp = Float64(cos(x) * eps);
else
tmp = t_0;
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(eps) - sin(x);
tmp = 0.0;
if (eps <= -8.6e-6)
tmp = t_0;
elseif (eps <= 4.2e-6)
tmp = cos(x) * eps;
else
tmp = t_0;
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[(N[Sin[eps], $MachinePrecision] - N[Sin[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eps, -8.6e-6], t$95$0, If[LessEqual[eps, 4.2e-6], N[(N[Cos[x], $MachinePrecision] * eps), $MachinePrecision], t$95$0]]]
\sin \left(x + \varepsilon\right) - \sin x
↓
\begin{array}{l}
t_0 := \sin \varepsilon - \sin x\\
\mathbf{if}\;\varepsilon \leq -8.6 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\varepsilon \leq 4.2 \cdot 10^{-6}:\\
\;\;\;\;\cos x \cdot \varepsilon\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}