This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: rationals in guile?


>>>>> "Per" == Per Bothner <bothner@cygnus.com> writes:

>> I for one don't miss rationals at all.  ...  3 out of 4 ain't bad.

Per> It just seems strange to have bignums but not rationals, since
Per> the extra effort (and overhead) of rationals once you have
Per> bignums seems fairly minor.  (Speaking as one who has implemented
Per> both.)

To say truth, I do not understand, why rationals are not supported in
many realizations of scheme (including that, which do support
bignums). To make rationals as smobs (having bignums) seems to be
nearly trivial, isn't it? 

It seems to be, the only difficulty is to insert rationals
into the tower of types
                              ---- complex
	integers -- rational /
                             \
                              ---- floats

I think, it would be better, if this will be done by someone, who
knows the internals of guile (is it true, that all changes will be
localized in numbers.c and numbers.h ?). That's why, if
nobody of gurus has time/possibility to do this now, I thought, it's
worth to make some preliminary steps, if they are necessary, to make
this work as easy as possible in future.

--
Best regards,
	V.Kamyshenko.