Main Content

catalan

Catalan constant

Syntax

Description

catalan represents the Catalan constant. To get a floating-point approximation with the current precision set by digits, use vpa(catalan).

example

Examples

Approximate Catalan Constant

Find a floating-point approximation of the Catalan constant with the default number of digits and with the 10-digit precision.

Use vpa to approximate the Catalan constant with the default 32-digit precision:

vpa(catalan)
ans =
0.91596559417721901505460351493238

Set the number of digits to 10 and approximate the Catalan constant:

old = digits(10);
vpa(catalan)
ans =
0.9159655942

Restore the default number of digits:

digits(old)

More About

collapse all

Catalan Constant

The Catalan constant is defined as follows:

catalan=i=0(1)i(2i+1)2=112132+152172+

Version History

Introduced in R2014a

See Also

|