[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lbc: nil returned while number divided by 0
- From: Yuri Kozlov <kozlov.y@...>
- Date: Thu, 13 May 2010 21:05:38 +0400
2010/5/13 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> > require"bc"
>> > a = bc.number('1')
>> > =a/0
>> nil
>>
>> Why nil?
>> If lbc has redefined divide operator, it must returned inf too?
>
> bc functions return bc numbers but bc does not support inf or nan.
> So lbc returns nil on error, which is consisten with other Lua libraries.
Thanks for clarification.
--
Regards,
Yuri Kozlov