Re: float_to_list(X)
Themba Jonga <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <CAPVvff0Rv315kmAxfJJgvyBbVEW+fZAAVPKUS+jY3fNRyfhpjw@mail.gmail.com> |
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, <[email protected]> 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> >
image.png
(image/png, 24.5 KB) - not displayed