src/cplib/math/fractions

    Dark Mode
Search:
Group by:
  Source   Edit

Types

Fraction[T] = object
  num*, den*: T
  Source   Edit

Procs

proc `$`[T](x: Fraction[T]): string
  Source   Edit
proc `*=`[T](x: var Fraction[T]; y: Fraction[T])
  Source   Edit
proc `*=`[T](x: var Fraction[T]; y: T)
  Source   Edit
proc `*`[T](x, y: Fraction[T]): Fraction[T]
  Source   Edit
proc `*`[T](x: Fraction[T]; y: T): Fraction[T]
  Source   Edit
proc `*`[T](x: T; y: Fraction[T]): Fraction[T]
  Source   Edit
proc `+=`[T](x: var Fraction[T]; y: Fraction[T])
  Source   Edit
proc `+=`[T](x: var Fraction[T]; y: T)
  Source   Edit
proc `+`[T](x, y: Fraction[T]): Fraction[T]
  Source   Edit
proc `+`[T](x: Fraction[T]; y: T): Fraction[T]
  Source   Edit
proc `+`[T](x: T; y: Fraction[T]): Fraction[T]
  Source   Edit
proc `-=`[T](x: var Fraction[T]; y: Fraction[T])
  Source   Edit
proc `-=`[T](x: var Fraction[T]; y: T)
  Source   Edit
proc `-`[T](x, y: Fraction[T]): Fraction[T]
  Source   Edit
proc `-`[T](x: Fraction[T]): Fraction[T]
  Source   Edit
proc `-`[T](x: Fraction[T]; y: T): Fraction[T]
  Source   Edit
proc `-`[T](x: T; y: Fraction[T]): Fraction[T]
  Source   Edit
proc `/=`[T](x: var Fraction[T]; y: Fraction[T])
  Source   Edit
proc `/=`[T](x: var Fraction[T]; y: T)
  Source   Edit
proc `/`[T](x, y: Fraction[T]): Fraction[T]
  Source   Edit
proc `/`[T](x: Fraction[T]; y: T): Fraction[T]
  Source   Edit
proc `/`[T](x: T; y: Fraction[T]): Fraction[T]
  Source   Edit
proc `<=`[T](x: Fraction[T]; y: Fraction[T] or T): bool
  Source   Edit
proc `<=`[T](x: T; y: Fraction[T]): bool
  Source   Edit
proc `<`[T](x, y: Fraction[T]): bool
  Source   Edit
proc `<`[T](x: Fraction[T]; y: T): bool
  Source   Edit
proc `<`[T](x: T; y: Fraction[T]): bool
  Source   Edit
proc `==`[T](x, y: Fraction[T]): bool
  Source   Edit
proc `==`[T](x: Fraction[T]; y: T): bool
  Source   Edit
proc `==`[T](x: T; y: Fraction[T]): bool
  Source   Edit
proc `>=`[T](x: Fraction[T]; y: Fraction[T] or T): bool
  Source   Edit
proc `>=`[T](x: T; y: Fraction[T]): bool
  Source   Edit
proc `>`[T](x, y: Fraction[T]): bool
  Source   Edit
proc `>`[T](x: Fraction[T]; y: T): bool
  Source   Edit
proc `>`[T](x: T; y: Fraction[T]): bool
  Source   Edit
proc abs[T](x: Fraction[T]): Fraction[T]
  Source   Edit
proc cmp[T](x, y: Fraction[T]): int
  Source   Edit
proc cmp[T](x: Fraction[T]; y: T): int
  Source   Edit
proc cmp[T](x: T; y: Fraction[T]): int
  Source   Edit
proc hash[T](x: Fraction[T]): Hash
  Source   Edit
proc initFraction[T](num, den: T; reduce: bool = true): Fraction[T]
  Source   Edit
proc initFraction[T](num: T): Fraction[T]
  Source   Edit
proc inv[T](x: Fraction[T]): Fraction[T]
  Source   Edit
proc isNaN(x: Fraction): bool
  Source   Edit
proc pow[T](x: Fraction[T]; n: int): Fraction[T]
  Source   Edit
proc reduce[T](self: var Fraction[T])
  Source   Edit
proc toFloat[T](x: Fraction[T]): float
  Source   Edit