- KWMETH(primep, "X.primep(rng = rand) -> true/false if X is prime")
- KWMETH(tostring, "X.tostring(radix = 10) -> STR")
- KWMETH(storel, "X.storel(len = -1) -> little-endian bytes")
- KWMETH(storeb, "X.storeb(len = -1) -> big-endian bytes")
- KWMETH(storel2c,
- "X.storel2c(len = -1) -> little-endian bytes, two's complement")
- KWMETH(storeb2c,
- "X.storeb2c(len = -1) -> big-endian bytes, two's complement")
- METH (tobuf, "X.tobuf() -> buffer format")
+ METH (leastcongruent, "X.leastcongruent(B, M) -> "
+ "smallest Z >= B with Z == X (mod M)")
+ KWMETH(primep, "X.primep([rng = rand]) -> X is prime?")
+ KWMETH(tostring, "X.tostring([radix = 10]) -> STR")
+ KWMETH(storel, "X.storel([len = -1]) -> little-endian bytes")
+ KWMETH(storeb, "X.storeb([len = -1]) -> big-endian bytes")
+ KWMETH(storel2c, "X.storel2c([len = -1]) -> "
+ "little-endian bytes, two's complement")
+ KWMETH(storeb2c, "X.storeb2c([len = -1]) -> "
+ "big-endian bytes, two's complement")
+ NAMETH(tobuf, "X.tobuf() -> buffer format")
+ KWSMTH(fromstring, "fromstring(STR, [radix = 0]) -> (X, REST)\n"
+ " Parse STR as a large integer, according to RADIX. If RADIX is\n"
+ " zero, read a prefix from STR to decide radix: allow `0b' for binary,\n"
+ " `0' or `0o' for octal, `0x' for hex, or `R_' for other radix R.")
+ SMTH (factorial, "factorial(I) -> I!: compute factorial")
+ SMTH (fibonacci, "fibonacci(I) -> F(I): compute Fibonacci number")
+ SMTH (loadl, "loadl(STR) -> X: read little-endian bytes")
+ SMTH (loadb, "loadb(STR) -> X: read big-endian bytes")
+ SMTH (loadl2c, "loadl2c(STR) -> X: "
+ "read little-endian bytes, two's complement")
+ SMTH (loadb2c, "loadb2c(STR) -> X: "
+ "read big-endian bytes, two's complement")
+ SMTH (frombuf, "frombuf(STR) -> (X, REST): read buffer format")