Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

log of other base, quick help

11 views
Skip to first unread message

Anthony Yeung

unread,
Nov 11, 2002, 6:42:23 PM11/11/02
to
anyone know what is key for log of base 2 in 48g, or 32sii ??

thx
anthony


R Lion

unread,
Nov 11, 2002, 6:53:04 PM11/11/02
to

"Anthony Yeung" <kay...@uiuc.edu> escribió en el mensaje
news:ZcXz9.14756$US2.1...@vixen.cso.uiuc.edu...

> anyone know what is key for log of base 2 in 48g, or 32sii ??
>

I think the key is... learning Maths ;-)

ln N
log N= --------
2 ln 2

Raul


Aaron Toponce

unread,
Nov 11, 2002, 9:29:50 PM11/11/02
to
"Anthony Yeung" <kay...@uiuc.edu> wrote in message news:<ZcXz9.14756$US2.1...@vixen.cso.uiuc.edu>...

> anyone know what is key for log of base 2 in 48g, or 32sii ??
>
> thx
> anthony

Base on y register
Expression on x register

<< LOG SWAP LOG / EVAL >> LOGG ENTER STO

Press VAR. There you go!

Aaron

Bhuvanesh

unread,
Nov 11, 2002, 10:44:55 PM11/11/02
to
"Anthony Yeung" <kay...@uiuc.edu> wrote:

I don't feel so bad now -- the TI-89/92+ discussion group is not the
only one with such posts ;-)

Anyway, to answer the question, log_base_b(a) = ln(a)/ln(b). Of course
it should be easy to create a user-defined function for log_base_2(x).

Oh, I just noticed "uiuc" in Anthony's e-mail address... so we're
neighbors (I live in Champaign as well).

--
Bhuvanesh

Aaron Toponce

unread,
Nov 12, 2002, 10:06:30 AM11/12/02
to
top8...@yahoo.com (Aaron Toponce) wrote in message news:<81f1e5dc.0211...@posting.google.com>...

> "Anthony Yeung" <kay...@uiuc.edu> wrote in message news:<ZcXz9.14756$US2.1...@vixen.cso.uiuc.edu>...
> > anyone know what is key for log of base 2 in 48g, or 32sii ??
> >
> > thx
> > anthony
>
> Base on y register
> Expression on x register
>
> << LOG SWAP LOG / EVAL >> LOGG ENTER STO

I mean
<< LN SWAP LN / EVAL >> LOGG ENTER STO
Soryy!

R Lion

unread,
Nov 12, 2002, 1:35:04 PM11/12/02
to

"Aaron Toponce" <top8...@yahoo.com> escribió en el mensaje
news:81f1e5dc.02111...@posting.google.com...

> > << LOG SWAP LOG / EVAL >> LOGG ENTER STO
>
> I mean
> << LN SWAP LN / EVAL >> LOGG ENTER STO
> Soryy!


Both programs work

Raul


Joseph K. Horn

unread,
Nov 12, 2002, 4:19:41 PM11/12/02
to
> anyone know what is key for log of base 2 in 48g, or 32sii ??

LN 2 LN /

-Joe-


Julián Kaihara

unread,
Nov 12, 2002, 4:36:27 PM11/12/02
to
of course, there is not a built command to do that, but the power of
programming does that:

RPN program: \<< LN SWAP LN SWAP RATIO \>>

ALG program: \<< \-> L B 'LN(L)/LN(B)' \>>

both: NumberTarget NumberBase --> NumberResult or SymbolicExpression
they are controlled by flags -2 and -3, I guess

I hopr this helps :)

Gerson W Barbosa

unread,
Nov 12, 2002, 9:19:27 PM11/12/02
to
>Joe...@jps.net
>Date: 12/11/02 19:19 Hor. de verão leste da Am. Sul
>Message-id: <NfeA9.1305$Ta6.1...@newsread2.prod.itd.earthlink.net>

>
>> anyone know what is key for log of base 2 in 48g, or 32sii ??
>
>LN 2 LN /
>
>-Joe-
>
>

Joe's solutions are very concise and elegant as always. That'll do for the
particular base 2 log he asked for. What about this general solution inspired
by Joe's?

LN XROOT LN

(Number and base assumed to be on level Y and X, respectively).

Regards,

Gerson.

Joseph K. Horn

unread,
Nov 13, 2002, 9:26:13 PM11/13/02
to
Gerson W Barbosa wrote:

> LN XROOT LN
>
> (Number and base assumed to be on level Y and X, respectively).

Wow, very cool! I've never seen that before!

Much nicer then LN SWAP LN SWAP /.

And LN XROOT LN is even more accurate too, at least for these powers of 2,
log base 2: 16, 19, 21, 24, 26, 29, 31, 34, 36, 39... and less accurate for
no powers of 2 below 40. It doesn't fare so well on powers of 3, log base
3. How would one go about determining which rutine is more accurate in
general?

-jkh-


Jean-Yves Avenard

unread,
Nov 14, 2002, 1:02:47 PM11/14/02
to
Hello

"Aaron Toponce" <top8...@yahoo.com> wrote in message
news:81f1e5dc.02111...@posting.google.com...


> I mean
> << LN SWAP LN / EVAL >> LOGG ENTER STO
> Soryy!

Don't be *soryy*, it's equivalent:
LOG(x) = ln(x)/ln(10)

so LOG(x)/LOG(y)=(ln(x)/ln(10))/(ln(y)/ln(10))=ln(n)/ln(y)

Jean-Yves


Gerson W Barbosa

unread,
Nov 14, 2002, 9:01:39 PM11/14/02
to
Joseph K. Horn wrote:

>Gerson W Barbosa wrote:
>
>> LN XROOT LN
>>
>> (Number and base assumed to be on level Y and X, respectively).
>
>Wow, very cool! I've never seen that before!
>

Thanks. Neither had I, Joe!

>Much nicer then LN SWAP LN SWAP /.
>
>And LN XROOT LN is even more accurate too, at least for these powers of 2,
>log base 2: 16, 19, 21, 24, 26, 29, 31, 34, 36, 39... and less accurate for
>no powers of 2 below 40. It doesn't fare so well on powers of 3, log base
>3. How would one go about determining which rutine is more accurate in
>general?
>

The logarithm of "N" to base "b" may be calculated as

(lnN)/(lnb)

which is equivalent to

ln [N^(1/lnb)] (applying one of the Laws of Logarithms)

or in the HP48 notation:

'LN(XROOT(LN(b),N))'

The drawback is a decrease in execution time (some scores of microseconds)
because the XROOT operation requires at least one LN and one EXP calculation.
As of the accuracy, I think is quite acceptable though I have not thought
about.

Now, honestly, I discovered this by chance, playing with the calculator. I was
trying to obtain a shorter program when I tried these three strokes.

Gerson.

Gerson W Barbosa

unread,
Nov 15, 2002, 7:27:26 AM11/15/02
to
Joseph K. Horn wrote:

>Gerson W Barbosa wrote:
>
>> LN XROOT LN
>>
>> (Number and base assumed to be on level Y and X, respectively).
>
>Wow, very cool! I've never seen that before!
>

Thanks. Neither had I, Joe!

>Much nicer then LN SWAP LN SWAP /.


>
>And LN XROOT LN is even more accurate too, at least for these powers of 2,
>log base 2: 16, 19, 21, 24, 26, 29, 31, 34, 36, 39... and less accurate for
>no powers of 2 below 40. It doesn't fare so well on powers of 3, log base
>3. How would one go about determining which rutine is more accurate in
>general?
>

The logarithm of "N" to base "b" may be calculated as

(lnN)/(lnb)

which is equivalent to

ln [N^(1/lnb)] (applying one of the Laws of Logarithms)

or in the HP48 notation:

'LN(XROOT(LN(b),N))'

The drawback is a increase in running time - it would take about twice as much
time to run - because the XROOT operation requires at least one LN and one EXP


calculation.
As of the accuracy, I think is quite acceptable though I have not thought

about it.

Paul Floyd

unread,
Nov 17, 2002, 5:31:35 AM11/17/02
to

The base of the log being used doesn't matter
ln(x)/ln(y) is the same as log10(x)/log10(y) is the same as
logN(x)/logN(y).

A bientot
Paul
--
Paul Floyd http://paulf.free.fr (for what it's worth)
What happens if you have lead in your pants as well as lead in your pencil?

0 new messages