<s>
Tanh-sinh	B-Algorithm
quadrature	I-Algorithm
is	O
a	O
method	O
for	O
numerical	B-Algorithm
integration	I-Algorithm
introduced	O
by	O
Hidetoshi	O
Takahashi	O
and	O
Masatake	O
Mori	O
in	O
1974	O
.	O
</s>
<s>
This	O
results	O
in	O
a	O
great	O
enhancement	O
of	O
the	O
accuracy	O
of	O
the	O
numerical	B-Algorithm
integration	I-Algorithm
procedure	O
,	O
which	O
is	O
typically	O
performed	O
by	O
the	O
Trapezoidal	B-Algorithm
rule	I-Algorithm
.	O
</s>
<s>
In	O
most	O
cases	O
,	O
the	O
transformed	O
integrand	O
displays	O
a	O
rapid	O
roll-off	O
(	O
decay	O
)	O
,	O
enabling	O
the	O
numerical	O
integrator	O
to	O
quickly	O
achieve	O
convergence	B-Architecture
.	O
</s>
<s>
Like	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
,	O
Tanh-Sinh	B-Algorithm
quadrature	I-Algorithm
is	O
well	O
suited	O
for	O
arbitrary-precision	B-Algorithm
integration	O
,	O
where	O
an	O
accuracy	O
of	O
hundreds	O
or	O
even	O
thousands	O
of	O
digits	O
is	O
desired	O
.	O
</s>
<s>
The	O
convergence	B-Architecture
is	O
exponential	O
(	O
in	O
the	O
discretization	O
sense	O
)	O
for	O
sufficiently	O
well-behaved	O
integrands	O
:	O
doubling	O
the	O
number	O
of	O
evaluation	O
points	O
roughly	O
doubles	O
the	O
number	O
of	O
correct	O
digits	O
.	O
</s>
<s>
However	O
,	O
Tanh-Sinh	B-Algorithm
quadrature	I-Algorithm
is	O
not	O
as	O
efficient	O
as	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
for	O
smooth	O
integrands	O
;	O
but	O
unlike	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
,	O
tends	O
to	O
work	O
equally	O
well	O
with	O
integrands	O
having	O
singularities	O
or	O
infinite	O
derivatives	O
at	O
one	O
or	O
both	O
endpoints	O
of	O
the	O
integration	O
interval	O
as	O
already	O
noted	O
.	O
</s>
<s>
Furthermore	O
,	O
Tanh-Sinh	B-Algorithm
quadrature	I-Algorithm
can	O
be	O
implemented	O
in	O
a	O
progressive	O
manner	O
,	O
with	O
the	O
step	O
size	O
halved	O
each	O
time	O
the	O
rule	O
level	O
is	O
raised	O
,	O
and	O
reusing	O
the	O
function	O
values	O
calculated	O
on	O
previous	O
levels	O
.	O
</s>
<s>
The	O
cost	O
of	O
calculating	O
abscissa	O
–	O
weight	O
pairs	O
for	O
n-digit	O
accuracy	O
is	O
roughly	O
n2	O
log2	O
n	O
compared	O
to	O
n3	O
log	O
n	O
for	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
.	O
</s>
<s>
Bailey	O
and	O
others	O
have	O
done	O
extensive	O
research	O
on	O
Tanh-Sinh	B-Algorithm
quadrature	I-Algorithm
,	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
and	O
Error	O
Function	O
quadrature	O
,	O
as	O
well	O
as	O
several	O
of	O
the	O
classical	O
quadrature	O
methods	O
,	O
and	O
found	O
that	O
the	O
classical	O
methods	O
are	O
not	O
competitive	O
with	O
the	O
first	O
three	O
methods	O
,	O
particularly	O
when	O
high-precision	O
results	O
are	O
required	O
.	O
</s>
<s>
In	O
a	O
conference	O
paper	O
presented	O
at	O
RNC5	O
on	O
Real	O
Numbers	O
and	O
Computers	O
(	O
Sept	O
2003	O
)	O
,	O
when	O
comparing	O
Tanh-Sinh	B-Algorithm
quadrature	I-Algorithm
with	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
and	O
Error	O
Function	O
quadrature	O
,	O
Bailey	O
and	O
Li	O
found	O
:	O
"	O
Overall	O
,	O
the	O
Tanh-Sinh	O
scheme	O
appears	O
to	O
be	O
the	O
best	O
.	O
</s>
<s>
Upon	O
comparing	O
the	O
scheme	O
to	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
and	O
Error	O
Function	O
quadrature	O
,	O
Bailey	O
et	O
al	O
.	O
</s>
<s>
Bailey	O
(	O
2006	O
)	O
found	O
that	O
:	O
"	O
The	O
Tanh-Sinh	B-Algorithm
quadrature	I-Algorithm
scheme	O
is	O
the	O
fastest	O
currently	O
known	O
high-precision	O
quadrature	O
scheme	O
,	O
particularly	O
when	O
one	O
counts	O
the	O
time	O
for	O
computing	O
abscissas	O
and	O
weights	O
.	O
</s>
<s>
In	O
summary	O
,	O
the	O
Tanh-Sinh	B-Algorithm
quadrature	I-Algorithm
scheme	O
is	O
designed	O
so	O
that	O
it	O
gives	O
the	O
most	O
accurate	O
result	O
for	O
the	O
minimum	O
number	O
of	O
function	O
evaluations	O
.	O
</s>
<s>
In	O
practice	O
,	O
the	O
Tanh-Sinh	B-Algorithm
quadrature	I-Algorithm
rule	O
is	O
almost	O
invariably	O
the	O
best	O
rule	O
and	O
is	O
often	O
the	O
only	O
effective	O
rule	O
when	O
extended	O
precision	O
results	O
are	O
sought	O
.	O
</s>
<s>
Tanh-sinh	B-Algorithm
quadrature	I-Algorithm
is	O
implemented	O
in	O
a	O
macro-enabled	O
Excel	O
spreadsheet	O
by	O
Graeme	O
Dennes	O
.	O
</s>
<s>
Tanh-sinh	B-Algorithm
quadrature	I-Algorithm
is	O
implemented	O
in	O
the	O
Haskell	B-Language
package	O
integration	O
.	O
</s>
<s>
Tanh-sinh	B-Algorithm
quadrature	I-Algorithm
is	O
implemented	O
in	O
the	O
Python	B-Language
library	O
mpmath	O
.	O
</s>
<s>
An	O
effective	O
implementation	O
of	O
Tanh-sinh	B-Algorithm
quadrature	I-Algorithm
in	O
C#	B-Application
by	O
Ned	O
Ganchovski	O
.	O
</s>
