qat.core.variables.heaviside
- qat.core.variables.heaviside(x, lower_bound, upper_bound)
Maximum of two real numbers
from qat.core.variables import heaviside print(heaviside(1.3, -1.8, 2.5)) print(heaviside(5.2, -1.8, 2.5))
1 0
- Parameters
x (
Variable
orArithExpression
or number) – real number to be evaluated if it is enclosed by the heavisidelower_bound (
Variable
orArithExpression
or number) – real number for the lower bound of the heavisideupper_bound (
Variable
orArithExpression
or number) – real number for the upper bound of the heaviside
- Returns
heaviside result
- Return type
ArithExpression
or number