[Date Index]
[Thread Index]
[Author Index]
Re: Log function
*To*: mathgroup at smc.vnet.net
*Subject*: [mg57349] Re: Log function
*From*: Jean-Marc Gulliet <jeanmarc.gulliet at 9online.fr>
*Date*: Wed, 25 May 2005 06:02:57 -0400 (EDT)
*Organization*: New York University
*References*: <d6us3g$j02$1@smc.vnet.net>
*Reply-to*: jmg336 at nyu.edu
*Sender*: owner-wri-mathgroup at wolfram.com
Bill Ginsberg wrote:
> I have Mathematica 5.0.1. When I attempt to get the Log of a number "a"
> by entering Log[a], it does not return the value but echoes back:
> Log[a]. How is this fixed?
Hi Bill,
I will assume that by "a" you mean any positive real value, say for
example two. You can enter the value two as an exact number, for
instance 2 without any decimal point (unlimited precision, not dependent
of the hardware) or as a machine-precision number (limited number of
digit after the decimal point, dependent on which the hardware
architecture is used), for instance 2. or 2.0
What does that change in our case for the value of the logarithm? If you
enter an exact number, Mathematica will work in exact arithmetic and
give you exact number. The exact value of Log[2] is Log[2] since Log[2]
is an irrational number that is it has an unlimited non-repetitive
series of numbers after the decimal point (such as Pi or e, base of the
natural logarithms). Hence
In[1]:= Log[2]
Out[1]= Log[2]
Also
In[2]:= Log[1]
Out[2]= 0
To get an approximate value you can either type in a decimal point or
use the function N (for Numerical I think):
In[3]:= Log[2.]
Out[3]= 0.693147
In[4]:= Log[2]//N
Out[4]= 0.693147
In[5]:= N[Log[2],20]
Out[5]= 0.69314718055994530942
Best regards,
/J.M.
Prev by Date:
** Re: Sorting nested list**
Next by Date:
**Re: Applying a list of functions to a list of arguments**
Previous by thread:
**Re: Log function**
Next by thread:
**string pattern search**
| |