🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.ibm.pc.programmer
3 messages
3 total messages Started by Jan Nilsson Thu, 14 Jun 1990 08:12
How to calculate LOG10 in BASIC?
#733
Author: Jan Nilsson
Date: Thu, 14 Jun 1990 08:12
20 lines
1085 bytes
Hello programmers!

Sorry to disturb You with a (I don't know if I dare say it..) BASIC
question. I want to calculate the common logarithm (LOG10) and BASIC 
only support LOG, the natural logarithm. Could it be calculated in 
another way?

Thanks

Janne 
----------------------------------------------------------------------
Jan Nilsson			Phone: +46 511 30214    
System Manager			Fax:   +46 511 30134   
Dept of Animal Hygiene		Mail:  Jan.Nilsson@Eva.SLU.se	
Swedish University of 			       
Agricultural Sciences		       
P.O.B. 345			"Who?? Me??!!
S-532 24 SKARA			 I no nuthing!!??"
SWEDEN				Manuel, Fawlty Tower
----------------------------------------------------------------------
Re: How to calculate LOG10 in BASIC?
#745
Author: Kevin D. Quitt
Date: Thu, 14 Jun 1990 20:03
26 lines
1278 bytes
In article <7196.267754e0@eva.slu.se> jn@eva.slu.se (Jan Nilsson) writes:
>Hello programmers!
>
>Sorry to disturb You with a (I don't know if I dare say it..) BASIC
>question. I want to calculate the common logarithm (LOG10) and BASIC 
>only support LOG, the natural logarithm. Could it be calculated in 
>another way?
>

    Nothin' to do with BASIC.  All you need is a magic number:

0.4342944818 (log10 of e)

now, since the log10 of a = log10 of e * ln of a

et voila!


-- 
 _
Kevin D. Quitt         Manager, Software Development    34 12 N  118 27 W
DeMott Electronics Co. 14707 Keswick St.   Van Nuys, CA 91405-1266
VOICE (818) 988-4975   FAX (818) 997-1190  
MODEM (818) 997-4496 Telebit PEP last      demott!kdq   kdq@demott.com

      96.37% of the statistics used in arguments are made up.
Re: How to calculate LOG10 in BASIC?
#744
Author: Rich Winkel
Date: Thu, 14 Jun 1990 22:28
10 lines
881 bytes
In <7196.267754e0@eva.slu.se> jn@eva.slu.se (Jan Nilsson) writes:
>Hello programmers!
>Sorry to disturb You with a (I don't know if I dare say it..) BASIC
>question. I want to calculate the common logarithm (LOG10) and BASIC 
>only support LOG, the natural logarithm. Could it be calculated in 
>another way?

Divide by the natural log of 10 (2.30258) to get the common log.

Rich
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads