1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 23:00:22 +02:00

*** empty log message ***

This commit is contained in:
Marius Vollmer 2004-08-03 17:16:29 +00:00
parent 5615f696b6
commit 96d8c21757
3 changed files with 26 additions and 3 deletions

11
NEWS
View file

@ -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 symbols, vectors, etc. They are documented in the reference manual in
the API section together with the types that they apply to. 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. ** The INUM macros have been deprecated.
A lot of code uses these macros to do general integer conversions, A lot of code uses these macros to do general integer conversions,

View file

@ -1,8 +1,11 @@
2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de> 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
* api-data.texi: Added scm_is_real, scm_is_rational, * 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> 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
* gh.texi: Replaced references to scm_num2* with scm_to_* and * gh.texi: Replaced references to scm_num2* with scm_to_* and

View file

@ -2,7 +2,16 @@
* numbers.h. numbers.c (scm_make_ratio): Renamed to * numbers.h. numbers.c (scm_make_ratio): Renamed to
scm_i_make_ratio and made static, replaced uses with scm_divide. 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 * discouraged.h, discouraged.c, numbers.c, numbers.h
(scm_is_rational): New. (scm_is_rational): New.
(scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big, (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,