<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/math/generic.py#L653-L682) |

Compute `log(exp(max(x, y)) - exp(min(x, y)))` in a numerically stable way.

    tfp.math.log_sub_exp(
        x, y, return_sign=False, name=None
    )

Use `return_sign=True` unless `x >= y`, since we can't represent a negative in
log-space.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Float `Tensor` broadcastable with `y`. |
| `y` | Float `Tensor` broadcastable with `x`. |
| `return_sign` | Whether or not to return the second output value `sign`. If it is known that `x >= y`, this is unnecessary. |
| `name` | Python `str` name prefixed to Ops created by this function. Default value: `None` (i.e., `'log_sub_exp'`). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `logsubexp` | Float `Tensor` of `log(exp(max(x, y)) - exp(min(x, y)))`. |
| `sign` | Float `Tensor` +/-1 indicating the sign of `exp(x) - exp(y)`. |

<br />