cosmopolitan/libc/tinymath
Justine Tunney 8af197560e Improve Libc by making Python work even better
Actually Portable Python is now outperforming the Python binaries
that come bundled with Linux distros, at things like HTTP serving.
You can now have a fully featured Python install in just one .com
file that runs on six operating systems and is about 10mb in size.
With tuning, the tiniest is ~1mb. We've got most of the libraries
working, including pysqlite, and the repl now feels very pleasant.
The things you can't do quite yet are: threads and shared objects
but that can happen in the future, if the community falls in love
with this project and wants to see it developed further. Changes:

- Add siginterrupt()
- Add sqlite3 to Python
- Add issymlink() helper
- Make GetZipCdir() faster
- Add tgamma() and finite()
- Add legacy function lutimes()
- Add readlink() and realpath()
- Use heap allocations when appropriate
- Reorganize Python into two-stage build
- Save Lua / Python shell history to dotfile
- Integrate Python Lib embedding into linkage
- Make isregularfile() and isdirectory() go faster
- Make Python shell auto-completion work perfectly
- Make crash reports work better if changed directory
- Fix Python+NT open() / access() flag overflow error
- Disable Python tests relating to \N{LONG NAME} syntax
- Have Python REPL copyright() show all notice embeddings

The biggest technical challenge at the moment is working around
when Python tries to be too clever about filenames.
2021-08-18 22:16:23 -07:00
..
acos.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
acosf.S Add more math fixes 2021-03-06 11:44:40 -08:00
acosh.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
acoshf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
acoshl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
acosl.S Add more math fixes 2021-03-06 11:44:40 -08:00
asin.S Add more math fixes 2021-03-06 11:44:40 -08:00
asinf.S Add more math fixes 2021-03-06 11:44:40 -08:00
asinh.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
asinhf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
asinhl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
asinl.S Add more math fixes 2021-03-06 11:44:40 -08:00
atan.S Add more math fixes 2021-03-06 11:44:40 -08:00
atan2.c Add tests for the greatest of all libm functions 2021-03-06 12:59:35 -08:00
atan2f.c Add tests for the greatest of all libm functions 2021-03-06 12:59:35 -08:00
atan2l.S Add tests for the greatest of all libm functions 2021-03-06 12:59:35 -08:00
atanf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
atanh.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
atanhf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
atanhl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
atanl.S Add more math fixes 2021-03-06 11:44:40 -08:00
c2rangr.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cabs.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cabsf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cabsl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
carg.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cargf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cargl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cbrt.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cbrtc.c Add NES emulator 2020-07-02 13:46:08 -07:00
cbrtf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cbrtl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ceil.S Add more libm unit tests and fixes 2021-03-02 13:57:23 -08:00
ceilf.S Add more libm unit tests and fixes 2021-03-02 13:57:23 -08:00
ceill.S Add more libm unit tests and fixes 2021-03-02 13:57:23 -08:00
cimag.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cimagf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cimagl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
conj.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
conjf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
conjl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
copysign.S Make pow() conform to standard definition 2021-03-03 09:21:27 -08:00
copysignf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
copysignl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cos.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
cosf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cosh.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
coshf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
coshl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
cosl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cprojf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
cprojl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
creal.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
crealf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
creall.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
d2ld2.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
emod.h Make improvements 2020-12-01 03:43:40 -08:00
emodl.h Make improvements 2020-12-01 03:43:40 -08:00
erf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
erff.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
exp.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
exp2.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
exp2f.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
exp2l.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
exp10.S Make pow() conform to standard definition 2021-03-03 09:21:27 -08:00
exp10f.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
exp10l.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
expf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
expl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
expm1.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
expm1f.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
expm1l.S Fix issues revealed by ECMAScript test262 2021-04-10 17:15:35 -07:00
expo.internal.h Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
expo2.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
expo2f.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
f2ld2.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
fabs.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
fabsf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
fabsl.S Make pow() conform to standard definition 2021-03-03 09:21:27 -08:00
fdim.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
fdimf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
fdiml.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
feval.internal.h Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
finite.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
finitef.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
finitel.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
floor.S Add more libm unit tests and fixes 2021-03-02 13:57:23 -08:00
floorf.S Add more libm unit tests and fixes 2021-03-02 13:57:23 -08:00
floorl.S Add more libm unit tests and fixes 2021-03-02 13:57:23 -08:00
fma.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
fmax.c Remove sun musl fdlibm math library 2021-01-31 18:25:16 -08:00
fmaxf.c Remove sun musl fdlibm math library 2021-01-31 18:25:16 -08:00
fmaxl.c Remove sun musl fdlibm math library 2021-01-31 18:25:16 -08:00
fmin.c Remove sun musl fdlibm math library 2021-01-31 18:25:16 -08:00
fminf.c Remove sun musl fdlibm math library 2021-01-31 18:25:16 -08:00
fminl.c Remove sun musl fdlibm math library 2021-01-31 18:25:16 -08:00
fmod.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
fmodf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
fmodl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
frexp.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
frexpf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
frexpl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
fsum.c Introduce fsum() 2021-06-11 16:49:30 -07:00
fsumf.c Introduce fsum() 2021-06-11 16:49:30 -07:00
gamma.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
hypot.c Perform some code cleanup 2021-02-27 10:33:32 -08:00
hypotf.c Perform some code cleanup 2021-02-27 10:33:32 -08:00
hypotl.c Perform some code cleanup 2021-02-27 10:33:32 -08:00
ilogb.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ilogbf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ilogbl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
kcos.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
kernel.internal.h Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
ksin.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
ktan.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
ldexp.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ldexpf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ldexpl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ldshape.internal.h Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
log.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
log1p.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
log1pf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
log1pl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
log2.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
log2f.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
log2l.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
log10.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
log10f.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
log10l.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
logb.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
logbf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
logbl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
logf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
logl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
lrint.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
lrintf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
lrintl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
lround.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
lroundf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
lroundl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
modf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
modff.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
modfl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
nearbyint.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
nearbyintf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
nearbyintl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
nextafter.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
nextafterf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
nextafterl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
nexttoward.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
nexttowardf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
nexttowardl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
pow.S Add more math fixes 2021-03-06 11:44:40 -08:00
powf.S Add more math fixes 2021-03-06 11:44:40 -08:00
powfin.c Add more math fixes 2021-03-06 11:44:40 -08:00
powi.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
powif.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
powil.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
powl.c Fix issues revealed by ECMAScript test262 2021-04-10 17:15:35 -07:00
remainder.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
remainderf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
remainderl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
rempio2.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
rempio2large.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
remquo.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
remquof.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
remquol.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
rint.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
rintf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
rintl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
round.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
roundf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
roundl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
scalb.S Add more math fixes 2021-03-06 11:44:40 -08:00
scalbf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
scalbl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
signbit.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
signbitf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
signbitl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
signgam.c Add error and gamma functions 2021-03-02 11:58:00 -08:00
significand.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
significandf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
significandl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
sin.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
sincos.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
sincosf.S Add more math fixes 2021-03-06 11:44:40 -08:00
sincosl.S Add more math fixes 2021-03-06 11:44:40 -08:00
sinf.S Add more math fixes 2021-03-06 11:44:40 -08:00
sinh.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
sinhf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
sinhl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
sinl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
sqrt.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
sqrtf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
sqrtl.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
tan.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
tanf.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
tanh.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
tanhf.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
tanhl.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
tanl.S Add more math fixes 2021-03-06 11:44:40 -08:00
tgamma.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
tgammaf.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
tinymath.mk Make gdtoa less tunable (#104) 2021-03-07 16:41:59 -08:00
trunc.S Add more libm unit tests and fixes 2021-03-02 13:57:23 -08:00
truncf.S Add more libm unit tests and fixes 2021-03-02 13:57:23 -08:00
truncl.S Make pow() conform to standard definition 2021-03-03 09:21:27 -08:00