freenode/#sbcl - IRC Chatlog
Search
0:06:33
|3b|
no 1f+-0 ? not sure if ccl or whichever impl accepts that generates more than 1 NaN though
4:25:59
johnjay
i found a small CL project on github and downloaded it. been trying to fiddle with sbcl to run it
5:17:04
reepca
could someone with the latest sbcl try running http://paste.debian.net/1120751 and see what sort of error it produces?
5:17:05
minion
reepca, memo from phoe: oh, if you have a one-dimensional array, then COPY-SEQ will work, yes
10:42:44
phoe
Or rather, why does the type engine think that it can return a complex value? Isn't it that only possible when SQRT receives a negative number as its input?
10:48:15
phoe
(* x x) is always supposed to be non-negative and a sum of three non-negative values is always supposed to be non-negative
10:53:22
phoe
it seems that SBCL thinks that (* x x) is of type SINGLE-FLOAT but (expt x 2) is of type (SINGLE-FLOAT 0.0)
10:54:24
no-defun-allowed
When I did (defun f (x) (declare (real x)) (* x x)), I got an OR type of all the positive real representations.
11:09:59
scymtym
for (lambda (x) (declare (type single-float x)) (sqrt (* x x))) SBCL knows that the result will be a real
11:12:34
edgar-rft
phoe: if I (declare (type single-float ox oy oz vx vy vz)) after the with-accessors lines the compiler warning goes away
11:12:52
reepca
I think it has something to do with with-accessors. I replaced the inner with-accessors with a simple let binding and I don't get any notes.
11:20:53
scymtym
for a lexical variable x, the compiler knows that (* x x) is non-negative. for a function call (even a structure slot reader), the compiler doesn't know that (* (x v) (x v)) is non-negative
11:21:44
scymtym
the latter case would require some form of common sub-expression elimination which SBCL doesn't do. as a result, the WITH-ACCESSORS variant also loads the structure slot values into MMX registers twice
11:30:20
minion
karlosz, memo from flip214: we're scheduling right now... please tell us all topics and approx. time