<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Double floats cause issues with the compiler </div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><font face="Courier New">md> (setf *read-default-float-format* 'double-float)</font></div><div><font face="Courier New">double-float</font></div><div><font face="Courier New">md> (ps '(1.0 2.0 3.0))</font></div><div><font face="Courier New">"[1.0D0, 2.0D0, 3.0D0];"</font></div></blockquote><div><br></div><div>since 1.0D0 isn't javascript</div><div><br></div><div>This is a simpler example:</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font face="Courier New">md> (ps 1.0D0)</font></div></div><div><div><font face="Courier New">"1.0D0;"</font></div></div></blockquote><div><br></div><div>Adding...</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font face="Courier New">(defmethod ps-print ((x double-float))</font></div></div><div><div><font face="Courier New"> (format *psw-stream* "~F" (coerce x 'single-float)))</font></div></div></blockquote><div><br></div><div>to printer.lisp resolves the problem.</div><div><br></div><div>At which point it's tempting to rework the ps-print method on number with:</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font face="Courier New">(defmethod ps-print ((x double-float))</font></div></div><div><div><font face="Courier New"> (format *psw-stream* "~F" (coerce x 'single-float)))</font></div></div><div><div><font face="Courier New"><br></font></div></div><div><div><font face="Courier New">(defmethod ps-print ((x integer))</font></div></div><div><div><font face="Courier New"> (format *psw-stream* "~D" x))</font></div></div><div><div><font face="Courier New"><br></font></div></div><div><div><font face="Courier New">(defmethod ps-print ((x number))</font></div></div><div><div><font face="Courier New"> (format *psw-stream* "~F" x))</font></div></div><div><font face="Courier New"><br></font></div></blockquote>Thanks for this awesome tool! - ben</body></html>