Waldek Hebisch <[EMAIL PROTECTED]> writes:
> Martin Rubey wrote:
> >
> > Waldek Hebisch <[EMAIL PROTECTED]> writes:
> >
> > > I believe that problem we have is theoretically unsolvable:
> > >
> > > - Aldor assumes that Sint has at least 32 bit
> >
> > > - Aldor assumes that Sint is the same as SingleInteger
> >
> > I think that this is incorrect. At least, I do not know of a proof.
> >
>
> Well, all I have now is an impression -- people more familar with Aldor
> than I am should give definite answer. If this impression is incorrect
> and Sint and SingleInteger are really kept separate, then of course
> giving them different size will cause no problems.
>
> > > - FriCAS assumes that SingleInter is Lisp fixnum
> > > - sbcl on 32-bit machines has 30 bit fixnums (29 for positive values +
> > > sign)
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.
It would be nice, if aldor would accept an option --hash-size= that sets the
number of bits the hashing algorithm should use.
Of course, this makes little sense if it's too much work. In this case, we
should simply use
+ (deftype |SInt| () 'integer)
in foam_l.lisp.
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.
Martin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---