Hi,
I've been writing a program that has something to do with
time processing. It uses the function get-internal-real-time
to measure time in an infinite loop.

I haven't been using running the program long enough to
experience the range-exceeding phenomenon, but I thought
of avoiding it in advance.

The problem may appear when I add some number to the
return value of get-internal-real-time -- what if, during addition,
the scheme fixnum limit is exceeded and the variable becomes
a bignum?

What would be the most efficient solution? Should I compute
the modulo of the sum by a fixnum (or its even divisor) to assure
that the bignum limit is never exceeded?

In low-level programming the case is simple, because the sum
also falls beyond the range as well and no advanced bignum
detection system is ever deployed. Is there a way to achieve the
same effect in guile scheme?

Regards
M.


Reply via email to