summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS11
-rw-r--r--doc/ref/ChangeLog7
-rw-r--r--libguile/ChangeLog11
3 files changed, 26 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 399080d5d..c7c912650 100644
--- a/NEWS
+++ b/NEWS
@@ -638,6 +638,17 @@ There is a huge number of these functions, for numbers, strings,
symbols, vectors, etc. They are documented in the reference manual in
the API section together with the types that they apply to.
+** New functions for dealing with complex numbers in C have been added.
+
+The new functions are scm_c_make_rectangular, scm_c_make_polar,
+scm_c_real_part, scm_c_imag_part, scm_c_magnitude and scm_c_angle.
+They work like scm_make_rectangular etc but take or return doubles
+directly.
+
+** The function scm_make_complex has been discouraged.
+
+Use scm_c_make_rectangular instead.
+
** The INUM macros have been deprecated.
A lot of code uses these macros to do general integer conversions,
diff --git a/doc/ref/ChangeLog b/doc/ref/ChangeLog
index c642db444..e41fd077a 100644
--- a/doc/ref/ChangeLog
+++ b/doc/ref/ChangeLog
@@ -1,8 +1,11 @@
2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
* api-data.texi: Added scm_is_real, scm_is_rational,
- scm_to_double, scm_from_double, numerator, and denominator.
-
+ scm_to_double, scm_from_double, numerator, and denominator. Added
+ scm_is_complex, scm_is_number, scm_c_make_rectangular,
+ scm_c_make_polar, scm_c_rela_part, scm_c_imag_part,
+ scm_c_magnitude, and scm_c_angle.
+
2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
* gh.texi: Replaced references to scm_num2* with scm_to_* and
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 454f6e357..566aa6661 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -2,7 +2,16 @@
* numbers.h. numbers.c (scm_make_ratio): Renamed to
scm_i_make_ratio and made static, replaced uses with scm_divide.
-
+ (scm_complex_p): New, export as "complex?" to Scheme.
+ (scm_number_p): Export as "number?" to Scheme.
+ (scm_is_complex, scm_is_number): New.
+ (scm_c_make_rectangular, scm_c_make_polar): New.
+ (scm_make_rectangular, scm_make_polar): Use above.
+ (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
+ New.
+ (scm_make_complex): Discouraged by moving to discouraged.h and
+ discouraged.c. Replaced all uses with scm_c_make_rectangular.
+
* discouraged.h, discouraged.c, numbers.c, numbers.h
(scm_is_rational): New.
(scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,