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

Re: set precision for a floating number



Joe Chiao wrote:
> 
> How can I set up the precision for a floating number with the format-out? I
> want to print out a floating number with one fixed decimal number.

In Functional Developer 2.0 you can use the following:

? float-to-string(3.141592, decimal-points: 1);
  $1 = "3.1"

float-to-string is in the functional-extensions library/module.



References: