LOG bases

Discussion around the SwissMicros DM42 calculator
jvanoort
Posts: 16
Joined: Wed Feb 24, 2021 1:30 pm

LOG bases

Post by jvanoort »

hi all,

This may be more a general HP 42s question, but is there a way to use the LOG function with different bases?
User avatar
salvomic
Posts: 186
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: LOG bases

Post by salvomic »

something like:

Code: Select all

input y (base)
ENTER
input x (number)
then

Code: Select all

LN
x<>y
LN
÷
you could save a little program like this.
Otherwise, see here for a better solution, by Fernando: «The menu adds a the LGyX function to compute base-y logarithm»...

Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
jvanoort
Posts: 16
Joined: Wed Feb 24, 2021 1:30 pm

Re: LOG bases

Post by jvanoort »

Thank you. Interesting solution

I now use the solver and solve b^e=x for the exponent e, which works as well, but I just wondered if there was a trick to use LOG with a different base without resorting to solvers or programs. Apparently not.

Thanks for your reply though!
User avatar
salvomic
Posts: 186
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: LOG bases

Post by salvomic »

jvanoort wrote:
Thu Mar 18, 2021 10:51 pm
Thanks for your reply though!
you're welcome!
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
jneven
Posts: 12
Joined: Sat Jan 23, 2021 6:32 pm
Location: Belgium

Re: LOG bases

Post by jneven »

Do you mean this one:
LOGb(X) = LOG10(X)/LOG10(b)
If yes...no solver required ;)
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: LOG bases

Post by Thomas Okken »

jneven wrote:
Fri Mar 19, 2021 5:10 pm
LOGb(X) = LOG10(X)/LOG10(b)
LOGb(X) = LN(X)/LN(b)

...is slightly faster :)
jvanoort
Posts: 16
Joined: Wed Feb 24, 2021 1:30 pm

Re: LOG bases

Post by jvanoort »

That’s not a HP 42s trick, but a gaping gap in my fundamental knowledge and understanding of math in general and LOG / LN in particular!

I’m dedicating tonight to trying understand why LOGb(x) = LN(x)/LN(b), but indeed: no solver required!

Learning something new everyday, thank you guys!
User avatar
Calambres
Posts: 48
Joined: Wed Dec 16, 2020 6:49 pm
Location: Madrid, Spain
Contact:

Re: LOG bases

Post by Calambres »

jvanoort wrote:
Fri Mar 19, 2021 7:40 pm
I’m dedicating tonight to trying understand why LOGb(x) = LN(x)/LN(b)...
https://en.wikipedia.org/wiki/List_of_l ... g_the_base
User avatar
Calambres
Posts: 48
Joined: Wed Dec 16, 2020 6:49 pm
Location: Madrid, Spain
Contact:

Re: LOG bases

Post by Calambres »

Thomas Okken wrote:
Fri Mar 19, 2021 7:29 pm
LOGb(X) = LN(X)/LN(b)
...is slightly faster :)
Just curious: why is it faster a LN than a LOG?
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: LOG bases

Post by Walter »

Calambres wrote:
Sat Mar 20, 2021 9:52 am
Thomas Okken wrote:
Fri Mar 19, 2021 7:29 pm
LOGb(X) = LN(X)/LN(b)
...is slightly faster :)
Just curious: why is it faster a LN than a LOG?
Because LN is calculated while LG is derived from LN. :geek:

(Nitpicky remark: LG is identical to LOG10 like LN being identical to LOGe and LB to LOG2. Never let any mathematician catch you with a naked LOG in your text!)
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Post Reply