Skip to content
Prev 70779 / 398525 Next

Formatting numbers with a limited amount of digits consistently

On Tue, 2005-05-31 at 11:11 -0400, Duncan Murdoch wrote:
Duncan,

Just got back from a day long meeting.

You are indeed correct on the rounding here. If you look at how 18.15
appears when printed with more significant digits:
[1] 18.149999999999998579

That's what I get for trying to deal with floating point representation
issues first thing after a three day weekend...  ;-)

Thanks for the correction.

Marc