all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
To: Glenn Morris <rgm@gnu.org>
Cc: 11913@debbugs.gnu.org
Subject: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386 machine
Date: Mon, 16 Jul 2012 21:33:58 -0500	[thread overview]
Message-ID: <878vejktex.fsf@trouble.defaultvalue.org> (raw)
In-Reply-To: <87ehoeqao2.fsf@trouble.defaultvalue.org> (Rob Browning's message of "Sat, 14 Jul 2012 16:45:33 -0500")

Rob Browning <rlb@defaultvalue.org> writes:

> Glenn Morris <rgm@gnu.org> writes:
>
>> But why does (abs 8.0) return an arithmetic error at all...?
>
> OK, at the moment, I believe the short answer is because fabs() is
> changing errno which triggers the default clause in IN_FLOAT() here:
>
>     default: arith_error (float_error_fn_name, float_error_arg);
>
> I've been told that this should be considered an Emacs bug because the
> effect of fabs() on errno is strictly undefined, and so fabs() is within
> its rights to do whatever it wants to the value.

For now, I'm going to deploy a patch in the Debian package that just
adds a DEB_IN_FLOAT_NOERRNO() that omits the errno checking, and then
uses that macro for the fabs() call.

Doing something with a similar result would probably be advisable.

Thanks for the help.
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4





  reply	other threads:[~2012-07-17  2:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 17:53 bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386 machine Rob Browning
2012-07-11 19:16 ` Glenn Morris
2012-07-11 21:52   ` Rob Browning
2012-07-13 17:47     ` Rob Browning
2012-07-13 17:51       ` Glenn Morris
2012-07-13 18:40         ` Eli Zaretskii
2012-07-13 19:02           ` Andreas Schwab
2012-07-13 19:02           ` Rob Browning
2012-07-13 19:17             ` Eli Zaretskii
2012-07-13 19:29               ` Andreas Schwab
2012-07-13 19:35                 ` Eli Zaretskii
2012-07-13 19:51                   ` Andreas Schwab
2012-07-14  6:23                     ` Eli Zaretskii
2012-07-14  8:09                       ` Andreas Schwab
2012-07-13 19:50               ` Rob Browning
2012-07-14  6:21                 ` Eli Zaretskii
2012-07-13 19:04           ` Glenn Morris
2012-07-13 19:15             ` Eli Zaretskii
2012-07-13 19:19               ` Glenn Morris
2012-07-13 19:37                 ` Eli Zaretskii
2012-07-13 19:47                   ` Andreas Schwab
2012-07-14 21:45             ` Rob Browning
2012-07-17  2:33               ` Rob Browning [this message]
2012-07-17  2:59 ` Paul Eggert

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

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

  git send-email \
    --in-reply-to=878vejktex.fsf@trouble.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    --cc=11913@debbugs.gnu.org \
    --cc=rgm@gnu.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 external index

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

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.