TODO (1598B)

1 GMP has mpz_divexact(q,n,d), we should have zdiv_exact(q,n,d). 2 It uses optimised division algorithm that requires that d|n. 3 4 Add zsets_radix 5 Add zstr_radix 6 7 Can zmodpowu and zmodpow be improved using some other algorithm? 8 Is it worth implementing precomputed optimal 9 addition-chain exponentiation in zpowu? 10 11 Test big endian 12 Test always having .used > 0 for zero 13 Test negative/non-negative instead of sign 14 Test long .sign 15 Test always having .chars % 4 == 0 16 Test reusing objects in the temp-stack 17 18 Test optimisation of zmul: 19 bc = [(Hb * Hc) << (m2 << 1)] 20 + [(Hb * Hc) << m2] 21 - [(Hb - Lb)(Hc - Lc) << m2] 22 + [(Lb * Lc) << m2] 23 + (Lb * Lc) 24 25 Would zmul be faster if we split only one of the 26 factors until they are both approximately the same 27 size? 28 29 Add entropy test for zrand. 30 31 Should zmodpowu, zmodpow, zmodmul, and zmodsqr be removed? 32 I need to research how important these are. 33 They are important for cryptography, but we do not care about that. 34 They are important for discrete/abstract mathematics, but bignum probably isn't in those cases? 35 36 Add CPU-warmup loop to benchmarks. 37 If ondemand scaling is available but not set, set it. 38 If the current frequency is not the minimum, run a 39 catch-fire loop until the CPU is throttled to the 40 minimum frequency. 41 This loop shall be done after help variables have 42 been assigned values, as this can help the warmup. 43 44 benchmark with worst case, average case, and best case input. 45 46 zadd, zsub: benchmark both dense and sparse integers. 47 48 Feedback on error handling: 49 http://bbs.progrider.org/prog/read/1457215529/31,47