class poisson_approval.ComputationEngine[source]

Computation engine.

Define how some mathematical operations are performed. Cf. ComputationEngineSymbolic and ComputationEngineNumeric for some examples.

classmethod Rational(x, y)[source]

Rational number. Should return a fraction, even in a numeric engine.

classmethod S(x)[source]

Convert the number if necessary.

Return a number that has the same value as x. Cf. function S of the package sympy.

classmethod barycenter(a, b, ratio_b)[source]


Cf. ComputationEngineNumeric.barycenter() for specifications and examples.

classmethod exp(x)[source]


classmethod factorial(x)[source]


inf = None

Positive infinity.

classmethod log(x)[source]


classmethod look_equal(x, y, *args, **kwargs)[source]

Test if two numbers can reasonably be considered as equal.

  • y (x,) –
  • *args – Cf. math.isclose().
  • **kwargs – Cf. math.isclose().

If x or y is a float or numpy float (but not a sympy float), then return math.isclose(x, y, *args, **kwargs). In all other cases, return True iff x is equal to y.

Return type:


classmethod multiply_with_absorbing_zero(x, y)[source]

Multiplication with absorbing zero.

Parameters:y (x,) –
Returns:If x or y is 0, then 0 (even if the other input is nan). Otherwise, the product of x and y.
Return type:Number
nan = None

Not a Number.

classmethod ones(*args, **kwargs)[source]

Array of ones.

pi = None


classmethod simplify(x)[source]

Simplify the number if necessary.

Return a number that has the same value as x. Cf. function simplify of the package sympy.

classmethod simplify_vector(x)[source]

Simplify the coefficients if necessary.

classmethod sqrt(x)[source]

Square root.

classmethod zeros(*args, **kwargs)[source]

Array of zeros.