Autolisp function for log base 2?

Autolisp function for log base 2?

whgill01
Participant Participant
652 Views
2 Replies
Message 1 of 3

Autolisp function for log base 2?

whgill01
Participant
Participant
I'm looking for a function that will return the log base 2 of a number. For instance log2(128) should return 7. Thanks!
0 Likes
Accepted solutions (2)
653 Views
2 Replies
Replies (2)
Message 2 of 3

whgill01
Participant
Participant
Accepted solution
Got it. log2(128) = (/ log 128) (log 2)) = 7
0 Likes
Message 3 of 3

whgill01
Participant
Participant
Accepted solution
That should be (/ (log 128) (log 2))
0 Likes