NAME

Sidef::Types::Number::Fraction

DESCRIPTION

This class implements ...

SYNOPSIS

var a = Fraction(3, 4)
var b = Fraction(5, 7)

say a*b     #=> Fraction(15, 28)
say a+b     #=> Fraction(41, 28)

INHERITS

Inherits methods from:

* Sidef::Types::Number::Number

METHODS

!=

a != b

Returns the

Aliases: ne

%

a % b

Returns the

Aliases: mod

&

a & b

Returns the

Aliases: and

*

a * b

Returns the

Aliases: mul

**

a ** b

Returns the

Aliases: pow

+

a + b

Returns the

Aliases: add

++

a ++ b

Returns the

Aliases: inc

-

a - b

Returns the

Aliases: sub

--

a -- b

Returns the

Aliases: dec

/

a / b

Returns the

Aliases: ÷, div

<

a < b

Returns the

Aliases: lt

<<

a << b

Returns the

Aliases: lsft

<=>

a <=> b

Returns the

Aliases: cmp

==

a == b

Returns the

Aliases: eq

>

a > b

Returns the

Aliases: gt

>>

a >> b

Returns the

Aliases: rsft

^

a ^ b

Returns the

Aliases: xor

|

a | b

Returns the

Aliases: or

a ≤ b

Returns the

Aliases: <=, le

a ≥ b

Returns the

Aliases: >=, ge

ceil

x.ceil

Returns the

de

self.de

Returns the

Aliases: den, denominator

dump

x.dump

Returns the

eval

x.eval(v)

Returns the

floor

x.floor

Returns the

inv

x.inv

Returns the

invmod

x.invmod(n)

Returns the

is_mone

x.is_mone

Returns the

is_nan

x.is_nan

Returns the

is_one

x.is_one

Returns the

is_real

x.is_real

Returns the

is_zero

x.is_zero

Returns the

lift

x.lift

Returns the

neg

x.neg

Returns the

new

self.new

Returns the

Aliases: call

nu

self.nu

Returns the

Aliases: num, numerator

nude

self.nude

Returns the

parts

self.parts

Returns the

powmod

x.powmod(n, m)

Returns the

pretty

x.pretty

Returns the

Aliases: stringify

round

x.round

Returns the

sqr

x.sqr

Returns the

to_n

x.to_n

Returns the

to_s

x.to_s

Returns the

trunc

x.trunc

Returns the