Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compute a common logarithm

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
nn.araujo
633 Views, 2 Replies

Compute a common logarithm

Dear all

 

How can I compute a common logarithm (base 10) in AutoLISP. I only know how to compute the natural logarithm (base e).

 

Best regards

Nuno

2 REPLIES 2
Message 2 of 3
lpseifert
in reply to: nn.araujo

 

(defun log10 (num)
  (/ (log num) (log 10))
  )

 

 

usage

 

_$ (log10 10000)
4.0
_$ (log10 35.6)
1.55145

 

 

~~~Civil 3D 2008~~~
Message 3 of 3
nn.araujo
in reply to: nn.araujo

Perfect.

 

Thank you.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost