| To: | Mark Goodwin <mgoodwin@xxxxxxxxxx> |
|---|---|
| Subject: | Re: pmiostat qa failures |
| From: | "Frank Ch. Eigler" <fche@xxxxxxxxxx> |
| Date: | Mon, 8 Sep 2014 09:27:00 -0400 |
| Cc: | Ken McDonell <kenj@xxxxxxxxxxxxxxxx>, pcp@xxxxxxxxxxx |
| Delivered-to: | pcp@xxxxxxxxxxx |
| In-reply-to: | <540DA9D1.4050007@xxxxxxxxxx> |
| References: | <540D316D.7060400@xxxxxxxxxxxxxxxx> <540D3413.50309@xxxxxxxxx> <540D3871.80201@xxxxxxxxxxxxxxxx> <540D3DE3.9010502@xxxxxxxxx> <540D6219.8010308@xxxxxxxxxx> <y0mbnqqguqx.fsf@xxxxxxxx> <540DA9D1.4050007@xxxxxxxxxx> |
| User-agent: | Mutt/1.4.2.2i |
Hi - On Mon, Sep 08, 2014 at 11:06:25PM +1000, Mark Goodwin wrote: > [...] > The time delta calculations are all supposed to be done in double > precision arithmetic, so I'd agree if the mantissa are within ~60 bits ... (Well, 64-bit doubles have a 52-bit mantissa.) > [...] The following one character patch in libpcp promotes it to > double precision, [...] > - dbl += (double)val->tv_usec / 1000000.0; > + dbl += (double)val->tv_usec / 1000000.0L; Please note that in the L suffix means "long double". Unsuffixed already means "double". It's also not hard to get FP loss of precision by subtracting similar-sized numbers. I've had to play with this a bit during the pmwebd graphite work, which does plenty of scaling transforms. - FChE |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: pmiostat qa failures, Mark Goodwin |
|---|---|
| Next by Date: | pcp updates - Mac OSX build, Max Matveev |
| Previous by Thread: | Re: pmiostat qa failures, Mark Goodwin |
| Next by Thread: | Re: pmiostat qa failures, Mark Goodwin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |