mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Make numerous improvements
- Python static hello world now 1.8mb - Python static fully loaded now 10mb - Python HTTPS client now uses MbedTLS - Python REPL now completes import stmts - Increase stack size for Python for now - Begin synthesizing posixpath and ntpath - Restore Python \N{UNICODE NAME} support - Restore Python NFKD symbol normalization - Add optimized code path for Intel SHA-NI - Get more Python unit tests passing faster - Get Python help() pagination working on NT - Python hashlib now supports MbedTLS PBKDF2 - Make memcpy/memmove/memcmp/bcmp/etc. faster - Add Mersenne Twister and Vigna to LIBC_RAND - Provide privileged __printf() for error code - Fix zipos opendir() so that it reports ENOTDIR - Add basic chmod() implementation for Windows NT - Add Cosmo's best functions to Python cosmo module - Pin function trace indent depth to that of caller - Show memory diagram on invalid access in MODE=dbg - Differentiate stack overflow on crash in MODE=dbg - Add stb_truetype and tools for analyzing font files - Upgrade to UNICODE 13 and reduce its binary footprint - COMPILE.COM now logs resource usage of build commands - Start implementing basic poll() support on bare metal - Set getauxval(AT_EXECFN) to GetModuleFileName() on NT - Add descriptions to strerror() in non-TINY build modes - Add COUNTBRANCH() macro to help with micro-optimizations - Make error / backtrace / asan / memory code more unbreakable - Add fast perfect C implementation of μ-Law and a-Law audio codecs - Make strtol() functions consistent with other libc implementations - Improve Linenoise implementation (see also github.com/jart/bestline) - COMPILE.COM now suppresses stdout/stderr of successful build commands
This commit is contained in:
parent
fa7b4f5bd1
commit
39bf41f4eb
806 changed files with 77494 additions and 63859 deletions
|
@ -44,8 +44,8 @@ Copyright 2008-2016 Stefan Krah\"");
|
|||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
|
||||
/* Bignum: Fast convolution using the Number Theoretic Transform. Used for
|
||||
the multiplication of very large coefficients. */
|
||||
/* Bignum: Fast convolution using the Number Theoretic Transform.
|
||||
Used for the multiplication of very large coefficients. */
|
||||
|
||||
|
||||
/* Convolute the data in c1 and c2. Result is in c1. */
|
||||
|
@ -54,17 +54,10 @@ fnt_convolute(mpd_uint_t *c1, mpd_uint_t *c2, mpd_size_t n, int modnum)
|
|||
{
|
||||
int (*fnt)(mpd_uint_t *, mpd_size_t, int);
|
||||
int (*inv_fnt)(mpd_uint_t *, mpd_size_t, int);
|
||||
#ifdef PPRO
|
||||
double dmod;
|
||||
uint32_t dinvmod[3];
|
||||
#endif
|
||||
mpd_uint_t n_inv, umod;
|
||||
mpd_size_t i;
|
||||
|
||||
|
||||
SETMODULUS(modnum);
|
||||
n_inv = POWMOD(n, (umod-2));
|
||||
|
||||
if (ispower2(n)) {
|
||||
if (n > SIX_STEP_THRESHOLD) {
|
||||
fnt = six_step_fnt;
|
||||
|
@ -79,7 +72,6 @@ fnt_convolute(mpd_uint_t *c1, mpd_uint_t *c2, mpd_size_t n, int modnum)
|
|||
fnt = four_step_fnt;
|
||||
inv_fnt = inv_four_step_fnt;
|
||||
}
|
||||
|
||||
if (!fnt(c1, n, modnum)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -95,7 +87,6 @@ fnt_convolute(mpd_uint_t *c1, mpd_uint_t *c2, mpd_size_t n, int modnum)
|
|||
c1[i] = x0;
|
||||
c1[i+1] = x1;
|
||||
}
|
||||
|
||||
if (!inv_fnt(c1, n, modnum)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -111,7 +102,6 @@ fnt_convolute(mpd_uint_t *c1, mpd_uint_t *c2, mpd_size_t n, int modnum)
|
|||
c1[i+2] = x2;
|
||||
c1[i+3] = x3;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -121,17 +111,10 @@ fnt_autoconvolute(mpd_uint_t *c1, mpd_size_t n, int modnum)
|
|||
{
|
||||
int (*fnt)(mpd_uint_t *, mpd_size_t, int);
|
||||
int (*inv_fnt)(mpd_uint_t *, mpd_size_t, int);
|
||||
#ifdef PPRO
|
||||
double dmod;
|
||||
uint32_t dinvmod[3];
|
||||
#endif
|
||||
mpd_uint_t n_inv, umod;
|
||||
mpd_size_t i;
|
||||
|
||||
|
||||
SETMODULUS(modnum);
|
||||
n_inv = POWMOD(n, (umod-2));
|
||||
|
||||
if (ispower2(n)) {
|
||||
if (n > SIX_STEP_THRESHOLD) {
|
||||
fnt = six_step_fnt;
|
||||
|
@ -146,7 +129,6 @@ fnt_autoconvolute(mpd_uint_t *c1, mpd_size_t n, int modnum)
|
|||
fnt = four_step_fnt;
|
||||
inv_fnt = inv_four_step_fnt;
|
||||
}
|
||||
|
||||
if (!fnt(c1, n, modnum)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -157,7 +139,6 @@ fnt_autoconvolute(mpd_uint_t *c1, mpd_size_t n, int modnum)
|
|||
c1[i] = x0;
|
||||
c1[i+1] = x1;
|
||||
}
|
||||
|
||||
if (!inv_fnt(c1, n, modnum)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -173,6 +154,5 @@ fnt_autoconvolute(mpd_uint_t *c1, mpd_size_t n, int modnum)
|
|||
c1[i+2] = x2;
|
||||
c1[i+3] = x3;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue