Hello everybody,
I have been learning haskell lately and I am trying to write a program that
at some point displays a float number to the screen.
The function I used to accomplish this was show :
putStr (show myFloat)
The problem is that show was displaying the number in scientific format,
like 1.5e-2 while I wanted it to show like 0.015 and also control the
number of decimal points.
After some search I found the function showGFloat but I can't use it the
way i used show because it returns (String -> String) and not String. I
can't seem to understand this ShowS type.
Could someone please help me with this by giving an example of how to
display a float?
Thanks in advance
Andreas Kalivas