A
Adam Warner
Hi all,
I'm used to ANSI Common Lisp implementations sanely printing single and
double floats. By sane I mean the printed decimal representation mimics
the underlying binary precision of the float. For example:
[1]> (coerce 2/3 'single-float)
0.6666667
[2]> (coerce 2/300 'single-float)
0.006666667
[3]> (coerce 2/3 'double-float)
0.6666666666666666d0
[4]> (coerce 2/300 'double-float)
0.006666666666666667d0
[5]> (coerce 2/30000 'double-float)
6.666666666666667d-5
Does C99 provide a method to print floats this way (apart from `f', `d'
etc. exponential markers)?
Regards,
Adam
I'm used to ANSI Common Lisp implementations sanely printing single and
double floats. By sane I mean the printed decimal representation mimics
the underlying binary precision of the float. For example:
[1]> (coerce 2/3 'single-float)
0.6666667
[2]> (coerce 2/300 'single-float)
0.006666667
[3]> (coerce 2/3 'double-float)
0.6666666666666666d0
[4]> (coerce 2/300 'double-float)
0.006666666666666667d0
[5]> (coerce 2/30000 'double-float)
6.666666666666667d-5
Does C99 provide a method to print floats this way (apart from `f', `d'
etc. exponential markers)?
Regards,
Adam