How can I get better precision in ChIPS output?
chips> 227.49334262014-0.0001363 227.493
For greater precision, use the S-Lang set_float_format function:
chips> 227.49334262014-0.0001363 227.493 chips> set_float_format("%g") chips> 227.49334262014-0.0001363 227.493 chips> set_float_format("%.6e") chips> 227.49334262014-0.0001363 2.274932e+02 chips> set_float_format("%.6f") chips> 227.49334262014-0.0001363 227.493206 chips> set_float_format("%.12f") chips> 227.49334262014-0.0001363 227.493206320140
Note that this will affect other numeric output - such as that produced by writeascii and print - e.g.
chips> set_float_format("%.12f") chips> print(23.0) 23.000000000000
Resetting "set_float_format("%f")" (the default) when you are finished may be useful.
For more information on the format specifier (e.g. "%.12f"), see "ahelp sprintf". There are also external webpages with more detailed information, such as the Association for Computing Machinery C Library Reference Guide.