This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Should logior (and friends) operate only on inums?
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> "Greg J. Badros" <gjb@cs.washington.edu> writes:
>
> > Making it work with bignums is more than just a matter of argument
> > conversion, right?
>
> Yes. :)
>
> > (logior (exact->inexact 1) 2)
> >
> > throw an error?
>
> Yes, I think so.
>
> > I.e., if it happens to be an inexact number that, for all intents
> > and purposes is an integer, should the primitive be that picky?
>
> In my opinion, since `logior' has no meaning for the general inexact
> numbers, it should be restricted to exact values.
Okay by me. For now I've reverted back to the behaviour of guile-1.3.4,
but used the new SCM_VALIDATE_ULONG_COPY abstraction to make it easy to
switch to a new conversion function later.
Greg