lua-users home
lua-l archive

Re: lbc: nil returned while number divided by 0

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


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

AltStyle によって変換されたページ (->オリジナル) /