close Warning: Can't synchronize with repository "(default)" (/project/cmucl/public_html/git/cmucl.git does not appear to be a Git repository.). Look in the Trac log for more information.

Opened 10 years ago

Closed 10 years ago

#8 closed defect (fixed)

2-arg log function can't compute some logs

Reported by: rtoy Owned by: somebody
Priority: minor Milestone:
Component: Core Version: 19c
Keywords: log, special functions Cc:


Consider the following snip of code. CMUCL should really be able to compute all of these. CMUCL fails mostly because it cannot convert some bignum to a double-float.

(defun test-log ()
  (dolist (base (list nil 2 2.0 2d0
		      (ash 1 99) (ash 1 3000)
		      8/7 (/ (ash 1 3000) 7)))
    (dolist (number (list 100 100.0 100d0
			  (ash 1 100) (ash 1 3500)
			  50/7 (/ (ash 1 3500) 7)))
      (multiple-value-bind (result cond)
	  (ignore-errors (if base
			     (log number base)
			     (log number)))
	(unless result
	  (format t "(log ~A ~A) ->~%  ~S~%" number base cond))))))

Change History (1)

comment:1 Changed 10 years ago by rtoy

  • Resolution set to fixed
  • Status changed from new to closed

Fixed. Should handle double-double-float's too.

Note: See TracTickets for help on using tickets.