lua-users home
lua-l archive

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


> On Thu, May 13, 2010 at 11:51 PM, Luiz Henrique de Figueiredo
> <lhf@tecgraf.puc-rio.br> wrote:
> >   if (bc_divide(a,b,&c,DIGITS)!=0) lua_pushnumber(L,1/0); else
> 
> This does not work in my computer, 1/0 evaluates at runtime and cause
> floating point exception.

I'm sorry, I should have written it as 1.0/0.0. Please try it.

> Is this the official way to push the "inf" into stack?

Not in ANSI C (C89). But you can try exp(1000).