Kone
0.0.0-dev-1
common
kone.numberTheory
/
com.lounres.kone.algebraic
/
Rational
Rational
class
Rational
Members
Members & Extensions
Constructors
Rational
Link copied to clipboard
constructor
(
numerator
:
Long
,
denominator
:
Long
)
constructor
(
numerator
:
Long
,
denominator
:
Int
)
constructor
(
numerator
:
Int
,
denominator
:
Long
)
constructor
(
numerator
:
Int
,
denominator
:
Int
)
constructor
(
numerator
:
Long
)
constructor
(
numerator
:
Int
)
Types
Companion
Link copied to clipboard
object
Companion
Properties
denominator
Link copied to clipboard
@
JvmField
val
denominator
:
Long
numerator
Link copied to clipboard
@
JvmField
val
numerator
:
Long
reciprocal
Link copied to clipboard
open
val
Rational
.
reciprocal
:
Rational
Functions
div
Link copied to clipboard
open
operator override
fun
Rational
.
div
(
other
:
Rational
)
:
Rational
open
operator override
fun
Rational
.
div
(
other
:
Int
)
:
Rational
open
operator override
fun
Rational
.
div
(
other
:
Long
)
:
Rational
eq
Link copied to clipboard
open
infix
fun
Rational
.
eq
(
other
:
Rational
)
:
Boolean
equals
Link copied to clipboard
open
operator override
fun
equals
(
other
:
Any
?
)
:
Boolean
equals
To
Link copied to clipboard
open
infix override
fun
Rational
.
equalsTo
(
other
:
Rational
)
:
Boolean
hash
Code
Link copied to clipboard
open
override
fun
hashCode
(
)
:
Int
is
Not
One
Link copied to clipboard
open
fun
Rational
.
isNotOne
(
)
:
Boolean
is
Not
Zero
Link copied to clipboard
open
fun
Rational
.
isNotZero
(
)
:
Boolean
is
One
Link copied to clipboard
open
override
fun
Rational
.
isOne
(
)
:
Boolean
is
Zero
Link copied to clipboard
open
override
fun
Rational
.
isZero
(
)
:
Boolean
minus
Link copied to clipboard
open
operator override
fun
Rational
.
minus
(
other
:
Rational
)
:
Rational
open
operator override
fun
Rational
.
minus
(
other
:
Int
)
:
Rational
open
operator override
fun
Rational
.
minus
(
other
:
Long
)
:
Rational
neq
Link copied to clipboard
open
infix
fun
Rational
.
neq
(
other
:
Rational
)
:
Boolean
not
Equals
To
Link copied to clipboard
open
infix
fun
Rational
.
notEqualsTo
(
other
:
Rational
)
:
Boolean
plus
Link copied to clipboard
open
operator override
fun
Rational
.
plus
(
other
:
Rational
)
:
Rational
open
operator override
fun
Rational
.
plus
(
other
:
Int
)
:
Rational
open
operator override
fun
Rational
.
plus
(
other
:
Long
)
:
Rational
pow
Link copied to clipboard
open
infix
fun
Rational
.
pow
(
exponent
:
Int
)
:
Rational
open
infix
fun
Rational
.
pow
(
exponent
:
Long
)
:
Rational
open
infix
fun
Rational
.
pow
(
exponent
:
UInt
)
:
Rational
open
infix
fun
Rational
.
pow
(
exponent
:
ULong
)
:
Rational
times
Link copied to clipboard
open
operator override
fun
Rational
.
times
(
other
:
Rational
)
:
Rational
open
operator override
fun
Rational
.
times
(
other
:
Int
)
:
Rational
open
operator override
fun
Rational
.
times
(
other
:
Long
)
:
Rational
to
String
Link copied to clipboard
open
override
fun
toString
(
)
:
String
unary
Minus
Link copied to clipboard
open
operator override
fun
Rational
.
unaryMinus
(
)
:
Rational
unary
Plus
Link copied to clipboard
open
operator
fun
Rational
.
unaryPlus
(
)
:
Rational