[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
angle and scm_flo0
From: |
Kevin Ryde |
Subject: |
angle and scm_flo0 |
Date: |
Fri, 18 Jul 2003 09:45:42 +1000 |
User-agent: |
Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) |
To save a bit of consing and calls to atan2,
* numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
and real.
I guess the same can be done for negatives, returning pi. Would
scm_sys_protects be the right place to add an scm_flo_pi? I see
abs_most_negative_fixnum uses scm_permanent_object instead.
For the actual pi value, I guess there'd be a choice between M_PI and
the return from atan2(0.0,-1.0). The two ought to be the same of
course. Maybe use the constant and have one of the tests see that
atan2 agrees.
numbers.c.angle-flo0.diff
Description: Text document
angle.test
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- angle and scm_flo0,
Kevin Ryde <=