<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class="">** second issue:  LOOP clause MAXIMIZE**<br class="">in above function there is a clause  MAXIMIZE … FIXNUM .<br class="">In CCL (and several other implementations, with the exception of LispWorks) this causes that a wrong result (a negative number) is computed. Without the FIXNUM declaration the result is correct.<br class=""></blockquote><br class="">Does it return the same result (perhaps more slowly) if the FIXNUM declaration is retained and the OPTIMIZE declaration is changed to something like (SAFETY 3) (SPEED 0) ?<br class=""></div></blockquote><div class=""><br class=""></div><div class="">The problem seems to appear without optimize declarations...</div><div class=""><br class=""></div><div class="">(defun get-longest-path (nodes node-id visited &aux (max 0))</div><div class="">  (setf (svref visited node-id) t)</div><div class="">  (setf max (loop for neighbour of-type route in (svref nodes node-id)</div><div class="">                  unless (svref visited (route-dest neighbour))</div><div class="">                  maximize (+ (the fixnum (route-cost neighbour))</div><div class="">                              (the fixnum (get-longest-path nodes</div><div class="">                                                            (route-dest neighbour)</div><div class="">                                                            visited)))</div><div class="">                            fixnum))</div><div class="">  (setf (svref visited node-id) nil)</div><div class="">  max)</div><div class=""><br class=""></div><div class="">Safety 3 and Speed 0 takes a long time and returns the wrong result: -1152921504606837995</div><div class=""><br class=""></div><div class="">The expected result would have been 8981.</div></div></div></blockquote><br class=""></div><div>it works for real, but not fixnum… The computed numbers are not outside the fixnum range, though.</div><div><br class=""></div><div>   … maximize (…) real )  works</div><div><br class=""></div><div><br class=""></div><br class=""></body></html>