float_to_list(X)

Themba Jonga themba.jonga@REDACTED
Wed May 5 19:30:12 CEST 2021


Many thanks to all for your prompt and useful responses to my email on the
above subject matter.

Regards
Themba Jonga

On Wed, 05 May 2021, 17:20 Themba Jonga, <themba.jonga@REDACTED> wrote:

> Hi All
>
> I have the following situation which I am trying to understand (screenshot
> below) ;
>
>    - The float N has a number of digits after the decimal point. However
>    when converted to a list N's value is reduced, albeit by a miniscule amount.
>    - The contrary is true for the float P which has its' value increased,
>    also by a tiny amount.
>
> Is there any way to obtain a float_to_list() result which is the exact
> same as the original float, where the float variable has an arbitrary
> number of decimal places?
>
> [image: image.png]
>
> I am teaching myself Erlang. However I have no formal coding training and
> I come from an accounting background.
>
> Regards
>
> *Themba Jonga*
>
>
>
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free.
> www.avg.com
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> <#m_2270170813906058502_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210505/20960fc3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 25128 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210505/20960fc3/attachment.png>


More information about the erlang-questions mailing list