unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* ln(0), bug in Calc?
@ 2005-10-06 11:32 Neon Absentius
  0 siblings, 0 replies; 2+ messages in thread
From: Neon Absentius @ 2005-10-06 11:32 UTC (permalink / raw)


When asked to solve the equation e^x = 0, Calc returns ln(0) as the answer.
It indicates in the echo area:

Logarithm of zero: 0  [w=more]  		       ;; I press w
Choosing 0 for arbitrary integer in solution  [w=more] ;; I press w
Logarithm of zero: 0  [w=more]         		       ;; I press w
Number expected: e  [w=more]			       ;; I press w
Number expected: e				       ;; I press w 
(No further explanations available)

Apparently when the argument of log is non-positive Calc switches to
the (multivalued) complex logarithm and sets the integer in the
formula to 0.  Of course this doesn't make sence when the argument of
the logarithm is 0.  This is confirmed by setting the Hyperbolic flag.
Then I get the answer

 x = (s1 > 0 ? []_n1 : ln(0) + 2 pi i n2)

and in the echo area "Logarithm of zero: 0".

-- 
There is no national science just as there is no national
multiplication table; what is national is no longer science.
         -- Anton Checov

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ln(0), bug in Calc?
       [not found] <mailman.10048.1128598384.20277.help-gnu-emacs@gnu.org>
@ 2005-10-07 20:20 ` Jay Belanger
  0 siblings, 0 replies; 2+ messages in thread
From: Jay Belanger @ 2005-10-07 20:20 UTC (permalink / raw)



Neon Absentius <absent@sdf.lonestar.org> writes:

> When asked to solve the equation e^x = 0, Calc returns ln(0) as the answer.
> It indicates in the echo area:
>
> Logarithm of zero: 0  [w=more]  		       ;; I press w

This isn't a bug, it's the way Calc handles some situations.
The message in the echo area is the error indicator.  See the section
Error Messages in the Calc manual.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-07 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-06 11:32 ln(0), bug in Calc? Neon Absentius
     [not found] <mailman.10048.1128598384.20277.help-gnu-emacs@gnu.org>
2005-10-07 20:20 ` Jay Belanger

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