lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I've updated lqd, a high-precision mathematical library for Lua
providing about 64 decimal digits. It is based on qd:
        http://crd.lbl.gov/~dhbailey/mpdist/

lqd is available at
        http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lqd

Checksum and other data available at
       http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/release.txt

This release is self-contained: it contains the required qd source
files. It also sports a simplified Makefile with targets for macosx
and linux with -fPIC (which some people will appreciate!). I plan to
update my other libraries to use the same scheme.

Like all my code, lqd is in the public domain.
Enjoy. All feedback welcome.
--lhf

qd library:
 __add(x,y)              atan2(y,x)              pi
 __div(x,y)              atanh(x)                pow(x,y)
 __eq(x,y)               ceil(x)                 random()
 __idiv(x,y)             compare(x,y)            round(x)
 __le(x,y)               cos(x)                  sin(x)
 __lt(x,y)               cosh(x)                 sincos(x)
 __mod(x,y)              digits([n])             sincosh(x)
 __mul(x,y)              div(x,y)                sinh(x)
 __pow(x,y)              exp(x)                  sqr(x)
 __sub(x,y)              floor(x)                sqrt(x)
 __tostring(x)           idiv(x,y)               sub(x,y)
 __unm(x)                ipow(x,n)               tan(x)
 abs(x)                  iroot(x,n)              tanh(x)
 acos(x)                 log(x)                  tonumber(x)
 acosh(x)                log10(x)                tostring(x,[n])
 add(x,y)                mod(x,y)                trunc(x)
 asin(x)                 mul(x,y)                version
 asinh(x)                neg(x)
 atan(x)                 new(x)