I am writing a library on top of grid/foreign-array that provides math functions corresponding to the ones in the Numbers Dictionary of the hyperspec (http://www.lispworks.com/documentation/HyperSpec/Body/c_number.htm)
(I will share it when it is done)
For those that are interested into details, it parses declarations of the type:
... (cos ((!F :return !F) (!C :return !C))) (tan ((!F :return !F) (!C :return !C))) ...
to generate generic functions and methods that will accept grid vectors:
(grid-cos #1(....)) returns a grid double-float of cosines of double floats (grid-cos #2(...)) returns a grid complex double-float of cosines of complex arguments.
Question: I am not sure how to store results for predicate type functions, such as minusp, zerop, and comparison functions >, = that return t or nil.
Is there a foreign-array or cl-array type that stores nils and t's?
Thanks,
Mirko