# tf.math.xlog1py

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/ops/math_ops.py#L5391-L5426) |

Compute x \* log1p(y).

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.math.xlog1py`](https://www.tensorflow.org/api_docs/python/tf/math/xlog1py)

<br />

    tf.math.xlog1py(
        x, y, name=None
    )

Given `x` and `y`, compute `x * log1p(y)`. This function safely returns
zero when `x = 0`, no matter what the value of `y` is.

#### Example:

    tf.math.xlog1py(0., 1.)
    <tf.Tensor: shape=(), dtype=float32, numpy=0.>
    tf.math.xlog1py(1., 1.)
    <tf.Tensor: shape=(), dtype=float32, numpy=0.6931472>
    tf.math.xlog1py(2., 2.)
    <tf.Tensor: shape=(), dtype=float32, numpy=2.1972246>
    tf.math.xlog1py(0., -1.)
    <tf.Tensor: shape=(), dtype=float32, numpy=0.>

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | A [`tf.Tensor`](https://www.tensorflow.org/versions/r2.14/api_docs/python/tf/Tensor) of type `half`, `float32`, `float64`, `complex64`, `complex128` |
| `y` | A [`tf.Tensor`](https://www.tensorflow.org/versions/r2.14/api_docs/python/tf/Tensor) of type `half`, `float32`, `float64`, `complex64`, `complex128` |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `x * log1p(y)`. ||

<br />

<br />

## scipy compatibility

<br />

Equivalent to scipy.special.xlog1py

<br />

<br />