[m-users.] How to convert float to uint64?

Xin Wang dram.wang at gmail.com
Wed Jan 18 16:22:10 AEDT 2023


On 1/17/23, Julien Fischer <jfischer at opturion.com> wrote:
>
> Hi,
>
> On Tue, 17 Jan 2023, dram.wang at gmail.com wrote:
>
>> While uint64 can be converted to float using float.cast_from_uint64/1 in
>> Mercury, but I can not find a way to convert float to
>> uint64.
>>
>> Am I missing something?
>
> No, the float -> unit64 conversion is not currently supported in the
> stdandard library.
>
> Julien.
>

Ok, then I will follow M McDonough's suggestion and use foreign code
to deal with it.

Thanks,
Xin Wang


More information about the users mailing list