Category talk:Wren-gmp: Difference between revisions
Content deleted Content added
m →MPF or MPFR?: Changed number of transcendental functions wrapped to 21. |
→Source code (Wren): Bug fixes. |
||
Line 173: | Line 173: | ||
// Converts the current instance to: |
// Converts the current instance to: |
||
foreign toNum |
foreign toNum // a number |
||
foreign toString(b) |
foreign toString(b) // a base 'b' string |
||
toString { toString(10) } |
toString { toString(10) } // a base 10 string |
||
toMpq { Mpq. |
toMpq { Mpq.from(this) } // an Mpq object |
||
toMpf { Mpf. |
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 |
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() |