Category talk:Wren-gmp: Difference between revisions

Content deleted Content added
PureFox (talk | contribs)
m →‎MPF or MPFR?: Changed number of transcendental functions wrapped to 21.
PureFox (talk | contribs)
Line 173: Line 173:


// Converts the current instance to:
// Converts the current instance to:
foreign toNum // a number
foreign toNum // a number
foreign toString(b) // a base 'b' string
foreign toString(b) // a base 'b' string
toString { toString(10) } // a base 10 string
toString { toString(10) } // a base 10 string
toMpq { Mpq.fromMpz(this) } // an Mpq object
toMpq { Mpq.from(this) } // an Mpq object
toMpf { Mpf.fromMpz(this) } // an Mpf object
toMpf { Mpf.from(this) } // an Mpf object


/* Methods which assign their result to the current instance ('this').
/* Methods which assign their result to the current instance ('this').
Line 456: Line 456:
// Returns Mpz.zero in the event of failure.
// Returns Mpz.zero in the event of failure.
static pollardRho(m, seed, c) {
static pollardRho(m, seed, c) {
if (m < 2) return 0
if (m < 2) return Mpz.zero
if (m is Num) m = Mpz.from(m)
if (m is Num) m = Mpz.from(m)
if (m.probPrime(15) > 0) return m.copy()
if (m.probPrime(15) > 0) return m.copy()