unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	gerd.moellmann@gmail.com, emacs-devel@gnu.org
Subject: Re: Question about bignum usage
Date: Sat, 13 Jul 2024 21:34:36 -0700	[thread overview]
Message-ID: <36c2fee0-f818-4357-a51f-197fc10608a3@cs.ucla.edu> (raw)
In-Reply-To: <14CA211A-7795-4427-B3B3-870B6EB80108@gmail.com>

On 2024-07-13 02:43, Mattias Engdegård wrote:
>   time decoding output sometimes depends on the exact form of the input:
> 
> (time-convert '(0 3) t) => (3 . 1)
> (time-convert '(0 3 0) t) => (3000000 . 1000000)
> (time-convert '(0 3 0 0) t) => (3000000000000 . 1000000000000)
> 
> Does it make sense to distinguish (A B), (A B 0) and (A B 0 0) like
> this?

Yes, because the input form has the same effective precision as the 
output form. One would not want (time-convert '(0 3 0 0) t) and
(time-convert '(0 3 0 1) t) to generate timestamps with different 
precisions.

If one knows the input timestamp has a particular resolution regardless 
of its format, μs for example, one can give that resolution to 
time-convert, e.g., (time-convert TIMESTAMP 1000000).



      reply	other threads:[~2024-07-14  4:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20  5:59 Question about bignum usage Gerd Möllmann
2024-06-20  6:26 ` Eli Zaretskii
2024-06-20  6:34   ` Gerd Möllmann
2024-06-20  7:36     ` Eli Zaretskii
2024-06-20  8:35       ` Gerd Möllmann
2024-06-20 13:07         ` Gerd Möllmann
2024-06-20 13:43           ` Helmut Eller
2024-06-20 14:17             ` Gerd Möllmann
2024-06-20 18:32               ` Gerd Möllmann
2024-06-20 18:37                 ` Gerd Möllmann
2024-06-20 18:58                 ` Eli Zaretskii
2024-06-20 19:16                   ` Gerd Möllmann
2024-06-20 19:25                     ` Eli Zaretskii
2024-06-20 19:42                       ` Gerd Möllmann
2024-06-20  9:38       ` Mattias Engdegård
2024-06-20 10:02         ` Eli Zaretskii
2024-07-11 14:10           ` Paul Eggert
2024-07-13  9:43             ` Mattias Engdegård
2024-07-14  4:34               ` Paul Eggert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36c2fee0-f818-4357-a51f-197fc10608a3@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=mattias.engdegard@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).