Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 826667001f
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (27 sloc) 1.315 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
This code is extends the Lua math library with the functions available in C99.

To try the library, just edit Makefile to reflect your installation of Lua and
then run make. This will build the library and run a simple test. For detailed
installation instructions, see

There is no manual: see the summary below and a C99 reference manual, e.g.

Read also test.lua, which shows the library in action.

This code is hereby placed in the public domain.

Please send comments, suggestions, and bug reports to .


mathx library:
abs deg frexp log1p* random
acos erf* gamma* log2* randomseed
acosh* erfc* huge logb* remainder*
asin exp hypot* max rint*
asinh* exp2* infinity* min round*
atan expm1* isfinite* mod scalbn*
atan2 fdim* isinf* modf signbit*
atanh* floor isnan* nan* sin
cbrt* fma* isnormal* nearbyint* sinh
ceil fmax* ldexp nextafter* sqrt
copysign* fmin* lgamma* pi tan
cos fmod log pow tanh
cosh fpclassify* log10 rad trunc*

*added in mathx
Something went wrong with that request. Please try again.