didppy.sqrt

didppy.sqrt(x)

Returns an expression representing the square root.

Parameters:

x (IntExpr, IntVar, IntResourceVar, FloatExpr, FloatVar, FloatResourceVar, int, or float) – Input.

Returns:

The square root.

Return type:

FloatExpr

Examples

>>> import didppy as dp
>>> model = dp.Model()
>>> state = model.target_state
>>> expr = dp.FloatExpr(4.0)
>>> dp.sqrt(expr).eval(state, model)
2.0