emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inverse of float-time?


From: Paul Eggert
Subject: Re: inverse of float-time?
Date: Wed, 11 Sep 2013 21:16:22 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

Sam Steingold wrote:
> what I want is for float time to be transparently accepted by
> all functions which accept list time.

On second thought I'm not sure I want to encourage that.
Floating-point loses information, due to rounding, and
this can cause glitches that can make floating-point
more trouble than it's worth.

For example, if gettimeofday reports 1378930161.099999786 seconds
after 1970, then current-time returns the exact representation
(21040 52721 99999 786000) but float-time rounds this to
1378930161.1.  Sure, it's a small error, but the fact that
it's nonzero can cause problems.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]