fork download
  1. (declaim (optimize speed (safety 0)))
  2.  
  3. (defun mand (c n &aux (z #c(0.0 0.0)))
  4. (declare ((complex single-float) z))
  5. (check-type c (complex single-float))
  6. (check-type n (and fixnum (integer 1)))
  7.  
  8. (dotimes (i n z)
  9. (setf z (+ c (* z z)))))
  10.  
  11. (defun main ()
  12. (let ((n (read))
  13. (c #c(0.04 0.01)))
  14. (print (mand c n))))
  15.  
  16. ;; (disassemble #'mand)
  17.  
  18. (main)
Success #stdin #stdout 0.42s 27000KB
stdin
100000000
stdout
#C(0.04161263 0.010907805)