NAME

Sidef::Types::Number::Quadratic

DESCRIPTION

This class implements ...

SYNOPSIS

var x = Quadratic(3, 4, 5)  # represents: 3 + 4*sqrt(5)
var y = Quadratic(6, 1, 2)  # represents: 6 + sqrt(2)

say x**10       #=> (29578174649, 13203129720, 5)
say y**10       #=> (253025888, 176008128, 2)

say x.powmod(100, 97)   #=> (83, 42, 5)
say y.powmod(100, 97)   #=> (83, 39, 2)

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, shift_left

<=>

a <=> b

Returns the

Aliases: cmp

==

a == b

Returns the

Aliases: eq

>

a > b

Returns the

Aliases: gt

>>

a >> b

Returns the

Aliases: rsft, shift_right

^

a ^ b

Returns the

Aliases: xor

|

a | b

Returns the

Aliases: or

a ≤ b

Returns the

Aliases: <=, le

a ≥ b

Returns the

Aliases: >=, ge

a

self.a

Returns the

Aliases: re, real

abs

x.abs

Returns the

b

self.b

Returns the

Aliases: im, imag

ceil

x.ceil

Returns the

conj

x.conj

Returns the

dump

x.dump

Returns the

eval

x.eval(v)

Returns the

float

x.float

Returns the

floor

x.floor

Returns the

inv

x.inv

Returns the

invmod

x.invmod(m)

Returns the

is_coprime

n.is_coprime(k)

Returns the

is_mone

x.is_mone

Returns the

is_one

x.is_one

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

norm

x.norm

Returns the

parts

self.parts

Returns the

powmod

x.powmod(n, m)

Returns the

pretty

x.pretty

Returns the

Aliases: stringify

reals

self.reals

Returns the

round

x.round(r)

Returns the

sgn

x.sgn

Returns the

sqr

x.sqr

Returns the

to_c

x.to_c

Returns the

Aliases: to_n

to_s

x.to_s

Returns the

w

self.w

Returns the

Aliases: order