Thing are more subtle than you think.  From point of view
of Lisp fixnum (our SingleInteger) is just a subrange of
integers.  However, this subrange has special properties,
in particular it is supposed to have efficient
representation.

Ah, that sounds similar to Aldor's BInt.

MachineInteger=SingleInteger=SInt corresponds to C long
BInt is Ptr

AFAIK, since BInt is a builtin type, it uses a special representation if the value is fitting into a C-long number. The trick is that if in the representation the lowest bit is set then the number is considered to be in a "SingleInteger" range, so it does appropriate (probably inlined) conversion and the corresponding operation.

It then simply sounds as if the underlying Lisp is doing similar things.

Insofar, Aldor's MachineInteger does not really correspond to FriCAS' SingleInteger. Rather, something like MachineInteger is non-existent in FriCAS (which I don't regret, btw, since implementation details should be hidden from the user as much as posssible).

Ralf

--
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.

Reply via email to