lua-users home
lua-l archive

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


2016-09-29 11:15 GMT+02:00 Martin <eden_martin_fuhrspam@gmx.de>:
> On 16-09-26 09:41 AM, Ką Mykolas wrote:
>> I wonder if there is an easy way of checking if the number does not
>> exceed the precision cap BEFORE converting to some base...
> math.frexp. Second result is bits needed.
>
>> math.frexp(tonumber("5c7d528b825b090", 16))
> 0.7225745373914 59
>
>> math.frexp(tonumber("FFFF", 16))
> 0.99998474121094        16
>
> In lua5.3 this function is somewhy deprecated (but still available).

Somewhy --> search the list archives for the phrase "conceptual
integrity". E.g.

   http://lua-users.org/lists/lua-l/2014-07/msg00387.html