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.
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.