
(FPCore (x eps) :precision binary64 (- (sin (+ x eps)) (sin x)))
double code(double x, double eps) {
return sin((x + eps)) - sin(x);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = sin((x + eps)) - sin(x)
end function
public static double code(double x, double eps) {
return Math.sin((x + eps)) - Math.sin(x);
}
def code(x, eps): return math.sin((x + eps)) - math.sin(x)
function code(x, eps) return Float64(sin(Float64(x + eps)) - sin(x)) end
function tmp = code(x, eps) tmp = sin((x + eps)) - sin(x); end
code[x_, eps_] := N[(N[Sin[N[(x + eps), $MachinePrecision]], $MachinePrecision] - N[Sin[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(x + \varepsilon\right) - \sin x
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x eps) :precision binary64 (- (sin (+ x eps)) (sin x)))
double code(double x, double eps) {
return sin((x + eps)) - sin(x);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = sin((x + eps)) - sin(x)
end function
public static double code(double x, double eps) {
return Math.sin((x + eps)) - Math.sin(x);
}
def code(x, eps): return math.sin((x + eps)) - math.sin(x)
function code(x, eps) return Float64(sin(Float64(x + eps)) - sin(x)) end
function tmp = code(x, eps) tmp = sin((x + eps)) - sin(x); end
code[x_, eps_] := N[(N[Sin[N[(x + eps), $MachinePrecision]], $MachinePrecision] - N[Sin[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(x + \varepsilon\right) - \sin x
\end{array}
(FPCore (x eps)
:precision binary64
(let* ((t_0 (- 1.0 (cos eps))))
(+
(fma (cos x) (sin eps) (* (sin x) (+ (cos eps) -1.0)))
(fma (- (sin x)) t_0 (* t_0 (sin x))))))
double code(double x, double eps) {
double t_0 = 1.0 - cos(eps);
return fma(cos(x), sin(eps), (sin(x) * (cos(eps) + -1.0))) + fma(-sin(x), t_0, (t_0 * sin(x)));
}
function code(x, eps) t_0 = Float64(1.0 - cos(eps)) return Float64(fma(cos(x), sin(eps), Float64(sin(x) * Float64(cos(eps) + -1.0))) + fma(Float64(-sin(x)), t_0, Float64(t_0 * sin(x)))) end
code[x_, eps_] := Block[{t$95$0 = N[(1.0 - N[Cos[eps], $MachinePrecision]), $MachinePrecision]}, N[(N[(N[Cos[x], $MachinePrecision] * N[Sin[eps], $MachinePrecision] + N[(N[Sin[x], $MachinePrecision] * N[(N[Cos[eps], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-N[Sin[x], $MachinePrecision]) * t$95$0 + N[(t$95$0 * N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \cos \varepsilon\\
\mathsf{fma}\left(\cos x, \sin \varepsilon, \sin x \cdot \left(\cos \varepsilon + -1\right)\right) + \mathsf{fma}\left(-\sin x, t_0, t_0 \cdot \sin x\right)
\end{array}
\end{array}
Initial program 42.4%
sin-sum65.9%
associate--l+65.9%
Applied egg-rr65.9%
+-commutative65.9%
associate-+l-99.4%
*-commutative99.4%
*-rgt-identity99.4%
distribute-lft-out--99.3%
Simplified99.3%
prod-diff99.4%
*-commutative99.4%
fma-neg99.4%
*-commutative99.4%
Applied egg-rr99.4%
*-commutative99.4%
fma-neg99.4%
distribute-rgt-neg-in99.4%
fma-udef99.4%
distribute-lft-neg-in99.4%
distribute-rgt-neg-in99.4%
*-commutative99.4%
fma-udef99.4%
Simplified99.4%
Final simplification99.4%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (- (sin (+ x eps)) (sin x))))
(if (or (<= t_0 -0.05) (not (<= t_0 1e-286)))
t_0
(* (cos x) (* 2.0 (sin (* eps 0.5)))))))
double code(double x, double eps) {
double t_0 = sin((x + eps)) - sin(x);
double tmp;
if ((t_0 <= -0.05) || !(t_0 <= 1e-286)) {
tmp = t_0;
} else {
tmp = cos(x) * (2.0 * sin((eps * 0.5)));
}
return tmp;
}
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)) - sin(x)
if ((t_0 <= (-0.05d0)) .or. (.not. (t_0 <= 1d-286))) then
tmp = t_0
else
tmp = cos(x) * (2.0d0 * sin((eps * 0.5d0)))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = Math.sin((x + eps)) - Math.sin(x);
double tmp;
if ((t_0 <= -0.05) || !(t_0 <= 1e-286)) {
tmp = t_0;
} else {
tmp = Math.cos(x) * (2.0 * Math.sin((eps * 0.5)));
}
return tmp;
}
def code(x, eps): t_0 = math.sin((x + eps)) - math.sin(x) tmp = 0 if (t_0 <= -0.05) or not (t_0 <= 1e-286): tmp = t_0 else: tmp = math.cos(x) * (2.0 * math.sin((eps * 0.5))) return tmp
function code(x, eps) t_0 = Float64(sin(Float64(x + eps)) - sin(x)) tmp = 0.0 if ((t_0 <= -0.05) || !(t_0 <= 1e-286)) tmp = t_0; else tmp = Float64(cos(x) * Float64(2.0 * sin(Float64(eps * 0.5)))); end return tmp end
function tmp_2 = code(x, eps) t_0 = sin((x + eps)) - sin(x); tmp = 0.0; if ((t_0 <= -0.05) || ~((t_0 <= 1e-286))) tmp = t_0; else tmp = cos(x) * (2.0 * sin((eps * 0.5))); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[Sin[N[(x + eps), $MachinePrecision]], $MachinePrecision] - N[Sin[x], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -0.05], N[Not[LessEqual[t$95$0, 1e-286]], $MachinePrecision]], t$95$0, N[(N[Cos[x], $MachinePrecision] * N[(2.0 * N[Sin[N[(eps * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(x + \varepsilon\right) - \sin x\\
\mathbf{if}\;t_0 \leq -0.05 \lor \neg \left(t_0 \leq 10^{-286}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\cos x \cdot \left(2 \cdot \sin \left(\varepsilon \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if (-.f64 (sin.f64 (+.f64 x eps)) (sin.f64 x)) < -0.050000000000000003 or 1.00000000000000005e-286 < (-.f64 (sin.f64 (+.f64 x eps)) (sin.f64 x)) Initial program 73.3%
if -0.050000000000000003 < (-.f64 (sin.f64 (+.f64 x eps)) (sin.f64 x)) < 1.00000000000000005e-286Initial program 14.3%
diff-sin14.2%
div-inv14.2%
associate--l+14.2%
metadata-eval14.2%
div-inv14.2%
+-commutative14.2%
associate-+l+14.2%
metadata-eval14.2%
Applied egg-rr14.2%
associate-*r*14.2%
*-commutative14.2%
*-commutative14.2%
+-commutative14.2%
count-214.2%
fma-def14.2%
sub-neg14.2%
mul-1-neg14.2%
+-commutative14.2%
associate-+r+80.5%
mul-1-neg80.5%
sub-neg80.5%
+-inverses80.5%
remove-double-neg80.5%
mul-1-neg80.5%
sub-neg80.5%
neg-sub080.5%
mul-1-neg80.5%
remove-double-neg80.5%
Simplified80.5%
Taylor expanded in eps around 0 80.8%
Final simplification77.2%
(FPCore (x eps) :precision binary64 (fma (cos x) (sin eps) (* (sin x) (+ (cos eps) -1.0))))
double code(double x, double eps) {
return fma(cos(x), sin(eps), (sin(x) * (cos(eps) + -1.0)));
}
function code(x, eps) return fma(cos(x), sin(eps), Float64(sin(x) * Float64(cos(eps) + -1.0))) end
code[x_, eps_] := N[(N[Cos[x], $MachinePrecision] * N[Sin[eps], $MachinePrecision] + N[(N[Sin[x], $MachinePrecision] * N[(N[Cos[eps], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\cos x, \sin \varepsilon, \sin x \cdot \left(\cos \varepsilon + -1\right)\right)
\end{array}
Initial program 42.4%
sin-sum65.9%
associate--l+65.9%
Applied egg-rr65.9%
+-commutative65.9%
associate-+l-99.4%
*-commutative99.4%
*-rgt-identity99.4%
distribute-lft-out--99.3%
Simplified99.3%
Taylor expanded in eps around inf 99.3%
fma-neg99.4%
distribute-rgt-neg-in99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
remove-double-neg99.4%
metadata-eval99.4%
Simplified99.4%
Final simplification99.4%
(FPCore (x eps) :precision binary64 (fma (+ (cos eps) -1.0) (sin x) (* (cos x) (sin eps))))
double code(double x, double eps) {
return fma((cos(eps) + -1.0), sin(x), (cos(x) * sin(eps)));
}
function code(x, eps) return fma(Float64(cos(eps) + -1.0), sin(x), Float64(cos(x) * sin(eps))) end
code[x_, eps_] := N[(N[(N[Cos[eps], $MachinePrecision] + -1.0), $MachinePrecision] * N[Sin[x], $MachinePrecision] + N[(N[Cos[x], $MachinePrecision] * N[Sin[eps], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\cos \varepsilon + -1, \sin x, \cos x \cdot \sin \varepsilon\right)
\end{array}
Initial program 42.4%
sin-sum65.9%
associate--l+65.9%
Applied egg-rr65.9%
+-commutative65.9%
associate-+l-99.4%
*-commutative99.4%
*-rgt-identity99.4%
distribute-lft-out--99.3%
Simplified99.3%
Taylor expanded in eps around inf 99.3%
fma-neg99.4%
distribute-rgt-neg-in99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
remove-double-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 99.3%
+-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
*-commutative99.3%
fma-def99.4%
*-commutative99.4%
Simplified99.4%
Final simplification99.4%
(FPCore (x eps) :precision binary64 (- (* (cos x) (sin eps)) (* (- 1.0 (cos eps)) (sin x))))
double code(double x, double eps) {
return (cos(x) * sin(eps)) - ((1.0 - cos(eps)) * sin(x));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = (cos(x) * sin(eps)) - ((1.0d0 - cos(eps)) * sin(x))
end function
public static double code(double x, double eps) {
return (Math.cos(x) * Math.sin(eps)) - ((1.0 - Math.cos(eps)) * Math.sin(x));
}
def code(x, eps): return (math.cos(x) * math.sin(eps)) - ((1.0 - math.cos(eps)) * math.sin(x))
function code(x, eps) return Float64(Float64(cos(x) * sin(eps)) - Float64(Float64(1.0 - cos(eps)) * sin(x))) end
function tmp = code(x, eps) tmp = (cos(x) * sin(eps)) - ((1.0 - cos(eps)) * sin(x)); end
code[x_, eps_] := N[(N[(N[Cos[x], $MachinePrecision] * N[Sin[eps], $MachinePrecision]), $MachinePrecision] - N[(N[(1.0 - N[Cos[eps], $MachinePrecision]), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \sin \varepsilon - \left(1 - \cos \varepsilon\right) \cdot \sin x
\end{array}
Initial program 42.4%
sin-sum65.9%
associate--l+65.9%
Applied egg-rr65.9%
+-commutative65.9%
associate-+l-99.4%
*-commutative99.4%
*-rgt-identity99.4%
distribute-lft-out--99.3%
Simplified99.3%
Final simplification99.3%
(FPCore (x eps) :precision binary64 (fma (cos x) (sin eps) (* (sin x) 0.0)))
double code(double x, double eps) {
return fma(cos(x), sin(eps), (sin(x) * 0.0));
}
function code(x, eps) return fma(cos(x), sin(eps), Float64(sin(x) * 0.0)) end
code[x_, eps_] := N[(N[Cos[x], $MachinePrecision] * N[Sin[eps], $MachinePrecision] + N[(N[Sin[x], $MachinePrecision] * 0.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\cos x, \sin \varepsilon, \sin x \cdot 0\right)
\end{array}
Initial program 42.4%
sin-sum65.9%
associate--l+65.9%
Applied egg-rr65.9%
+-commutative65.9%
associate-+l-99.4%
*-commutative99.4%
*-rgt-identity99.4%
distribute-lft-out--99.3%
Simplified99.3%
Taylor expanded in eps around inf 99.3%
fma-neg99.4%
distribute-rgt-neg-in99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
remove-double-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in eps around 0 77.6%
Final simplification77.6%
(FPCore (x eps) :precision binary64 (* 2.0 (* (sin (/ (+ eps (- x x)) 2.0)) (cos (/ (+ eps (+ x x)) 2.0)))))
double code(double x, double eps) {
return 2.0 * (sin(((eps + (x - x)) / 2.0)) * cos(((eps + (x + x)) / 2.0)));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = 2.0d0 * (sin(((eps + (x - x)) / 2.0d0)) * cos(((eps + (x + x)) / 2.0d0)))
end function
public static double code(double x, double eps) {
return 2.0 * (Math.sin(((eps + (x - x)) / 2.0)) * Math.cos(((eps + (x + x)) / 2.0)));
}
def code(x, eps): return 2.0 * (math.sin(((eps + (x - x)) / 2.0)) * math.cos(((eps + (x + x)) / 2.0)))
function code(x, eps) return Float64(2.0 * Float64(sin(Float64(Float64(eps + Float64(x - x)) / 2.0)) * cos(Float64(Float64(eps + Float64(x + x)) / 2.0)))) end
function tmp = code(x, eps) tmp = 2.0 * (sin(((eps + (x - x)) / 2.0)) * cos(((eps + (x + x)) / 2.0))); end
code[x_, eps_] := N[(2.0 * N[(N[Sin[N[(N[(eps + N[(x - x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(eps + N[(x + x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\sin \left(\frac{\varepsilon + \left(x - x\right)}{2}\right) \cdot \cos \left(\frac{\varepsilon + \left(x + x\right)}{2}\right)\right)
\end{array}
Initial program 42.4%
add-sqr-sqrt27.3%
sqrt-unprod27.4%
pow227.4%
Applied egg-rr27.4%
sqrt-pow142.4%
metadata-eval42.4%
pow142.4%
diff-sin42.1%
+-commutative42.1%
+-commutative42.1%
Applied egg-rr42.1%
associate--l+76.7%
associate-+r+76.7%
Simplified76.7%
Final simplification76.7%
(FPCore (x eps) :precision binary64 (if (<= eps -2.1e-5) (- (sin (+ x eps)) (sin x)) (if (<= eps 0.00112) (* (cos x) eps) (sin eps))))
double code(double x, double eps) {
double tmp;
if (eps <= -2.1e-5) {
tmp = sin((x + eps)) - sin(x);
} else if (eps <= 0.00112) {
tmp = cos(x) * eps;
} else {
tmp = sin(eps);
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (eps <= (-2.1d-5)) then
tmp = sin((x + eps)) - sin(x)
else if (eps <= 0.00112d0) then
tmp = cos(x) * eps
else
tmp = sin(eps)
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (eps <= -2.1e-5) {
tmp = Math.sin((x + eps)) - Math.sin(x);
} else if (eps <= 0.00112) {
tmp = Math.cos(x) * eps;
} else {
tmp = Math.sin(eps);
}
return tmp;
}
def code(x, eps): tmp = 0 if eps <= -2.1e-5: tmp = math.sin((x + eps)) - math.sin(x) elif eps <= 0.00112: tmp = math.cos(x) * eps else: tmp = math.sin(eps) return tmp
function code(x, eps) tmp = 0.0 if (eps <= -2.1e-5) tmp = Float64(sin(Float64(x + eps)) - sin(x)); elseif (eps <= 0.00112) tmp = Float64(cos(x) * eps); else tmp = sin(eps); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (eps <= -2.1e-5) tmp = sin((x + eps)) - sin(x); elseif (eps <= 0.00112) tmp = cos(x) * eps; else tmp = sin(eps); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[eps, -2.1e-5], N[(N[Sin[N[(x + eps), $MachinePrecision]], $MachinePrecision] - N[Sin[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[eps, 0.00112], N[(N[Cos[x], $MachinePrecision] * eps), $MachinePrecision], N[Sin[eps], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\varepsilon \leq -2.1 \cdot 10^{-5}:\\
\;\;\;\;\sin \left(x + \varepsilon\right) - \sin x\\
\mathbf{elif}\;\varepsilon \leq 0.00112:\\
\;\;\;\;\cos x \cdot \varepsilon\\
\mathbf{else}:\\
\;\;\;\;\sin \varepsilon\\
\end{array}
\end{array}
if eps < -2.09999999999999988e-5Initial program 62.2%
if -2.09999999999999988e-5 < eps < 0.0011199999999999999Initial program 30.3%
Taylor expanded in eps around 0 98.7%
if 0.0011199999999999999 < eps Initial program 48.8%
Taylor expanded in x around 0 50.8%
Final simplification76.7%
(FPCore (x eps) :precision binary64 (if (or (<= eps -2.25e-5) (not (<= eps 0.00112))) (sin eps) (* (cos x) eps)))
double code(double x, double eps) {
double tmp;
if ((eps <= -2.25e-5) || !(eps <= 0.00112)) {
tmp = sin(eps);
} else {
tmp = cos(x) * eps;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if ((eps <= (-2.25d-5)) .or. (.not. (eps <= 0.00112d0))) then
tmp = sin(eps)
else
tmp = cos(x) * eps
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if ((eps <= -2.25e-5) || !(eps <= 0.00112)) {
tmp = Math.sin(eps);
} else {
tmp = Math.cos(x) * eps;
}
return tmp;
}
def code(x, eps): tmp = 0 if (eps <= -2.25e-5) or not (eps <= 0.00112): tmp = math.sin(eps) else: tmp = math.cos(x) * eps return tmp
function code(x, eps) tmp = 0.0 if ((eps <= -2.25e-5) || !(eps <= 0.00112)) tmp = sin(eps); else tmp = Float64(cos(x) * eps); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if ((eps <= -2.25e-5) || ~((eps <= 0.00112))) tmp = sin(eps); else tmp = cos(x) * eps; end tmp_2 = tmp; end
code[x_, eps_] := If[Or[LessEqual[eps, -2.25e-5], N[Not[LessEqual[eps, 0.00112]], $MachinePrecision]], N[Sin[eps], $MachinePrecision], N[(N[Cos[x], $MachinePrecision] * eps), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\varepsilon \leq -2.25 \cdot 10^{-5} \lor \neg \left(\varepsilon \leq 0.00112\right):\\
\;\;\;\;\sin \varepsilon\\
\mathbf{else}:\\
\;\;\;\;\cos x \cdot \varepsilon\\
\end{array}
\end{array}
if eps < -2.25000000000000014e-5 or 0.0011199999999999999 < eps Initial program 54.1%
Taylor expanded in x around 0 55.2%
if -2.25000000000000014e-5 < eps < 0.0011199999999999999Initial program 30.3%
Taylor expanded in eps around 0 98.7%
Final simplification76.6%
(FPCore (x eps) :precision binary64 (sin eps))
double code(double x, double eps) {
return sin(eps);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = sin(eps)
end function
public static double code(double x, double eps) {
return Math.sin(eps);
}
def code(x, eps): return math.sin(eps)
function code(x, eps) return sin(eps) end
function tmp = code(x, eps) tmp = sin(eps); end
code[x_, eps_] := N[Sin[eps], $MachinePrecision]
\begin{array}{l}
\\
\sin \varepsilon
\end{array}
Initial program 42.4%
Taylor expanded in x around 0 53.2%
Final simplification53.2%
(FPCore (x eps) :precision binary64 eps)
double code(double x, double eps) {
return eps;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = eps
end function
public static double code(double x, double eps) {
return eps;
}
def code(x, eps): return eps
function code(x, eps) return eps end
function tmp = code(x, eps) tmp = eps; end
code[x_, eps_] := eps
\begin{array}{l}
\\
\varepsilon
\end{array}
Initial program 42.4%
Taylor expanded in x around 0 53.2%
Taylor expanded in eps around 0 26.9%
Final simplification26.9%
(FPCore (x eps) :precision binary64 (fma (sin x) (- (cos eps) 1.0) (* (sin eps) (cos x))))
double code(double x, double eps) {
return fma(sin(x), (cos(eps) - 1.0), (sin(eps) * cos(x)));
}
function code(x, eps) return fma(sin(x), Float64(cos(eps) - 1.0), Float64(sin(eps) * cos(x))) end
code[x_, eps_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Cos[eps], $MachinePrecision] - 1.0), $MachinePrecision] + N[(N[Sin[eps], $MachinePrecision] * N[Cos[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\sin x, \cos \varepsilon - 1, \sin \varepsilon \cdot \cos x\right)
\end{array}
herbie shell --seed 2024018
(FPCore (x eps)
:name "2sin (example 3.3)"
:precision binary64
:herbie-target
(fma (sin x) (- (cos eps) 1.0) (* (sin eps) (cos x)))
(- (sin (+ x eps)) (sin x)))