pre>.Q.f[x;y]
Where
x is an int atomy is a numeric atomreturns y as a string formatted as a float to x decimal places.
Because of the limits of precision in a double, for y above 1e13 or the limit set by \P,
formats in scientific notation.
q)\P 0
q).Q.f[2;]each 9.996 34.3445 7817047037.90 781704703567.90 -.02 9.996 -0.0001
"10.00"
"34.34"
"7817047037.90"
"781704703567.90"
"-0.02"
"10.00"
"-0.00"
The 1e13 limit is dependent on x. The maximum then becomes y*10 xexp x and
that value must be less than 1e17 – otherwise you'll see sci notation or overflow.
q)10 xlog 0Wj-1
18.964889726830812