* Strange behaviour in calc
@ 2005-09-27 4:10 Neon Absentius
0 siblings, 0 replies; 7+ messages in thread
From: Neon Absentius @ 2005-09-27 4:10 UTC (permalink / raw)
Hello
in GNU Emacs 21.4.1 on Debian testing/unstable using the debian calc package
when I give the "algebraic" formula
4+6/10
it evaluates to 23:5 which I think is the right answer since the
standard convention is that division has precedence over addition.
How ever on GNU Emacs 22.0.51.1 (multi-tty) the same algebraic
expession evaluates to 1, which means that addition is evaluated
before the division. Is this the intended behaviour or is this a bug?
Even if this is the intended behaviour I would still suggest that it
*is* a bug!
--
Everyone is so overwhelmed by the hospitality. And so many of the
people in the arena here, you know, were underprivileged anyway, so
this--this (she chuckles slightly) is working very well for them.
-- Barbara Bush, about the refuges from New Orleans.
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.8774.1127794336.20277.help-gnu-emacs@gnu.org>]
* Re: Strange behaviour in calc
[not found] <mailman.8774.1127794336.20277.help-gnu-emacs@gnu.org>
@ 2005-09-27 4:30 ` Jay Belanger
2005-09-27 10:53 ` Neon Absentius
[not found] ` <mailman.8806.1127819723.20277.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Jay Belanger @ 2005-09-27 4:30 UTC (permalink / raw)
Cc: belanger
Neon Absentius <absent@sdf.lonestar.org> writes:
> Hello
>
> in GNU Emacs 21.4.1 on Debian testing/unstable using the debian calc package
> when I give the "algebraic" formula
>
> 4+6/10
>
> it evaluates to 23:5 which I think is the right answer since the
> standard convention is that division has precedence over addition.
> How ever on GNU Emacs 22.0.51.1 (multi-tty) the same algebraic
> expession evaluates to 1, which means that addition is evaluated
> before the division. Is this the intended behaviour or is this a bug?
> Even if this is the intended behaviour I would still suggest that it
> *is* a bug!
I agree; except I can't reproduce it.
In cvs Emacs, 4+6/10 gives me 4.6 or (in fraction mode) 23:5.
What are your calc settings?
Jay
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Strange behaviour in calc
2005-09-27 4:30 ` Jay Belanger
@ 2005-09-27 10:53 ` Neon Absentius
[not found] ` <mailman.8806.1127819723.20277.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Neon Absentius @ 2005-09-27 10:53 UTC (permalink / raw)
On Mon, Sep 26, 2005 at 11:30:30PM -0500, Jay Belanger wrote:
> What are your calc settings?
The modeline says:
-uu7:%*-F1 Calc: 12 Deg Scalar LaTeX
It is worth adding that after your question I checked the 21.4.1 with
the Tex mode and it does the same mistake. So I guess this is a bug
in Tex mode which was inherited by the Latex mode.
--
Everyone is so overwhelmed by the hospitality. And so many of the
people in the arena here, you know, were underprivileged anyway, so
this--this (she chuckles slightly) is working very well for them.
-- Barbara Bush, about the refuges from New Orleans.
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.8806.1127819723.20277.help-gnu-emacs@gnu.org>]
* Re: Strange behaviour in calc
[not found] ` <mailman.8806.1127819723.20277.help-gnu-emacs@gnu.org>
@ 2005-09-27 13:23 ` Thien-Thi Nguyen
2005-09-27 14:29 ` Neon Absentius
[not found] ` <mailman.8837.1127832035.20277.help-gnu-emacs@gnu.org>
2005-09-27 14:59 ` Jay Belanger
1 sibling, 2 replies; 7+ messages in thread
From: Thien-Thi Nguyen @ 2005-09-27 13:23 UTC (permalink / raw)
Neon Absentius <absent@sdf.lonestar.org> writes:
> -- Barbara Bush, about the refuges from New Orleans.
probably you mean to say "refugees" here.
thi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Strange behaviour in calc
2005-09-27 13:23 ` Thien-Thi Nguyen
@ 2005-09-27 14:29 ` Neon Absentius
[not found] ` <mailman.8837.1127832035.20277.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Neon Absentius @ 2005-09-27 14:29 UTC (permalink / raw)
On Tue, Sep 27, 2005 at 03:23:10PM +0200, Thien-Thi Nguyen wrote:
> Neon Absentius <absent@sdf.lonestar.org> writes:
>
> > -- Barbara Bush, about the refuges from New Orleans.
>
> probably you mean to say "refugees" here.
Ooops!
thanks. On the other hand, they are underprivileged anyway ...
>
> thi
--
Everyone is so overwhelmed by the hospitality. And so many of the
people in the arena here, you know, were underprivileged anyway, so
this--this (she chuckles slightly) is working very well for them.
-- Barbara Bush, about the refugees from New Orleans.
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.8837.1127832035.20277.help-gnu-emacs@gnu.org>]
* Re: Strange behaviour in calc
[not found] ` <mailman.8806.1127819723.20277.help-gnu-emacs@gnu.org>
2005-09-27 13:23 ` Thien-Thi Nguyen
@ 2005-09-27 14:59 ` Jay Belanger
1 sibling, 0 replies; 7+ messages in thread
From: Jay Belanger @ 2005-09-27 14:59 UTC (permalink / raw)
Cc: belanger
Neon Absentius <absent@sdf.lonestar.org> writes:
...
> It is worth adding that after your question I checked the 21.4.1 with
> the Tex mode and it does the same mistake. So I guess this is a bug
> in Tex mode which was inherited by the Latex mode.
Yes; that's it.
In TeX mode, the precedence of \over is less than that of + and -
(that ensures that things like {a+b \over c + d} are parsed correctly),
and / was given the same precedence as \over.
The precedence of / has been raised in cvs Emacs, so it should work
correctly now.
Jay
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-09-27 15:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-27 4:10 Strange behaviour in calc Neon Absentius
[not found] <mailman.8774.1127794336.20277.help-gnu-emacs@gnu.org>
2005-09-27 4:30 ` Jay Belanger
2005-09-27 10:53 ` Neon Absentius
[not found] ` <mailman.8806.1127819723.20277.help-gnu-emacs@gnu.org>
2005-09-27 13:23 ` Thien-Thi Nguyen
2005-09-27 14:29 ` Neon Absentius
[not found] ` <mailman.8837.1127832035.20277.help-gnu-emacs@gnu.org>
2005-09-27 15:26 ` Thien-Thi Nguyen
2005-09-27 14:59 ` Jay Belanger
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.