Youssef Mossoba

unread,
Mar 17, 2015, 11:44:38 PM3/17/15
to mitappinv...@googlegroups.com
I am looking for LOG base 10 i.e. LOG 1000 = 3. However what I see in the MATH blocks is LOG base e and EXP^. Is ther a way to combine those 2 to obtain LOG base 10? Thank You. 

SteveJG

unread,
Mar 18, 2015, 9:22:15 AM3/18/15
to mitappinv...@googlegroups.com
log in AI2 is a natural logarithm. In most math circles, this is written as ln, but not in AI2


Natural log is logarithm to the base e (e = 2.71828).
The natural log of 5.982082 is 1.788768, as App Inventor reports.

The confusion might be that some books use "log" to denote common log.
 The common log of 5.982082 is 0.7768523618720691

App Inventor denotes natural them as "log".   This is the same as Python, which denotes
common log as log10.

The solution is:

Does that work for you Youssef?

Regards,
Steve

Abraham Getzler

unread,
Mar 18, 2015, 1:28:39 PM3/18/15
to mitappinv...@googlegroups.com
See attached for your own log10 function.
ABG

log10.jpg

Youssef Mossoba

unread,
Mar 18, 2015, 8:24:09 PM3/18/15
to mitappinv...@googlegroups.com
Thank you Steve, It does answer exactly my question. Youssef.

Youssef Mossoba

unread,
Mar 18, 2015, 8:27:17 PM3/18/15
to mitappinv...@googlegroups.com
Thank you Abraham. It is highly appreciated. Youssef.
Reply all
Reply to author
Forward
0 new messages