/ratios_cairo

Repository that defines a cairo struct called ratio that represents a rational number, x/y where x and y are in z mod p. Defines several operations between ratios.

Primary LanguageCairoGNU General Public License v3.0GPL-3.0

ratios_cairo

repository that defines a cairo struct called ratio that represents a rational number in order to calculate exponents.

Ratio is x/y where x and y in Z mod p

Current functionality:

  • multiply ratios
  • divide ratios
  • raise ratio to power
  • take nth root of ratio
  • add ratios
  • absolute value of difference between ratios
  • check if one ratio is less than or equal to another

Todo:

  • add testing
  • add overflow protection