[Date Index] [Thread Index] [Author Index]
Re: Log function
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 is Log since Log 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:= Log Out= Log Also In:= Log Out= 0 To get an approximate value you can either type in a decimal point or use the function N (for Numerical I think): In:= Log[2.] Out= 0.693147 In:= Log//N Out= 0.693147 In:= N[Log,20] Out= 0.69314718055994530942 Best regards, /J.M.