<br />

> [!NOTE]
> **Note:** This API is new and only available via `pip install tf-nightly`.

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/master/keras/src/ops/math.py#L658-L683) |

Computes the regularized lower incomplete gamma function.

```python
tf.keras.ops.gammainc(
    x1, x2
)
```

The regularized lower incomplete gamma function is defined as:
P(x1, x2) = 1 / Γ(x1) \* ∫₀ˣ² t\^(x1 - 1) e\^(-t) dt
where `Γ(x1)` is the gamma function.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x1` | A tensor containing the shape parameter. |
| `x2` | A tensor containing the upper limit of integration. Must be broadcast-compatible with `x1`. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor containing the regularized lower incomplete gamma function evaluated elementwise. ||

<br />

#### Example:

```python
x1 = keras.ops.convert_to_tensor([1.0, 2.0, 3.0])
x2 = keras.ops.convert_to_tensor([0.5, 1.0, 2.0])
keras.ops.gammainc(x1, x2)
array([0.39346936, 0.26424113, 0.3233236 ], dtype=float32)
```