calculating largesr power of 2 less than a number

I’ve been playing with SND-FFT, which requires the “length” parameter to be a power of 2 http://www.cs.cmu.edu/~rbd/doc/nyquist/part10.html#index828

This is a little snippet for calculating the largest power of 2 less than a given number:

(defun highest-power-of-2 (val)
  (do ((n 2 (* n 2)))
      ((> n (/ val 2)) n)))

and an alternative solution:

(defun highest-power-of-2 (val)
  (round (power 2 (truncate (/ (log (float val))(log 2.0))))))