|
From: | Bauke Jan Douma |
Subject: | Re: it looks like bug:( |
Date: | Thu, 18 Oct 2007 16:52:38 +0200 |
User-agent: | Thunderbird 2.0.0.6 (X11/20070728) |
Александр Шкотин wrote on 18-10-07 13:56:
please try this BEGIN{ w = 0.0 w = w + 0.15 w = w + 99.45 w = w + 0.4 if (w > 100) print w } it prints 100 with GNU Awk 3.1.3 under Win XP and GNU Awk 3.1.5 under Fedora. what should i do? Alex
Rounding. BEGIN { w = 0.0 w = w + 0.15 w = w + 99.45 w = w + 0.4 if (w > 100.0) printf "%.32f", w } 100.00000000000001421085471520200372 bjd
[Prev in Thread] | Current Thread | [Next in Thread] |