lua-users home
lua-l archive

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


Using module 'complex' built from

    http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/lcomplex.tar.gz

one finds

$ lua
Lua 5.3.3  Copyright (C) 1994-2016 Lua.org, PUC-Rio
> package.cpath = "./?.so"
> complex = require "complex"
> complex.version
complex number library for Lua 5.3 / Jun 2015
> complex.new()

>

This can be fixed in lcomplex.c as follows:

-       if (x!=0) lua_pushnumber(L,x); */
+       if (x!=0 || y==0) lua_pushnumber(L,x);