
(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 10 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 (fma (sin eps) (cos x) (* (* (sin eps) (- (sin x))) (tan (* eps 0.5)))))
double code(double x, double eps) {
return fma(sin(eps), cos(x), ((sin(eps) * -sin(x)) * tan((eps * 0.5))));
}
function code(x, eps) return fma(sin(eps), cos(x), Float64(Float64(sin(eps) * Float64(-sin(x))) * tan(Float64(eps * 0.5)))) end
code[x_, eps_] := N[(N[Sin[eps], $MachinePrecision] * N[Cos[x], $MachinePrecision] + N[(N[(N[Sin[eps], $MachinePrecision] * (-N[Sin[x], $MachinePrecision])), $MachinePrecision] * N[Tan[N[(eps * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\sin \varepsilon, \cos x, \left(\sin \varepsilon \cdot \left(-\sin x\right)\right) \cdot \tan \left(\varepsilon \cdot 0.5\right)\right)
\end{array}
Initial program 41.9%
sin-sum69.6%
associate--l+69.6%
Applied egg-rr69.6%
+-commutative69.6%
sub-neg69.6%
associate-+l+99.3%
*-commutative99.3%
neg-mul-199.3%
*-commutative99.3%
distribute-rgt-out99.4%
+-commutative99.4%
Simplified99.4%
flip-+99.3%
frac-2neg99.3%
metadata-eval99.3%
sub-1-cos99.5%
pow299.5%
sub-neg99.5%
metadata-eval99.5%
Applied egg-rr99.5%
remove-double-neg99.5%
unpow299.5%
neg-mul-199.5%
times-frac99.5%
+-commutative99.5%
hang-0p-tan99.6%
Simplified99.6%
fma-def99.7%
associate-*r*99.7%
frac-2neg99.7%
metadata-eval99.7%
/-rgt-identity99.7%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x eps) :precision binary64 (let* ((t_0 (sin (+ eps x))) (t_1 (- t_0 (sin x)))) (if (<= t_1 -0.05) t_1 (if (<= t_1 1e-113) (* eps (cos x)) (fabs t_0)))))
double code(double x, double eps) {
double t_0 = sin((eps + x));
double t_1 = t_0 - sin(x);
double tmp;
if (t_1 <= -0.05) {
tmp = t_1;
} else if (t_1 <= 1e-113) {
tmp = eps * cos(x);
} else {
tmp = fabs(t_0);
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sin((eps + x))
t_1 = t_0 - sin(x)
if (t_1 <= (-0.05d0)) then
tmp = t_1
else if (t_1 <= 1d-113) then
tmp = eps * cos(x)
else
tmp = abs(t_0)
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = Math.sin((eps + x));
double t_1 = t_0 - Math.sin(x);
double tmp;
if (t_1 <= -0.05) {
tmp = t_1;
} else if (t_1 <= 1e-113) {
tmp = eps * Math.cos(x);
} else {
tmp = Math.abs(t_0);
}
return tmp;
}
def code(x, eps): t_0 = math.sin((eps + x)) t_1 = t_0 - math.sin(x) tmp = 0 if t_1 <= -0.05: tmp = t_1 elif t_1 <= 1e-113: tmp = eps * math.cos(x) else: tmp = math.fabs(t_0) return tmp
function code(x, eps) t_0 = sin(Float64(eps + x)) t_1 = Float64(t_0 - sin(x)) tmp = 0.0 if (t_1 <= -0.05) tmp = t_1; elseif (t_1 <= 1e-113) tmp = Float64(eps * cos(x)); else tmp = abs(t_0); end return tmp end
function tmp_2 = code(x, eps) t_0 = sin((eps + x)); t_1 = t_0 - sin(x); tmp = 0.0; if (t_1 <= -0.05) tmp = t_1; elseif (t_1 <= 1e-113) tmp = eps * cos(x); else tmp = abs(t_0); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[Sin[N[(eps + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[Sin[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -0.05], t$95$1, If[LessEqual[t$95$1, 1e-113], N[(eps * N[Cos[x], $MachinePrecision]), $MachinePrecision], N[Abs[t$95$0], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\varepsilon + x\right)\\
t_1 := t_0 - \sin x\\
\mathbf{if}\;t_1 \leq -0.05:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 10^{-113}:\\
\;\;\;\;\varepsilon \cdot \cos x\\
\mathbf{else}:\\
\;\;\;\;\left|t_0\right|\\
\end{array}
\end{array}
if (-.f64 (sin.f64 (+.f64 x eps)) (sin.f64 x)) < -0.050000000000000003Initial program 69.8%
if -0.050000000000000003 < (-.f64 (sin.f64 (+.f64 x eps)) (sin.f64 x)) < 9.99999999999999979e-114Initial program 22.2%
Taylor expanded in eps around 0 75.8%
if 9.99999999999999979e-114 < (-.f64 (sin.f64 (+.f64 x eps)) (sin.f64 x)) Initial program 66.3%
add-sqr-sqrt63.1%
sqrt-unprod66.9%
pow266.9%
Applied egg-rr66.9%
unpow266.9%
rem-sqrt-square66.9%
+-commutative66.9%
Applied egg-rr66.9%
Taylor expanded in x around 0 66.8%
Final simplification72.4%
(FPCore (x eps) :precision binary64 (+ (* (sin eps) (cos x)) (* (sin x) (/ (tan (* eps 0.5)) (/ -1.0 (sin eps))))))
double code(double x, double eps) {
return (sin(eps) * cos(x)) + (sin(x) * (tan((eps * 0.5)) / (-1.0 / sin(eps))));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = (sin(eps) * cos(x)) + (sin(x) * (tan((eps * 0.5d0)) / ((-1.0d0) / sin(eps))))
end function
public static double code(double x, double eps) {
return (Math.sin(eps) * Math.cos(x)) + (Math.sin(x) * (Math.tan((eps * 0.5)) / (-1.0 / Math.sin(eps))));
}
def code(x, eps): return (math.sin(eps) * math.cos(x)) + (math.sin(x) * (math.tan((eps * 0.5)) / (-1.0 / math.sin(eps))))
function code(x, eps) return Float64(Float64(sin(eps) * cos(x)) + Float64(sin(x) * Float64(tan(Float64(eps * 0.5)) / Float64(-1.0 / sin(eps))))) end
function tmp = code(x, eps) tmp = (sin(eps) * cos(x)) + (sin(x) * (tan((eps * 0.5)) / (-1.0 / sin(eps)))); end
code[x_, eps_] := N[(N[(N[Sin[eps], $MachinePrecision] * N[Cos[x], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[x], $MachinePrecision] * N[(N[Tan[N[(eps * 0.5), $MachinePrecision]], $MachinePrecision] / N[(-1.0 / N[Sin[eps], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \varepsilon \cdot \cos x + \sin x \cdot \frac{\tan \left(\varepsilon \cdot 0.5\right)}{\frac{-1}{\sin \varepsilon}}
\end{array}
Initial program 41.9%
sin-sum69.6%
associate--l+69.6%
Applied egg-rr69.6%
+-commutative69.6%
sub-neg69.6%
associate-+l+99.3%
*-commutative99.3%
neg-mul-199.3%
*-commutative99.3%
distribute-rgt-out99.4%
+-commutative99.4%
Simplified99.4%
flip-+99.3%
frac-2neg99.3%
metadata-eval99.3%
sub-1-cos99.5%
pow299.5%
sub-neg99.5%
metadata-eval99.5%
Applied egg-rr99.5%
remove-double-neg99.5%
unpow299.5%
neg-mul-199.5%
times-frac99.5%
+-commutative99.5%
hang-0p-tan99.6%
Simplified99.6%
*-commutative99.6%
clear-num99.6%
un-div-inv99.6%
div-inv99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x eps) :precision binary64 (- (* (sin eps) (cos x)) (* (sin x) (* (sin eps) (tan (* eps 0.5))))))
double code(double x, double eps) {
return (sin(eps) * cos(x)) - (sin(x) * (sin(eps) * tan((eps * 0.5))));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = (sin(eps) * cos(x)) - (sin(x) * (sin(eps) * tan((eps * 0.5d0))))
end function
public static double code(double x, double eps) {
return (Math.sin(eps) * Math.cos(x)) - (Math.sin(x) * (Math.sin(eps) * Math.tan((eps * 0.5))));
}
def code(x, eps): return (math.sin(eps) * math.cos(x)) - (math.sin(x) * (math.sin(eps) * math.tan((eps * 0.5))))
function code(x, eps) return Float64(Float64(sin(eps) * cos(x)) - Float64(sin(x) * Float64(sin(eps) * tan(Float64(eps * 0.5))))) end
function tmp = code(x, eps) tmp = (sin(eps) * cos(x)) - (sin(x) * (sin(eps) * tan((eps * 0.5)))); end
code[x_, eps_] := N[(N[(N[Sin[eps], $MachinePrecision] * N[Cos[x], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[x], $MachinePrecision] * N[(N[Sin[eps], $MachinePrecision] * N[Tan[N[(eps * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \varepsilon \cdot \cos x - \sin x \cdot \left(\sin \varepsilon \cdot \tan \left(\varepsilon \cdot 0.5\right)\right)
\end{array}
Initial program 41.9%
sin-sum69.6%
associate--l+69.6%
Applied egg-rr69.6%
+-commutative69.6%
sub-neg69.6%
associate-+l+99.3%
*-commutative99.3%
neg-mul-199.3%
*-commutative99.3%
distribute-rgt-out99.4%
+-commutative99.4%
Simplified99.4%
flip-+99.3%
frac-2neg99.3%
metadata-eval99.3%
sub-1-cos99.5%
pow299.5%
sub-neg99.5%
metadata-eval99.5%
Applied egg-rr99.5%
remove-double-neg99.5%
unpow299.5%
neg-mul-199.5%
times-frac99.5%
+-commutative99.5%
hang-0p-tan99.6%
Simplified99.6%
expm1-log1p-u72.8%
expm1-udef72.6%
frac-2neg72.6%
metadata-eval72.6%
/-rgt-identity72.6%
div-inv72.6%
metadata-eval72.6%
Applied egg-rr72.6%
expm1-def72.8%
expm1-log1p99.6%
distribute-lft-neg-in99.6%
distribute-rgt-neg-in99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x eps) :precision binary64 (fma (sin eps) (cos x) (* (sin x) (+ -1.0 (cos eps)))))
double code(double x, double eps) {
return fma(sin(eps), cos(x), (sin(x) * (-1.0 + cos(eps))));
}
function code(x, eps) return fma(sin(eps), cos(x), Float64(sin(x) * Float64(-1.0 + cos(eps)))) end
code[x_, eps_] := N[(N[Sin[eps], $MachinePrecision] * N[Cos[x], $MachinePrecision] + N[(N[Sin[x], $MachinePrecision] * N[(-1.0 + N[Cos[eps], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\sin \varepsilon, \cos x, \sin x \cdot \left(-1 + \cos \varepsilon\right)\right)
\end{array}
Initial program 41.9%
sin-sum69.6%
associate--l+69.6%
Applied egg-rr69.6%
+-commutative69.6%
sub-neg69.6%
associate-+l+99.3%
*-commutative99.3%
neg-mul-199.3%
*-commutative99.3%
distribute-rgt-out99.4%
+-commutative99.4%
Simplified99.4%
fma-def99.4%
*-commutative99.4%
Applied egg-rr99.4%
Final simplification99.4%
(FPCore (x eps) :precision binary64 (+ (* (sin eps) (cos x)) (* (sin x) (+ -1.0 (cos eps)))))
double code(double x, double eps) {
return (sin(eps) * cos(x)) + (sin(x) * (-1.0 + cos(eps)));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = (sin(eps) * cos(x)) + (sin(x) * ((-1.0d0) + cos(eps)))
end function
public static double code(double x, double eps) {
return (Math.sin(eps) * Math.cos(x)) + (Math.sin(x) * (-1.0 + Math.cos(eps)));
}
def code(x, eps): return (math.sin(eps) * math.cos(x)) + (math.sin(x) * (-1.0 + math.cos(eps)))
function code(x, eps) return Float64(Float64(sin(eps) * cos(x)) + Float64(sin(x) * Float64(-1.0 + cos(eps)))) end
function tmp = code(x, eps) tmp = (sin(eps) * cos(x)) + (sin(x) * (-1.0 + cos(eps))); end
code[x_, eps_] := N[(N[(N[Sin[eps], $MachinePrecision] * N[Cos[x], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[x], $MachinePrecision] * N[(-1.0 + N[Cos[eps], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \varepsilon \cdot \cos x + \sin x \cdot \left(-1 + \cos \varepsilon\right)
\end{array}
Initial program 41.9%
sin-sum69.6%
associate--l+69.6%
Applied egg-rr69.6%
+-commutative69.6%
sub-neg69.6%
associate-+l+99.3%
*-commutative99.3%
neg-mul-199.3%
*-commutative99.3%
distribute-rgt-out99.4%
+-commutative99.4%
Simplified99.4%
Final simplification99.4%
(FPCore (x eps) :precision binary64 (* 2.0 (* (sin (* eps 0.5)) (cos (* 0.5 (+ eps (+ x x)))))))
double code(double x, double eps) {
return 2.0 * (sin((eps * 0.5)) * cos((0.5 * (eps + (x + x)))));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = 2.0d0 * (sin((eps * 0.5d0)) * cos((0.5d0 * (eps + (x + x)))))
end function
public static double code(double x, double eps) {
return 2.0 * (Math.sin((eps * 0.5)) * Math.cos((0.5 * (eps + (x + x)))));
}
def code(x, eps): return 2.0 * (math.sin((eps * 0.5)) * math.cos((0.5 * (eps + (x + x)))))
function code(x, eps) return Float64(2.0 * Float64(sin(Float64(eps * 0.5)) * cos(Float64(0.5 * Float64(eps + Float64(x + x)))))) end
function tmp = code(x, eps) tmp = 2.0 * (sin((eps * 0.5)) * cos((0.5 * (eps + (x + x))))); end
code[x_, eps_] := N[(2.0 * N[(N[Sin[N[(eps * 0.5), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(0.5 * N[(eps + N[(x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\sin \left(\varepsilon \cdot 0.5\right) \cdot \cos \left(0.5 \cdot \left(\varepsilon + \left(x + x\right)\right)\right)\right)
\end{array}
Initial program 41.9%
diff-sin41.2%
div-inv41.2%
metadata-eval41.2%
div-inv41.2%
+-commutative41.2%
metadata-eval41.2%
Applied egg-rr41.2%
*-commutative41.2%
+-commutative41.2%
associate--l+72.5%
+-inverses72.5%
distribute-lft-in72.5%
metadata-eval72.5%
*-commutative72.5%
associate-+r+72.6%
+-commutative72.6%
Simplified72.6%
Final simplification72.6%
(FPCore (x eps) :precision binary64 (if (<= eps -0.026) (sin eps) (if (<= eps 0.0002) (* eps (cos x)) (sin eps))))
double code(double x, double eps) {
double tmp;
if (eps <= -0.026) {
tmp = sin(eps);
} else if (eps <= 0.0002) {
tmp = eps * cos(x);
} 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 <= (-0.026d0)) then
tmp = sin(eps)
else if (eps <= 0.0002d0) then
tmp = eps * cos(x)
else
tmp = sin(eps)
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (eps <= -0.026) {
tmp = Math.sin(eps);
} else if (eps <= 0.0002) {
tmp = eps * Math.cos(x);
} else {
tmp = Math.sin(eps);
}
return tmp;
}
def code(x, eps): tmp = 0 if eps <= -0.026: tmp = math.sin(eps) elif eps <= 0.0002: tmp = eps * math.cos(x) else: tmp = math.sin(eps) return tmp
function code(x, eps) tmp = 0.0 if (eps <= -0.026) tmp = sin(eps); elseif (eps <= 0.0002) tmp = Float64(eps * cos(x)); else tmp = sin(eps); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (eps <= -0.026) tmp = sin(eps); elseif (eps <= 0.0002) tmp = eps * cos(x); else tmp = sin(eps); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[eps, -0.026], N[Sin[eps], $MachinePrecision], If[LessEqual[eps, 0.0002], N[(eps * N[Cos[x], $MachinePrecision]), $MachinePrecision], N[Sin[eps], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\varepsilon \leq -0.026:\\
\;\;\;\;\sin \varepsilon\\
\mathbf{elif}\;\varepsilon \leq 0.0002:\\
\;\;\;\;\varepsilon \cdot \cos x\\
\mathbf{else}:\\
\;\;\;\;\sin \varepsilon\\
\end{array}
\end{array}
if eps < -0.0259999999999999988 or 2.0000000000000001e-4 < eps Initial program 49.7%
Taylor expanded in x around 0 49.4%
if -0.0259999999999999988 < eps < 2.0000000000000001e-4Initial program 32.9%
Taylor expanded in eps around 0 98.2%
Final simplification72.1%
(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 41.9%
Taylor expanded in x around 0 55.8%
Final simplification55.8%
(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 41.9%
Taylor expanded in eps around 0 47.7%
Taylor expanded in x around 0 31.5%
Final simplification31.5%
(FPCore (x eps) :precision binary64 (* 2.0 (* (cos (+ x (/ eps 2.0))) (sin (/ eps 2.0)))))
double code(double x, double eps) {
return 2.0 * (cos((x + (eps / 2.0))) * sin((eps / 2.0)));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = 2.0d0 * (cos((x + (eps / 2.0d0))) * sin((eps / 2.0d0)))
end function
public static double code(double x, double eps) {
return 2.0 * (Math.cos((x + (eps / 2.0))) * Math.sin((eps / 2.0)));
}
def code(x, eps): return 2.0 * (math.cos((x + (eps / 2.0))) * math.sin((eps / 2.0)))
function code(x, eps) return Float64(2.0 * Float64(cos(Float64(x + Float64(eps / 2.0))) * sin(Float64(eps / 2.0)))) end
function tmp = code(x, eps) tmp = 2.0 * (cos((x + (eps / 2.0))) * sin((eps / 2.0))); end
code[x_, eps_] := N[(2.0 * N[(N[Cos[N[(x + N[(eps / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(eps / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\cos \left(x + \frac{\varepsilon}{2}\right) \cdot \sin \left(\frac{\varepsilon}{2}\right)\right)
\end{array}
herbie shell --seed 2023258
(FPCore (x eps)
:name "2sin (example 3.3)"
:precision binary64
:herbie-target
(* 2.0 (* (cos (+ x (/ eps 2.0))) (sin (/ eps 2.0))))
(- (sin (+ x eps)) (sin x)))