Sidef::Types::Number::Number
The Number class implements support for numerical operations, supporting integers, rationals, floating-points and complex numbers at arbitrary precision.
Number
This class also implements many useful mathematical methods, from basic arithmetical operations, to advanced number-theoretic functions, including primality testing and prime factorization methods.
var a = Num(string) var b = Number(string, base)
Inherits methods from:
* Sidef::Object::Object
n!
Factorial of n. (1*2*3*...*n)
n
1*2*3*...*n
Aliases: fac, factorial
n!!
Double-factorial of n.
Aliases: dfac, dfactorial, double_factorial
n % k
Remainder of n/k.
n/k
Aliases: mod
n %% k
Returns true if n is divisible by k. False otherwise.
k
Aliases: is_div
a & b
Bitwise AND operation.
Aliases: and
a * b
Multiplication of a and b.
a
b
Aliases: mul
a**b
Exponentiation: a to power b.
Aliases: pow
a + b
Addition of a and b.
Aliases: add
n.inc
Increment n by 1 and return the result.
1
Aliases: inc
a - b
Subtraction of a and b.
Aliases: sub
n.dec
Decrement n by 1 and return the result.
Aliases: dec
a .. b
Create an inclusive-inclusive RangeNum object, from a to b.
RangeNum
Equivalent with:
RangeNum(a, b)
Aliases: to, upto
a ..^ b
Create an inclusive-exclusive RangeNum object, from a to b-1.
b-1
RangeNum(a, b-1)
Aliases: xto, xupto
a / b
Division of a by b.
Aliases: ÷, div
a // b
Integer division of a and b.
Aliases: idiv
a : b
Create a new complex number.
Complex(a, b)
Aliases: pair
a < b
Returns true if a is less than b.
Aliases: lt
a << b
Bitwise left-shift, equivalent with (assuming a and b are integers):
int(a * 2**b)
Aliases: lsft, shift_left
a <=> b
Comparison of a with b. Returns -1 if a is less than b, 0 if a and b are equal and +1 if a is greater than b.
-1
0
+1
Aliases: cmp
approx_cmp(a, b) approx_cmp(a, b, k)
Approximate comparison of a and b.
a.round(k) <=> b.round(k)
When k is omitted, it uses the default floating-point precision to deduce k.
a == b
Equality check. Returns true if a and b are equal.
Aliases: eq
a > b
Returns true if a is greater than b. False otherwise.
Aliases: gt
a >> b
Bitwise right-shift, equivalent with (assuming a and b are integers):
int(a / 2**b)
Aliases: rsft, shift_right
a ^ b
Bitwise XOR operation.
Aliases: xor
a ^.. b
Creates a reversed exclusive-inclusive RangeNum object, from a-1 down to b.
a-1
RangeNum(a-1, b, -1)
Aliases: xdownto
Num.C Num.catalan_G
Returns the Catalan constant: 0.915965594177...
Aliases: catalan_G
Number.Y() -> Obj
Return the
Aliases: γ, euler_gamma
Obj | Obj -> Obj
Aliases: or
Obj ~ Obj -> Obj
Aliases: not
Number.Γ() -> Obj
Aliases: gamma
Number.δ() -> Obj
Aliases: kronecker_delta
Number.ζ() -> Obj
Aliases: zeta
Number.η() -> Obj
Aliases: eta
Number.μ() -> Obj
Aliases: mu, mobius, möbius, moebius
Number.Π() -> Obj
Aliases: prod
Number.π() -> Obj
Aliases: pi
Number.Σ() -> Obj
Aliases: sum
Number.σ() -> Obj
Aliases: sigma
Number.τ() -> Obj
Aliases: tau
Number.φ() -> Obj
Aliases: phi
Number.Ψ() -> Obj
Aliases: digamma
Number.Ω() -> Obj
Aliases: big_omega, bigomega, prime_power_sigma0
Number.ω() -> Obj
Aliases: omega, prime_sigma0, prime_power_usigma0
Obj ≅ Obj -> Obj
Aliases: =~=, approx_eq
Obj ≠ Obj -> Obj
Aliases: !=, ne
Obj ≤ Obj -> Obj
Aliases: <=, le
Obj ≥ Obj -> Obj
Aliases: >=, ge
n.abs
Absolute value of n.
Number.abundancy() -> Obj
Aliases: abundancy_index
Number.acmp() -> Obj
n.acos
Inverse cosine of n in radians.
n.acosh
Inverse hyperbolic cosine of n.
n.acot
Inverse cotangent of n in radians.
n.acoth
Inverse hyperbolic cotangent of n.
n.acsc
Inverse cosecant of n in radians.
n.acsch
Inverse hyperbolic cosecant of n.
agm(a, b)
Arithmetic-geometric mean of a and b.
x.ai Ai(x)
Airy function of the first kind: Ai(x).
Ai(x)
Aliases: airy
Number.all_composite() -> Obj
Number.all_prime() -> Obj
approx_ge(a, b) approx_ge(a, b, k)
True if a is approximately greater than or equal to b.
a.round(k) >= b.round(k)
approx_gt(a, b) approx_gt(a, b, k)
True if a is approximately greater than b.
a.round(k) > b.round(k)
approx_le(a, b) approx_le(a, b, k)
True if a is approximately less than or equal to b.
a.round(k) <= b.round(k)
approx_lt(a, b) approx_lt(a, b, k)
True if a is approximately less than b.
a.round(k) < b.round(k)
approx_ne(a, b) approx_ne(a, b, k)
True if a is approximately different than b.
a.round(k) != b.round(k)
n.as_bin
Returns a String with the binary representation of n.
String
Example:
say 42.as_bin # "101011"
n.as_dec n.as_dec(k)
Given a rational number n, it returns its decimal expansion as a String object, expanded at k decimal places.
say (1/17 -> as_dec(10)) # 0.05882352941 say (1/17 -> as_dec(30)) # 0.0588235294117647058823529411765
Aliases: as_float
n.asec
Inverse secant of n in radians.
n.asech
Inverse hyperbolic secant of n.
n.as_frac n.as_frac(base)
String-representation of n as fraction.
say 24.as_frac # 24/1 say bernoulli(10).as_frac # 5/66 say bernoulli(12).as_frac(36) # -j7/23u
If n is an integer, it uses 1 for the denominator.
n.as_hex
Returns a String representing the integer part of n in hexadecimal (base 16).
say 42.as_hex # "2a"
Returns nil when n cannot be converted to an integer.
nil
n.asin
Inverse sine of n in radians.
n.asinh
Inverse hyperbolic sine of n.
n.as_int n.as_int(base)
Returns a String representing the integer part of n in a given base, where the base must be between 2 and 62.
When the base is omitted, it defaults to base 10.
say 255.as_int # "255" say 255.as_int(16) # "ff"
n.as_oct
Returns a String representing the integer part of n in octal (base 8).
say 42.as_oct # 52
n.as_rat n.as_rat(base)
Returns a rational string-representation of n in a given base, where the base must be between 2 and 62.
say as_rat(42) # "42" say as_rat(2/4) # "1/2" say as_rat(255, 16) # "ff"
Returns nil when n cannot be converted to a rational number.
n.atan
Inverse tangent of n in radians.
atan2(a, b)
Four-quadrant inverse tangent of a and b.
n.atanh
Inverse hyperbolic tangent of n.
n.base(b)
Returns a String-representation of n in a given base b, which must be between 2 and 62.
Aliases: in_base
n.bell
Returns the n-th Bell number.
Aliases: bell_number
n.bern bernoulli(n) bernoulli(n, x)
Returns the n-th Bernoulli number. When an additional argument is provided, it returns the n-th Bernoulli polynomial.
say bernoulli(10).as_rat # B_10 = 5/66 say bernoulli(10, 2).as_rat # B_10(2) = 665/66
Aliases: bernfrac, bernoulli, bernoulli_number
bernoulli_polynomial(n, x)
Returns the n-th Bernoulli polynomial: B_n(x).
B_n(x)
n.bernreal
Return an approximation to the n-th Bernoulli number as a floating-point number.
bessel_j(x, n)
First order Bessel function: J_n(x).
J_n(x)
bessel_y(x, n)
Second order Bessel function: Y_n(x).
Y_n(x)
beta(a, b)
The beta function (also called the Euler integral of the first kind).
Defined as:
beta(a, b) = gamma(a)*gamma(b) / gamma(a+b)
n.bit(k) n.getbit(k)
Returns 1 if bit k of n is set, and 0 if it is not set.
Return nil when n cannot be truncated to an integer or when k is negative.
say getbit(0b1001, 0) # 1 say getbit(0b1000, 0) # 0
Aliases: getbit, testbit
Number.bits() -> Obj
n.bit_scan0 n.bit_scan0(k)
Scan n, starting from bit index k, towards more significant bits, until a 0-bit is found.
When k is omitted, k=0 is assumed.
k=0
Returns nil if n cannot be truncated to an integer or if k is negative.
n.bit_scan1 n.bit_scan1(k)
Scan n, starting from bit index k, towards more significant bits, until a 1-bit is found.
bsearch(n, {...}) bsearch(a, b, {...})
Binary search from to 0 to n, or from a to b, which can be any arbitrary large integers.
The last argument is a block which does the comparisons.
This function finds a value k such that f(k) = 0. Returns nil otherwise.
say bsearch(20, {|k| k*k <=> 49 }) #=> 7 (7*7 = 49) say bsearch(3, 1000, {|k| k**k <=> 3125 }) #=> 5 (5**5 = 3125)
bsearch_ge(n, {...}) bsearch_ge(a, b, {...})
This function finds a value k such that f(k-1) < 0 and f(k) >= 0. Returns nil otherwise.
bsearch_ge(1e6, { .exp <=> 1e+9 }) # 21 (exp( 21) >= 1e+9) bsearch_ge(-1e6, 1e6, { .exp <=> 1e-9 }) # -20 (exp(-20) >= 1e-9)
bsearch_le(n, {...}) bsearch_le(a, b, {...})
This function finds a value k such that f(k) <= 0 and f(k+1) > 0. Returns nil otherwise.
bsearch_le(1e6, { .exp <=> 1e+9 }) # 20 (exp( 20) <= 1e+9) bsearch_le(-1e6, 1e6, { .exp <=> 1e-9 }) # -21 (exp(-21) <= 1e-9)
Number.bsearch_max() -> Obj
Number.bsearch_min() -> Obj
Number.bsearch_solve() -> Obj
Aliases: bsearch_inverse
Number.by() -> Obj
Aliases: first
Number.cadd() -> Obj
Aliases: complex_add
n.catalan n.catalan(k)
Returns the n-th Catalan number.
If two arguments are provided, it returns the C(n,k) entry in Catalan's triangle.
C(n,k)
n.cbrt
Cube root of n.
Number.cdiv() -> Obj
Aliases: complex_div
n.ceil
Round n towards positive Infinity.
Aliases: ceiling
n.cfrac n.cfrac(k)
Compute k terms of the simple continued-fraction expansion of n.
say sqrt(12).cfrac(6) # [3, 2, 6, 2, 6, 2, 6]
Can also be used to compute very good rational approximations to a given real number:
say Num.pi.cfrac(10).flip.reduce{|a,b| b + 1/a }.as_rat # 4272943/1360120
Aliases: as_cfrac
chebyshevT(n, x)
Compute the Chebyshev polynomials of the first kind: T_n(x), where n must be a native integer.
T_n(x)
T(0, x) = 1 T(1, x) = x T(n, x) = 2*x*T(n-1, x) - T(n-2, x)
Aliases: chebyshevt, chebyshevT
chebyshevU(n, x)
Compute the Chebyshev polynomials of the second kind: U_n(x), where n must be a native integer.
U_n(x)
U(0, x) = 1 U(1, x) = 2*x U(n, x) = 2*x*U(n-1, x) - U(n-2, x)
Aliases: chebyshevu, chebyshevU
n.chr
Convert the integer n into a character.
say 97.chr # "a" say 9786.chr # "☺"
Number.cinv() -> Obj
Aliases: complex_inv
Number.cinvmod() -> Obj
Aliases: complex_invmod
Number.circular_permutations() -> Obj
Number.cis() -> Obj
Number.clearbit() -> Obj
Number.cmod() -> Obj
Aliases: complex_mod
Number.cmul() -> Obj
Aliases: complex_mul
Number.combinations() -> Obj
Number.combinations_with_repetition() -> Obj
Number.commify() -> Obj
Number.complex() -> Obj
Number.complex_cmp() -> Obj
Number.complex_ipow() -> Obj
Number.composite() -> Obj
Aliases: nth_composite
Number.composite_count() -> Obj
Number.conj() -> Obj
Aliases: conjug, conjugate
Number.consecutive_lcm() -> Obj
Aliases: consecutive_integer_lcm
Number.convergents() -> Obj
Number.cos() -> Obj
Number.cosh() -> Obj
Number.cot() -> Obj
Number.coth() -> Obj
Number.cpow() -> Obj
Aliases: complex_pow
Number.cpowmod() -> Obj
Aliases: complex_powmod
Number.csc() -> Obj
Number.csch() -> Obj
Number.csub() -> Obj
Aliases: complex_sub
Number.cyclotomic() -> Obj
Aliases: cyclotomic_polynomial
Number.dconv() -> Obj
Aliases: dirichlet_convolution
Number.de() -> Obj
Aliases: denominator
Number.defs() -> Obj
Number.deg2rad() -> Obj
Number.derangements() -> Obj
Aliases: complete_permutations
Number.derivative() -> Obj
Aliases: arithmetic_derivative
Number.digit() -> Obj
Number.digits() -> Obj
Number.digits2num() -> Obj
Aliases: from_digits
Number.digits_sum() -> Obj
Aliases: sum_digits, sumdigits
Number.dirichlet_hyperbola() -> Obj
Number.divides() -> Obj
Number.divisor_map() -> Obj
Number.divisor_prod() -> Obj
Aliases: divisors_prod
Number.divisors() -> Obj
Number.divisor_sum() -> Obj
Aliases: divisors_sum
Number.divmod() -> Obj
Number.downto() -> Obj
Number.dump() -> Obj
Number.e() -> Obj
Number.each_prime() -> Obj
Aliases: primes_each
Number.each_squarefree() -> Obj
Aliases: squarefree_each
Number.ecm_factor() -> Obj
Number.ei() -> Obj
Aliases: eint
Number.erf() -> Obj
Number.erfc() -> Obj
Number.euler() -> Obj
Aliases: euler_number
Number.euler_polynomial() -> Obj
Number.exp() -> Obj
Number.exp10() -> Obj
Number.exp2() -> Obj
Number.exp_mangoldt() -> Obj
Number.expmod() -> Obj
Aliases: powmod
Number.factor() -> Obj
Aliases: factors
Number.factor_exp() -> Obj
Aliases: factors_exp
Number.factorialmod() -> Obj
Number.factorial_power() -> Obj
Number.factorial_sum() -> Obj
Aliases: left_factorial
Number.factor_map() -> Obj
Number.factor_prod() -> Obj
Aliases: factors_prod
Number.factor_sum() -> Obj
Aliases: factors_sum
Number.falling_factorial() -> Obj
Number.faulhaber() -> Obj
Aliases: faulhaber_sum
Number.faulhaber_polynomial() -> Obj
Number.fermat_factor() -> Obj
Number.fib() -> Obj
Aliases: fibonacci
Number.fibmod() -> Obj
Aliases: fibonacci_mod, fibonaccimod
Number.flip() -> Obj
Aliases: reverse
Number.flipbit() -> Obj
Number.floor() -> Obj
Number.gcd() -> Obj
Number.gcdext() -> Obj
Number.geometric_sum() -> Obj
Number.gpf() -> Obj
Number.hamdist() -> Obj
Number.harm() -> Obj
Aliases: harmfrac, harmonic, harmonic_number
Number.harmreal() -> Obj
Number.hermite_H() -> Obj
Aliases: hermiteH, hermite_polynomial_H, hermite_polynomialH
Number.hermite_He() -> Obj
Aliases: hermiteHe, hermite_polynomial_He, hermite_polynomialHe
Number.holf_factor() -> Obj
Number.hyperfactorial() -> Obj
Number.hyperfactorial_ln() -> Obj
Aliases: lnhyperfactorial, hyperfactorial_log
Number.hypot() -> Obj
Number.i() -> Obj
Number.iadd() -> Obj
Number.icbrt() -> Obj
Number.ilog() -> Obj
Number.ilog10() -> Obj
Number.ilog2() -> Obj
Number.im() -> Obj
Aliases: imag, imaginary
Number.imod() -> Obj
Number.imul() -> Obj
Number.inf() -> Obj
Number.int() -> Obj
Aliases: to_i, to_int, trunc
Number.inv() -> Obj
Number.inverse_phi() -> Obj
Aliases: inverse_totient, inverse_euler_phi
Number.inverse_polygonal() -> Obj
Aliases: polygonal_inverse
Number.inverse_sigma() -> Obj
Number.inverse_totient_len() -> Obj
Number.invmod() -> Obj
Number.ipolygonal_root() -> Obj
Number.ipolygonal_root2() -> Obj
Number.ipow() -> Obj
Number.ipow10() -> Obj
Number.ipow2() -> Obj
Number.iquadratic_formula() -> Obj
Aliases: integer_quadratic_formula
Number.irand() -> Obj
Number.iroot() -> Obj
Number.irootrem() -> Obj
Number.is_abundant() -> Obj
Number.is_aks_prime() -> Obj
Number.is_almost_prime() -> Obj
Number.is_between() -> Obj
Number.is_bpsw_prime() -> Obj
Number.is_bruckman_lucas_pseudoprime() -> Obj
Number.is_carmichael() -> Obj
Number.is_chebyshev_pseudoprime() -> Obj
Number.is_complex() -> Obj
Number.is_composite() -> Obj
Number.is_congruent() -> Obj
Number.is_coprime() -> Obj
Number.is_cube() -> Obj
Number.is_cyclic() -> Obj
Number.is_ecpp_prime() -> Obj
Number.iseed() -> Obj
Number.is_euler_pseudoprime() -> Obj
Number.is_even() -> Obj
Number.is_fibonacci_pseudoprime() -> Obj
Number.is_frobenius_pseudoprime() -> Obj
Number.is_fundamental() -> Obj
Number.is_gaussian_prime() -> Obj
Number.is_imag() -> Obj
Number.is_inf() -> Obj
Number.is_int() -> Obj
Number.is_khashin_pseudoprime() -> Obj
Aliases: is_frobenius_khashin_pseudoprime
Number.is_lucas_carmichael() -> Obj
Number.is_lucas_pseudoprime() -> Obj
Number.is_mersenne_prime() -> Obj
Number.is_mone() -> Obj
Number.is_nan() -> Obj
Number.is_neg() -> Obj
Aliases: is_negative
Number.is_ninf() -> Obj
Number.is_nm1_prime() -> Obj
Aliases: is_nminus1_prime
Number.is_np1_prime() -> Obj
Aliases: is_nplus1_prime
Number.is_odd() -> Obj
Number.is_one() -> Obj
Number.is_palindrome() -> Obj
Aliases: is_palindromic
Number.is_pell_lucas_pseudoprime() -> Obj
Number.is_pell_pseudoprime() -> Obj
Number.is_perrin_pseudoprime() -> Obj
Number.is_plumb_pseudoprime() -> Obj
Aliases: is_euler_plumb_pseudoprime
Number.is_polygonal() -> Obj
Number.is_polygonal2() -> Obj
Number.is_pos() -> Obj
Aliases: is_positive
Number.is_pow() -> Obj
Aliases: is_power, is_perfect_power
Number.is_powerful() -> Obj
Number.is_power_of() -> Obj
Number.is_prime() -> Obj
Number.is_prime_power() -> Obj
Number.is_primitive_root() -> Obj
Number.is_prob_prime() -> Obj
Number.is_prob_squarefree() -> Obj
Number.is_prov_prime() -> Obj
Aliases: is_provable_prime
Number.is_pseudoprime() -> Obj
Aliases: is_fermat_pseudoprime
Number.isqrt() -> Obj
Number.isqrtrem() -> Obj
Number.is_rat() -> Obj
Number.is_real() -> Obj
Number.is_rough() -> Obj
Number.is_safe_prime() -> Obj
Number.is_semiprime() -> Obj
Number.is_smooth() -> Obj
Number.is_smooth_over_prod() -> Obj
Number.is_sqr() -> Obj
Aliases: is_square, is_perfect_square
Number.is_square_free() -> Obj
Aliases: is_squarefree
Number.is_stronger_lucas_pseudoprime() -> Obj
Aliases: is_extra_strong_lucas_pseudoprime
Number.is_strong_fibonacci_pseudoprime() -> Obj
Number.is_strongish_lucas_pseudoprime() -> Obj
Number.is_strong_lucas_pseudoprime() -> Obj
Number.is_strong_pseudoprime() -> Obj
Aliases: is_strong_fermat_pseudoprime
Number.is_super_pseudoprime() -> Obj
Number.is_totient() -> Obj
Number.isub() -> Obj
Number.is_underwood_pseudoprime() -> Obj
Aliases: is_frobenius_underwood_pseudoprime
Number.is_zero() -> Obj
Number.jacobi() -> Obj
Number.jordan_totient() -> Obj
Number.kronecker() -> Obj
Number.laguerre() -> Obj
Aliases: laguerreL, laguerre_polynomial
lambda(n)
Carmichael lambda function: λ(n), defined as the smallest positive integer m such that:
λ(n)
m
aᵐ ≡ 1 (mod n)
for every integer a between 1 and n that is coprime to n.
Alias: carmichael_lambda.
Number.lambert_w() -> Obj
Number.lcm() -> Obj
Number.legendre() -> Obj
Number.legendre_P() -> Obj
Aliases: legendrep, legendreP, legendre_polynomial
Number.len() -> Obj
Aliases: size, length
Number.lgamma() -> Obj
Aliases: gamma_abs_log
Number.lgrt() -> Obj
Number.li() -> Obj
Number.li2() -> Obj
Number.liouville() -> Obj
Number.liouville_sum() -> Obj
Number.ln() -> Obj
Number.ln2() -> Obj
Number.lnbern() -> Obj
Aliases: bern_log, lnbernreal, bernoulli_log
Number.lngamma() -> Obj
Aliases: gamma_log
Number.lnsuperfactorial() -> Obj
Aliases: superfactorial_ln, superfactorial_log
Number.log() -> Obj
Number.log10() -> Obj
Number.log2() -> Obj
Number.logarithmic_derivative() -> Obj
Number.lpf() -> Obj
Number.lsb() -> Obj
Number.lucas() -> Obj
Number.lucas_mod() -> Obj
Aliases: lucasmod
Number.lucas_U() -> Obj
Aliases: lucasu, lucasU
Number.lucasumod() -> Obj
Aliases: lucasUmod
Number.lucasuvmod() -> Obj
Aliases: lucasUVmod
Number.lucas_V() -> Obj
Aliases: lucasv, lucasV
Number.lucasvmod() -> Obj
Aliases: lucasVmod
Number.make_coprime() -> Obj
Number.mangoldt() -> Obj
Number.max() -> Obj
Number.mertens() -> Obj
Number.mfac() -> Obj
Aliases: mfactorial, multi_factorial
Number.miller_rabin_random() -> Obj
Number.min() -> Obj
Number.mone() -> Obj
Number.motzkin() -> Obj
Number.msb() -> Obj
Number.multinomial() -> Obj
Number.nan() -> Obj
Number.nd() -> Obj
Aliases: rd, st, th
Number.neg() -> Obj
Number.new() -> Obj
Aliases: call
Number.next_composite() -> Obj
Number.next_palindrome() -> Obj
Number.next_pow() -> Obj
Aliases: next_power
Number.next_pow2() -> Obj
Aliases: next_power2
Number.next_prime() -> Obj
Number.next_twin_prime() -> Obj
Number.ninf() -> Obj
Number.nok() -> Obj
Aliases: binomial
Number.norm() -> Obj
Number.nu() -> Obj
Aliases: numerator
Number.nude() -> Obj
Number.num2perm() -> Obj
Number.numify() -> Obj
Number.of() -> Obj
Number.one() -> Obj
Number.partitions() -> Obj
Aliases: number_of_partitions
Number.pbrent_factor() -> Obj
Number.perfect_power() -> Obj
Number.perfect_root() -> Obj
Number.permutations() -> Obj
Number.pi_k() -> Obj
Aliases: k_prime_count, almost_primepi, almost_prime_count
Number.pm1_factor() -> Obj
Aliases: pminus1_factor
Number.pn_primes() -> Obj
Number.pn_primorial() -> Obj
Number.polygonal() -> Obj
Number.polygonal_root() -> Obj
Number.polygonal_root2() -> Obj
Number.polymod() -> Obj
Number.popcount() -> Obj
Aliases: hammingweight
Number.power_count() -> Obj
Aliases: perfect_power_count
Number.powerful() -> Obj
Number.powerful_count() -> Obj
Number.pp1_factor() -> Obj
Aliases: pplus1_factor
Number.prev_prime() -> Obj
Number.prho_factor() -> Obj
Number.primality_pretest() -> Obj
Number.prime() -> Obj
Aliases: nth_prime
Number.prime_divisors() -> Obj
Number.primepi() -> Obj
Aliases: prime_count
Number.primepi_lower() -> Obj
Aliases: prime_count_lower
Number.primepi_upper() -> Obj
Aliases: prime_count_upper
Number.prime_power() -> Obj
Number.prime_power_count() -> Obj
Number.prime_power_divisors() -> Obj
Number.prime_power_sigma() -> Obj
Number.prime_power_udivisors() -> Obj
Aliases: prime_power_unitary_divisors, unitary_prime_power_divisors
Number.prime_power_usigma() -> Obj
Number.prime_root() -> Obj
Number.primes() -> Obj
Number.prime_sigma() -> Obj
Number.primes_sum() -> Obj
Aliases: sum_primes
Number.prime_udivisors() -> Obj
Aliases: prime_unitary_divisors, unitary_prime_divisors
Number.prime_usigma() -> Obj
Number.prime_usigma0() -> Obj
Number.primitive_part() -> Obj
Number.primorial() -> Obj
Number.primorial_deflation() -> Obj
Number.primorial_inflation() -> Obj
Number.psi() -> Obj
Aliases: dedekind_psi
Number.qs_factor() -> Obj
Number.quadratic_formula() -> Obj
Number.rad() -> Obj
Number.rad2deg() -> Obj
Number.ramanujan_sum() -> Obj
Number.ramanujan_tau() -> Obj
Number.rand() -> Obj
Number.random_bytes() -> Obj
Number.random_maurer_nbit_prime() -> Obj
Aliases: random_nbit_maurer_prime
Number.random_nbit_prime() -> Obj
Number.random_nbit_strong_prime() -> Obj
Aliases: random_strong_nbit_prime
Number.random_ndigit_prime() -> Obj
Number.random_prime() -> Obj
Number.random_safe_prime() -> Obj
Number.random_string() -> Obj
Number.range() -> Obj
Number.rat() -> Obj
Aliases: to_r, to_rat
Number.rat_approx() -> Obj
Number.re() -> Obj
Aliases: real
Number.reals() -> Obj
Number.remdiv() -> Obj
Aliases: remove
Number.rising_factorial() -> Obj
Number.root() -> Obj
Number.rough_count() -> Obj
Number.round() -> Obj
Aliases: roundf
Number.run() -> Obj
Number.sec() -> Obj
Number.secant_number() -> Obj
Number.sech() -> Obj
Number.seed() -> Obj
Number.semiprime() -> Obj
Aliases: nth_semiprime
Number.semiprime_count() -> Obj
Number.setbit() -> Obj
Number.sgn() -> Obj
Aliases: sign
Number.sigma0() -> Obj
Number.sin() -> Obj
Number.sin_cos() -> Obj
Number.sinh() -> Obj
Number.smooth_count() -> Obj
Number.solve_pell() -> Obj
Number.sopfr() -> Obj
Number.sqr() -> Obj
Number.sqrt() -> Obj
Number.sqrt_cfrac() -> Obj
Number.sqrt_cfrac_period() -> Obj
Number.sqrt_cfrac_period_len() -> Obj
Number.sqrtmod() -> Obj
Number.square_divisors() -> Obj
Number.squarefree() -> Obj
Number.square_free_count() -> Obj
Aliases: squarefree_count
Number.squarefree_divisors() -> Obj
Number.squarefree_sigma() -> Obj
Number.squarefree_udivisors() -> Obj
Aliases: squarefree_unitary_divisors, unitary_squarefree_divisors
Number.squarefree_usigma() -> Obj
Number.squarefree_usigma0() -> Obj
Number.square_sigma() -> Obj
Number.square_sigma0() -> Obj
Number.square_udivisors() -> Obj
Aliases: square_unitary_divisors, unitary_square_divisors
Number.square_usigma() -> Obj
Number.square_usigma0() -> Obj
Number.squfof_factor() -> Obj
Number.stirling() -> Obj
Aliases: stirling1
Number.stirling2() -> Obj
Number.stirling3() -> Obj
Number.subfactorial() -> Obj
Number.subsets() -> Obj
Number.superfactorial() -> Obj
Number.tan() -> Obj
Number.tangent_number() -> Obj
Number.tanh() -> Obj
Number.times() -> Obj
Number.to_f() -> Obj
Aliases: float, to_float
Number.to_n() -> Obj
Aliases: to_num
Number.to_s() -> Obj
Aliases: to_str
Number.totient() -> Obj
Aliases: euler_phi, eulerphi, euler_totient
Number.trial_factor() -> Obj
Number.tuples() -> Obj
Aliases: variations
Number.tuples_with_repetition() -> Obj
Aliases: variations_with_repetition
Number.udivisors() -> Obj
Aliases: unitary_divisors
Number.uphi() -> Obj
Number.usigma() -> Obj
Number.usigma0() -> Obj
Aliases: squarefree_sigma0
Number.valuation() -> Obj
Number.zero() -> Obj
Number.znorder() -> Obj
Number.znprimroot() -> Obj
To install Sidef, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sidef
CPAN shell
perl -MCPAN -e shell install Sidef
For more information on module installation, please visit the detailed CPAN module installation guide.