Package-level declarations

Properties

Link copied to clipboard
val Int.!: Int

Extension property to calculate the factorial of an integer.

Functions

Link copied to clipboard

Function to calculate the factorial of a number.

Link copied to clipboard
tailrec fun gcd(a: Int, b: Int): Int

Function to find the greatest common divisor (GCD) of two numbers.

Link copied to clipboard
infix fun Int.gcd(other: Int): Int

Computes the greatest common divisor (GCD) of two integers using the Euclidean algorithm.

Link copied to clipboard

Function to generate a list of Fibonacci numbers up to a given count.

Link copied to clipboard
infix fun Int.isDivisibleBy(other: Int): Boolean

Checks if the number is divisible by another number.

Link copied to clipboard

Function to check if a number is prime.

Link copied to clipboard
infix fun Int.lcm(other: Int): Int

Computes the least common multiple (LCM) of two integers.

Link copied to clipboard
infix fun <T : Comparable<T>> T.max(other: T): T

Returns the maximum of two comparable values.

Link copied to clipboard
infix fun <T : Comparable<T>> T.min(other: T): T

Returns the minimum of two comparable values.

Link copied to clipboard
operator fun Int.not(): Int

Computes the factorial of a non-negative integer.

Link copied to clipboard
infix fun <T : Number> T.pow(exponent: Int): <Error class: unknown class>

Computes the power of a number.

Link copied to clipboard
fun Int.trinum(): Int

Function to calculate the triangular value of a number.