[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] numbers egg - (angle y) feedback
From: |
Zbigniew |
Subject: |
Re: [Chicken-users] numbers egg - (angle y) feedback |
Date: |
Thu, 11 Oct 2007 19:57:32 -0500 |
I believe you are misunderstanding what angle is supposed to do.
ANGLE should return 0 (positive reals) or pi (negative reals) when its
argument has a zero imaginary component. The R5RS is abundantly clear
that the result of angle is a real number x s.t. -pi < x <= pi.
The current behavior of angle is consistent across multiple Scheme
implementations.
csi:
#;1> (angle 2)
0
#;2> (use numbers)
#;3> (angle 2)
0.0
scheme48:
> (angle 2)
0
guile> (angle 2)
0.0
On 10/11/07, Terrence Brannon <address@hidden> wrote:
> I tried to re-open the ticket on trac, but was told my submission was
> potential
> spam.
>
> The (angle) function does not coredump. But it gives a result of 0.0 for an
> argument of 2, which I do not think is correct. The same function in J gives
>
> -0.416147+0.909297i
>
> Here is a link to the J function, whose name is "r." ... that's right... "r"
> "dot"
> http://www.jsoftware.com/help/dictionary/drdot.htm
>
> The thing is, most J functions have a monadic and dyadic case. The monadic
> case
> is relevant in this case and has this description: "The result of r. y is a
> complex number of magnitude 1, whose real and imaginary parts are coordinates
> of the point on the unit circle at an angle of y radians."
>
>
>
>
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users
>