unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@protonmail.com>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: master f9f4f054bc1 1/2: Compare fixnums and floats accurately in value<
Date: Thu, 04 Jul 2024 15:16:51 +0000	[thread overview]
Message-ID: <alvPaCJvV8ZdK-zYRIdfzHHQ9R6u5_fHgFYVhjpjbZLJLowPi_yHpkhaC9cto5Kk534AZwR4Y_MIwnulOwFt7qAHpBGCUZ5bS4bQcZh0tw8=@protonmail.com> (raw)
In-Reply-To: <20240704140356.A5E1AC1FB68@vcs2.savannah.gnu.org>

Hello Mattias,

On Thursday, July 4th, 2024 at 14:03, Mattias Engdegård via Mailing list for Emacs changes <emacs-diffs@gnu.org> wrote:
> Compare fixnums and floats accurately in value<
>
> Make `value<` compare fixnums and floats by value, as `<` does, instead
> of coercing the fixnum to a float first which is what C would do.
> This matters when the fixnum cannot be represented as a float. For
> example, C would evaluate
>
> 72057594037927935 < 72057594037927936.0
>
> to false since the operands are converted to the same floating-point
> number.

Can you add a comment to fixnum_float_cmp explaining that it only works for fixnums (62 / 30 bits), not for arbitrary EMACS_INTs (64 / 32 bits)? Or is that totally obvious?

Pip



       reply	other threads:[~2024-07-04 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <172010183615.2930.8557271862854647404@vcs2.savannah.gnu.org>
     [not found] ` <20240704140356.A5E1AC1FB68@vcs2.savannah.gnu.org>
2024-07-04 15:16   ` Pip Cet [this message]
2024-07-04 15:51     ` master f9f4f054bc1 1/2: Compare fixnums and floats accurately in value< Mattias Engdegård

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='alvPaCJvV8ZdK-zYRIdfzHHQ9R6u5_fHgFYVhjpjbZLJLowPi_yHpkhaC9cto5Kk534AZwR4Y_MIwnulOwFt7qAHpBGCUZ5bS4bQcZh0tw8=@protonmail.com' \
    --to=pipcet@protonmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mattiase@acm.org \
    /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).