Category talk:Wren-i64: Difference between revisions

→‎Source code (Wren): Added U64.nextPrime method.
(Added multinomial and binomial methods to U64 class.)
(→‎Source code (Wren): Added U64.nextPrime method.)
Line 547:
}
return true
}
 
// Returns the next prime number greater than 'x'.
static nextPrime(x) {
if (!(x is U64)) x = from(x)
x = x.isEven ? x + one : x + two
while (true) {
if (isPrime(x)) return x
x = x + two
}
}
 
9,485

edits