[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lbc: nil returned while number divided by 0
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 18 May 2010 06:59:33 -0300
> 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).