Surd

class cake.Surd(integer: cake.abc.IntegerType, n: cake.abc.IntegerType = 1, i: cake.abc.IntegerType = 1)

An object representing an irrational number, in the form of a surd.

Parameters
  • integer (~cake.abc.IntegerType) – The irrational integer

  • n (~cake.abc.IntegerType) – the nth term of the root, e.g 3 is cube-root. Doing '(2/3)' will cube root it an then raise it to the power of 2

  • i – Coefficient of the unsolved root

Dunder Methods

__add__(other)

__sub__(other)