[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: complex module does not print zero
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 20 May 2016 09:14:35 +0200
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);