guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ratio implementation


From: Kevin Ryde
Subject: Re: ratio implementation
Date: Wed, 15 Oct 2003 09:01:02 +1000
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Bill Schottstaedt <address@hidden> writes:
>
>           "Formally, the function returns an integer equivalent to\n"
>           "@code{(inexact->exact (floor (* @var{n} (expt 2 @var{cnt}))))}.\n"

I think I removed words like that from manual, on the basis that they
weren't as clear as they could be.

> guile> (ash .1 2)
> 0.4

I guess that's only a side effect of using scm_product.  It really
shouldn't be doing that of course, it ought to be bit shifting not
multiplying.

No doubt ash could work on flonums in a sensible way, but maybe
there's no particular need for that, if other bitwise logical
functions (ie. everything under "Bitwise Operations" in the manual)
only take integers.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]