unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Calc: Avoid results like TERM1/-TERM2
@ 2022-02-23  5:08 Michael Heerdegen
  0 siblings, 0 replies; only message in thread
From: Michael Heerdegen @ 2022-02-23  5:08 UTC (permalink / raw)
  To: Emacs mailing list

Hello,

does anyone from the "Calc people" remember details about the
implementation of `math-neg-fancy'?  I ask because it sometimes puts the
"-" into the denominator and makes the result look ugly, e.g.

M-x calc RET
m s (symbolic mode)
' sqrt(2) / (2 exp(x^2 / 2)) RET
n

gives me in emacs -Q:

sqrt(2) / (-2 exp(x^2 / 2))

with a minus in the denominator - ugh.  Happens not always, but surely
not only in this case.

`math-neg-fancy' is the "culprit" - it tries very hard to hammer the
`neg' somehow into a fraction.  In the above case, the denominator is
chosen.

Does somebody know how to teach Calc to do this only in cases where
it is an actual simplification?  I'm sure the code makes sense in some
usage scenarios - maybe some parts should be conditional?


Michael.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-23  5:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23  5:08 Calc: Avoid results like TERM1/-TERM2 Michael Heerdegen

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).