GNU bug report logs - #19582
25.0.50; [PATCH] Calc: glitches with negation of units

Previous Next

Package: emacs;

Reported by: Wolfgang Jenkner <wjenkner <at> inode.at>

Date: Tue, 13 Jan 2015 14:31:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jay Belanger <jay.p.belanger <at> gmail.com>
To: Wolfgang Jenkner <wjenkner <at> inode.at>
Cc: jay.p.belanger <at> gmail.com, 19582 <at> debbugs.gnu.org
Subject: bug#19582: 25.0.50; [PATCH] Calc: glitches with negation of units
Date: Tue, 13 Jan 2015 10:34:46 -0600
>> Since 100 and (float 1 2) aren't the same, that might be a bug of some
>> kind.
>
> Sure, but
>
> (math-equal 100 '(float 1 2)) => t
>
> and (info "(calc) Predicates") states
>
>  -- Function: math-equal x y
>      Returns true if X and Y are numerically equal, either because they
>      are `equal', or because their difference is `zerop'. [...]
>
> so, IIUC, mathematically, they are as equal as it gets in calc.

Ah, right.  But the same calculations on the same objects should produce
results which are equal, not just math-equal.  

> On the other hand, I'm not sure if calculations with (float ...)
> are exact (if possible) in calc ?

Calc will do the exact computations, since internally it uses base 10 to
represents floats.  Of course, the user might not consider (float ...)s
to be exact.







This bug report was last modified 9 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.