# pypdevsbbl.extra.equations module

This file contains a set of mathematical equations as functions.

These equations can be used as an input for the `pypdevsbbl.generic.math.Equation` block for simplicity.

Note

The described functions were written with the idea of numerical values as inputs. While it is advised to refrain from using non-numerical arguments, it is allowed within Python. There are no guarantees on what might happen if you decide to use non-numeric input.

`pypdevsbbl.extra.equations.``SUBTRACT`(x, y)

  Subtracts two values.

  Parameters:

  - x (numeric) – The value to subtract from.
  - y (numeric) – The value that subtracts.

  Returns: | \(x - y\)

`pypdevsbbl.extra.equations.``DIVIDE`(x, y)

  Divides two values.

  Parameters:

  - x (numeric) – The numerator.
  - y (numeric) – The denominator.

  Returns: | \(\dfrac{x}{y}\)

`pypdevsbbl.extra.equations.``IDIVIDE`(x, y)

  Integer divides two values.

  Parameters:

  - x (numeric) – The numerator.
  - y (numeric) – The denominator.

  Returns: | \(\left\lfloor\dfrac{x}{y}\right\rfloor\)

`pypdevsbbl.extra.equations.``MODULO`(x, y)

  Modulo divides two values.

  Parameters:

  - x (numeric) – The numerator.
  - y (numeric) – The denominator.

  Returns: | \(x \textrm{ mod } y\)

`pypdevsbbl.extra.equations.``NEGATE`(x)

  Negates a value.

  Parameters: | x (numeric) – The value to negate.
  Returns: | \(- x\)

`pypdevsbbl.extra.equations.``INVERT`(x)

  Inverts a value.

  Parameters: | x (numeric) – The value to invert.
  Returns: | \(\dfrac{1}{x}\)

`pypdevsbbl.extra.equations.``POWER`(x, y)

  Raises x to the power of y.

  Parameters:

  - x (numeric) – The base.
  - y (numeric) – The power.

  Returns: | \(x^y\)

`pypdevsbbl.extra.equations.``AND`(x, y)

  Boolean AND gate between x and y.

  Parameters:

  - x (numeric) – The left hand side of the gate.
  - y (numeric) – The right hand side of the gate.

  Returns: | \(x \textrm{ AND } y\)

`pypdevsbbl.extra.equations.``OR`(x, y)

  Boolean OR gate between x and y.

  Parameters:

  - x (numeric) – The left hand side of the gate.
  - y (numeric) – The right hand side of the gate.

  Returns: | \(x \textrm{ OR } y\)

`pypdevsbbl.extra.equations.``BAND`(x, y)

  Bitwise AND gate between x and y.

  Parameters:

  - x (numeric) – The left hand side of the gate.
  - y (numeric) – The right hand side of the gate.

  Returns: | \(x \textrm{ & } y\)

`pypdevsbbl.extra.equations.``BOR`(x, y)

  Bitwise OR gate between x and y.

  Parameters:

  - x (numeric) – The left hand side of the gate.
  - y (numeric) – The right hand side of the gate.

  Returns: | \(x \textrm{ | } y\)

`pypdevsbbl.extra.equations.``NOT`(x)

  Boolean NOT gate of x.

  Parameters: | x (numeric) – The value to invert.
  Returns: | \(\textrm{NOT } x\)

`pypdevsbbl.extra.equations.``XOR`(x, y)

  The XOR gate between x and y.

  Parameters:

  - x (numeric) – The left hand side of the gate.
  - y (numeric) – The right hand side of the gate.

  Returns: | \(x \textrm{ XOR } y\)

`pypdevsbbl.extra.equations.``NOR`(x, y)

  The NOR gate between x and y.

  Parameters:

  - x (numeric) – The left hand side of the gate.
  - y (numeric) – The right hand side of the gate.

  Returns: | \(x \textrm{ NOR } y\)

`pypdevsbbl.extra.equations.``XNOR`(x, y)

  The XNOR or XAND gate between x and y.

  Parameters:

  - x (numeric) – The left hand side of the gate.
  - y (numeric) – The right hand side of the gate.

  Returns: | \(x \textrm{ XNOR } y\)

`pypdevsbbl.extra.equations.``LT`(x, y)

  Checks if x is less than y.

  Parameters:

  - x (numeric) – The smaller value.
  - y (numeric) – The larger value.

  Returns: | \(x < y\)

`pypdevsbbl.extra.equations.``LE`(x, y)

  Checks if x is less than or equal to y.

  Parameters:

  - x (numeric) – The smaller value.
  - y (numeric) – The larger value.

  Returns: | \(x \leq y\)

`pypdevsbbl.extra.equations.``LEQ`(x, y)

  Synonym of `LE()`.

`pypdevsbbl.extra.equations.``GT`(x, y)

  Checks if x is greater than y.

  Parameters:

  - x (numeric) – The larger value.
  - y (numeric) – The smaller value.

  Returns: | \(x > y\)

`pypdevsbbl.extra.equations.``GE`(x, y)

  Checks if x is greater than or equal to y.

  Parameters:

  - x (numeric) – The larger value.
  - y (numeric) – The smaller value.

  Returns: | \(x \geq y\)

`pypdevsbbl.extra.equations.``GEQ`(x, y)

  Synonym of `GE()`.

`pypdevsbbl.extra.equations.``EQ`(x, y)

  Checks if x equals y.

  Parameters:

  - x (numeric) – The left hand side.
  - y (numeric) – The right hand side.

  Returns: | \(x == y\)

`pypdevsbbl.extra.equations.``EQUALS`(x, y)

  Synonym of `EQ()`.

`pypdevsbbl.extra.equations.``IDENTICAL`(x, y)

  Checks if x is identical to y.

  Parameters:

  - x (numeric) – The left hand side.
  - y (numeric) – The right hand side.

  Returns: | \(x \textrm{ is } y\)