HP Forums
log(value,base) versus logb(value,base) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: log(value,base) versus logb(value,base) (/thread-3613.html)



log(value,base) versus logb(value,base) - compsystems - 04-11-2015 12:32 PM

exac mode and simplify maximun

logb(e,i) => -2*i/π ok // base i, value e

log10(e)/log10(i)==logb(e,i) => 1 = true ok

but the exact mode shows approximate =(

log10(e)/log10(i) => −0.636619772368*i

log(e,i) => [ (i*π/2), 1] ?


RE: log(value,base) versus logb(value,base) - Tim Wessman - 04-11-2015 03:31 PM

Same reason sin(1,2,3,4) is a perfectly valid input in the CAS. Any number of arguments are accepted and calculated as [sin(1),sin(2)...]


RE: log(value,base) versus logb(value,base) - compsystems - 04-11-2015 10:33 PM

the help of log says:

LOG(Value, [base])

log(8,2) => 3

log(e,i) => base=I, value=e => [ (i*π/2), 1] ?


RE: log(value,base) versus logb(value,base) - Han - 04-11-2015 11:39 PM

In the CAS environment, objects separated by commas are elements of a list. Thus command(a,b,c,d) is actually interpreted as command([a,b,c,d]) where [] is a list (in the CAS environment). Secondly, LOG() and log() are different commands. You are probably trying to evaluate LOG(e,i), which is \( \log_i(e) \). However, if you type log(e,i) in the CAS environment then this is equivalent to LN({e,i}) in the Home environment since the CAS implements ln(x) as log(x) -- most CAS do this as well.

That said, when I type in log(e,i) in the CAS view, I get \( [1 \quad \frac{i}{2}*\pi ] \) and not the reverse-ordered list that you typed.


RE: log(value,base) versus logb(value,base) - compsystems - 04-13-2015 02:35 PM

Thanks Han

Without a real help, it is difficult to manipulate the hpPrime
the true help LOG command should be as follows, are agree or not?

General Logarithm
LOG(Value,[Base])
General logarithmic function
Return the logarithm of value in Base, By default, Base=10
Example
LOG(100,10) ▶ 2
LOG(100) ▶ 2
LOG(10,2.) ▶ 3.32192809489
LOG(10,e^1.) ▶ 2.30258509299

log(Value1,[Value2],[Value n])
Return the natural logarithm of value(s)
Example
log(100,10) ▶ [ln(100),ln(10)] ok
ln(100.,10.) ▶ [ 4.60517018599,2.30258509299 ]


I agree that the command can be written in lowercase or uppercase, to duplicate the function of the same =), is not valid is that no finds a documentation or help of each case