List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Re: log[10]( ) and prettyprinting
| [MUG] Re: log[10]( ) and prettyprinting |
|
Author: Robert Israel
Posted: 20/10/2000 00:42:44 GDT
|
>> From: Robert Israel
It has nothing to do with printing, pretty or otherwise. The answer is
simply that unless x is a float, log[10](x) returns a symbolic answer
ln(x)/ln(10). There is no simplification (apart from whatever ln does to
x).
1000.0 is a float, so log[10](1000.0) returns 3.000000000.
1000 is an integer, not a float, so log[10](1000) returns
ln(1000)/ln(10) (and "ln" doesn't do any simplification on ln(1000)).
However, simplify(log[10](1000)) will return 3, and evalf(log[10](1000))
will return 3.000000000.
Robert Israel
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
On Thu, 12 Oct 2000, Nathan Sokalski wrote:
> >> From: "Nathan Sokalski"
>
> In general, undetailed, non-technical terms, would it be correct to say that
> prettyprinting displays the function rather than the "answer" when an exact
> decimal or fraction does not exist? Anyway, isn't it supposed to give the
> numerical answer if it is just a simple 3 or 4 kind of answer? Well, why
> doesn't it do that when I enter log[10](1000); or log[10](10000); ? The
> answer is an exact integer, right? Yes, I do know how to use evalf() and
> change the settings for prettyprinting, but why should I need to do this for
> such a simple answer? I did notice that when it displays the answer it
> displays ln(1000)/ln(10) , which uses the natural log. Is there some
> internal rounding that occurs with the natural log in the process that makes
> it think 3 or 4 is not the exact answer? Any info would be appreciated.
>
> Nathan Sokalski
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
>
>
|
[View Complete Thread]
Previous by date: [MUG] Illustrating Trapezoidal Rule, Gold1
Next by date: [MUG] slow series(solve(..)) quirk in Maple VI, V.X>3, Desmond Johnston
Previous thread: [MUG] Step-by-step solving and verifying of differential equations, Chuck Baker
Next thread: [MUG] solve, Ruth Plathe
|