From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: inverse of float-time? Date: Wed, 11 Sep 2013 21:16:22 -0700 Organization: UCLA Computer Science Department Message-ID: <52314016.1070006@cs.ucla.edu> References: <87vc27ntqe.fsf@gnu.org> <5230C108.2040609@cs.ucla.edu> <87r4cvnoie.fsf@gnu.org> <8738paog9i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1378959402 4586 80.91.229.3 (12 Sep 2013 04:16:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Sep 2013 04:16:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 12 06:16:43 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VJyKg-0008CN-49 for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2013 06:16:42 +0200 Original-Received: from localhost ([::1]:39210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJyKf-0007a3-5t for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2013 00:16:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJyKU-0007Zk-Uj for emacs-devel@gnu.org; Thu, 12 Sep 2013 00:16:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJyKN-0007B4-Lr for emacs-devel@gnu.org; Thu, 12 Sep 2013 00:16:30 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:44883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJyKN-0007B0-Ft for emacs-devel@gnu.org; Thu, 12 Sep 2013 00:16:23 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id CAF33A60002 for ; Wed, 11 Sep 2013 21:16:22 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AhK4hnMKbypW for ; Wed, 11 Sep 2013 21:16:22 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-71-108-49-126.lsanca.fios.verizon.net [71.108.49.126]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 674DB39E8008 for ; Wed, 11 Sep 2013 21:16:22 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 In-Reply-To: <8738paog9i.fsf@gnu.org> X-Enigmail-Version: 1.5.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163310 Archived-At: 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.