# catalan

Catalan constant

## Syntax

``catalan``

## Description

example

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

## 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)`

collapse all

### Catalan Constant

The Catalan constant is defined as follows:

`$\mathrm{catalan}=\sum _{i=0}^{\infty }\frac{{\left(-1\right)}^{i}}{{\left(2\text{ }i+1\right)}^{2}}=\frac{1}{{1}^{2}}-\frac{1}{{3}^{2}}+\frac{1}{{5}^{2}}-\frac{1}{{7}^{2}}+\dots$`

## Version History

Introduced in R2014a