All of lore.kernel.org
 help / color / mirror / Atom feed
* clock(3) man page: precision vs accuracy
@ 2014-09-12 12:08 Vincent Lefevre
       [not found] ` <20140912120804.GE4404-Ljv1qFl2dU+MDATNRQa/ww@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Lefevre @ 2014-09-12 12:08 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

http://man7.org/linux/man-pages/man3/clock.3.html contains:

       In glibc 2.17 and earlier, clock() was implemented on top of
       times(2).  For improved precision, since glibc 2.18, it is
                      ^^^^^^^^^^^^^^^^^^
       implemented on top of clock_gettime(2) (using the
       CLOCK_PROCESS_CPUTIME_ID clock).

This looks strange. The user doesn't seek improved precision, but
improved accuracy: if one gets more digits but the value itself is
less accurate (i.e. the error against the ideal value is larger),
this is bad. Perhaps changing "precision" to "accuracy" would be
correct (I assume that the real goal of the change was not just
improved precision, but more importantly the resulting improved
accuracy). I've reported a bug about the glibc documentation:

  https://sourceware.org/bugzilla/show_bug.cgi?id=17383

-- 
Vincent Lefèvre <vincent-buymaDBGzMOsTnJN9+BGXg@public.gmane.org> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: clock(3) man page: precision vs accuracy
       [not found] ` <20140912120804.GE4404-Ljv1qFl2dU+MDATNRQa/ww@public.gmane.org>
@ 2014-09-14  2:33   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2014-09-14  2:33 UTC (permalink / raw)
  To: Vincent Lefevre
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA

On 09/12/2014 05:08 AM, Vincent Lefevre wrote:
> http://man7.org/linux/man-pages/man3/clock.3.html contains:
> 
>        In glibc 2.17 and earlier, clock() was implemented on top of
>        times(2).  For improved precision, since glibc 2.18, it is
>                       ^^^^^^^^^^^^^^^^^^
>        implemented on top of clock_gettime(2) (using the
>        CLOCK_PROCESS_CPUTIME_ID clock).
> 
> This looks strange. The user doesn't seek improved precision, but
> improved accuracy: if one gets more digits but the value itself is
> less accurate (i.e. the error against the ideal value is larger),
> this is bad. Perhaps changing "precision" to "accuracy" would be
> correct (I assume that the real goal of the change was not just
> improved precision, but more importantly the resulting improved
> accuracy). I've reported a bug about the glibc documentation:
> 
>   https://sourceware.org/bugzilla/show_bug.cgi?id=17383

It looks to me like your supposition is correct, Vincent.
I have changed "precision" to "accuracy".

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-14  2:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12 12:08 clock(3) man page: precision vs accuracy Vincent Lefevre
     [not found] ` <20140912120804.GE4404-Ljv1qFl2dU+MDATNRQa/ww@public.gmane.org>
2014-09-14  2:33   ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.