(defun csl (x y sd) (let ((lookup #2A((5.e-5 2.07e-4) (9.4e-5 4.14e-4) (1.35e-4 6.21e-4) (1.75e-4 8.27e-4) (2.14e-4 0.001033) (2.51e-4 0.00124) (2.88e-4 0.001446) (3.23e-4 0.001652) (3.58e-4 0.001858) (3.92e-4 0.002064) (4.25e-4 0.002269) (4.57e-4 0.002475) (4.89e-4 0.002681) (5.21e-4 0.002887) (5.52e-4 0.003092) (5.82e-4 0.003298) (6.12e-4 0.003504) (6.41e-4 0.003709) (6.7e-4 0.003915) (6.98e-4 0.00412) (7.26e-4 0.004326) (7.54e-4 0.004531) (7.81e-4 0.004737) (8.07e-4 0.004943) (8.34e-4 0.005148))) (ridist #1A(2/4269 17/4269 1/1423 2/4269 65/4269 4075/4269 31/1423 11/4269 1/4269)) ;;ridist indexed st 0=1.47 ;;each additional inde increments by .01 (sddist #1A(169/2128 477/2128 235/1064 43/266 473/4256 303/4256 25/532 4/133 79/4256 3/266 9/1064 17/4256 5/1064 13/4256 1/608 5/4256 1/2128 1/4256 1/2128 0 0 1/4256 0 1/4256)) ;;sddist starts at sd=1, goes to sd=25 (diff (abs (- y x))) (sd.to.ng nil) (sd.to.g nil)) (dotimes (i (array-dimension lookup 0)) (if (and (< diff (aref lookup i 0)) (eql nil sd.to.g)) (setf sd.to.g (+ i 1))) (if (and (> diff (aref lookup i 1)) (eql nil sd.to.ng)) (setf sd.to.ng (+ i 1)))) (cond ((<= diff (aref lookup (- sd 1) 0)) (format t "GUILTY!~%To be innocent increase distance between x and y by:~A~%" (- (aref lookup (- sd 1) 1) diff)) (if (eql nil sd.to.ng) (format t "No standard deviation will allow you to be innocent.~%") (format t "Alternatively, you could change your sd to: ~A~%" sd.to.ng))) ((> diff (aref lookup (- sd 1) 0)) (format t "NOT GUILTY!~%To be guilty you could decrease distance between x and y by :~A~%" (- diff (aref lookup (- sd 1) 0))) (if (eql nil sd.to.g) (format t "No standard deviation will allow you to be guilty.~%") (format t "Alternatively, you could change your sd to: ~A~%" sd.to.g)))) 'done))