Hi all,
I'm a newbie to lisp.
Technically, the value of (mod a 1.0) is equal to the fractional part
of 'a' (assuming 'a' is a floating point value).
[prompt]> (mod 1.25 1.0)
[ans] 0.25
But why does the following fail ?
[prompt]> (mod 1.89232E9 1.0)
0.0
The fractional part must be 0.892... but I get zero. Why ?
On Apr 10, 8:51 pm, bdsatish <········@gmail.com> wrote:
> Hi all,
>
> I'm a newbie to lisp.
>
> Technically, the value of (mod a 1.0) is equal to the fractional part
> of 'a' (assuming 'a' is a floating point value).
>
> [prompt]> (mod 1.25 1.0)
> [ans] 0.25
>
> But why does the following fail ?
>
> [prompt]> (mod 1.89232E9 1.0)
> 0.0
>
> The fractional part must be 0.892... but I get zero. Why ?
Notice the "E9".
P� Fri, 11 Apr 2008 05:51:41 +0200, skrev bdsatish <········@gmail.com>:
> Hi all,
>
> I'm a newbie to lisp.
>
> Technically, the value of (mod a 1.0) is equal to the fractional part
> of 'a' (assuming 'a' is a floating point value).
>
> [prompt]> (mod 1.25 1.0)
> [ans] 0.25
>
> But why does the following fail ?
>
> [prompt]> (mod 1.89232E9 1.0)
> 0.0
>
> The fractional part must be 0.892... but I get zero. Why ?
Did you notice the E9 bit? thats * 10^9
(mod 1892320000.0 1.0) which is 0.0
--------------
John Thingstad