Martin Rubey wrote:
> I just was with Franz Lehner, who run into
>
> >> System error:
> The value 1152921504606846975 is not of type (SIGNED-BYTE 32).
>
> when trying to use aldor-combinat with 64 bit sbcl. Modifying
>
> - (deftype |SInt| () '(integer #.(- (expt 2 31)) #.(1- (expt 2 31))))
> + (deftype |SInt| () '(integer #.(- (expt 2 63)) #.(1- (expt 2 63))))
>
> made the problem go away. I think this suggests that aldor's hash algorithm
> uses different hash sizes depending on the number of bits available.
>
1152921504606846975 is exactly MOST-POSITIVE-FIXNUM. I do not think
it came from hash, rather somewhere there is explicit MOST-POSITIVE-FIXNUM.
In fact, in trunk we have:
(defmacro |SIntMax| () `(the |SInt| most-positive-fixnum))
in foam_l.lisp -- it seems that your patch does not include change
to this line.
> BTW, there was another bug in declare-prog. It really should read
>
> +;; name-result is a list, the car is the name of the function to be declared,
> +;; the cdr is the list of return values
> +;; params is a list of pairs, the car of each is the name of the argument,
> the
> +;; cdr is its type.
> +
> +;; in the ANSI Common Lisp ftype function declaration, the names of the
> +;; arguments do not appear, actually. In GCL, they did.
> +
> +;; Example:
> +;; (declare-prog
> +;; (|C25-csspecies-generBaseFn| |Clos| |Clos| |Clos| |Clos|)
> +;; ((|e1| |Env|)))
> (defmacro declare-prog (name-result params)
> - `(proclaim '(function ,(car name-result) ,params ,@(cdr name-result))))
> + `(proclaim '(ftype (function
> + ,(mapcar #'cadr params)
> + (values ,@(cdr name-result)))
> + ,(car name-result))))
>
>
>
> Doesn't seem to have much effect, though.
>
IIRC GCL allows ommiting the type of function, while Commom Lisp
spec reqires it. The line
,(or (cadr name-result) 't))
was intended to archive the same effect as in GCL -- if there is
no type than (cdr name-result) is NIL, (car NIL) is again NIL,
so or picks T -- in other words missing type should default to T.
--
Waldek Hebisch
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---