implement transcendental sin, cos etc in c; deprecate $sin, $cos, etc
* libguile/deprecated.h:
* libguile/deprecated.c (scm_asinh, scm_acosh, scm_atanh): Deprecate
these stand-ins for the C99 asinh, acosh, and atanh functions. Guile
is not gnulib.
(scm_sys_atan2): Deprecate as well, in favor of scm_atan.
* libguile/numbers.h:
* libguile/numbers.c (scm_sin, scm_cos, scm_tan)
(scm_sinh, scm_cosh, scm_tanh)
(scm_asin, scm_acos, scm_atan)
(scm_sys_asinh, scm_sys_acosh, scm_sys_atanh): New functions,
replacing the combination of dsubrs and boot-9 wrappers with C subrs
that handle complex values. The latter three have _sys_ in their names
due to the name conflict with the deprecated scm_asinh et al.
Remove the $abs, $sin etc "dsubrs".
* module/ice-9/boot-9.scm: Remove transcendental functions, as this all
happens in C now.
* module/ice-9/deprecated.scm: Add aliases for $sin et al.
* test-suite/tests/ramap.test ("array-map!"): Adjust "dsubr" tests to
use sqrt, not $sqrt. They don't actually test dsubrs now. In the
two-source test, I'm pretty sure the dsubr array-map! should have been
failing, as indeed it does now; I've changed the test case to expect
the failure. I'd still like to know why it was succeeding before.
This commit is contained in:
parent
6fc4d0124d
commit
ad79736c68
7 changed files with 363 additions and 220 deletions
|
|
@ -245,15 +245,23 @@ SCM_API SCM scm_product (SCM x, SCM y);
|
|||
SCM_API SCM scm_divide (SCM x, SCM y);
|
||||
SCM_API SCM scm_floor (SCM x);
|
||||
SCM_API SCM scm_ceiling (SCM x);
|
||||
SCM_API double scm_asinh (double x);
|
||||
SCM_API double scm_acosh (double x);
|
||||
SCM_API double scm_atanh (double x);
|
||||
SCM_API double scm_c_truncate (double x);
|
||||
SCM_API double scm_c_round (double x);
|
||||
SCM_API SCM scm_truncate_number (SCM x);
|
||||
SCM_API SCM scm_round_number (SCM x);
|
||||
SCM_API SCM scm_expt (SCM z1, SCM z2);
|
||||
SCM_API SCM scm_sys_atan2 (SCM z1, SCM z2);
|
||||
SCM_API SCM scm_sin (SCM z);
|
||||
SCM_API SCM scm_cos (SCM z);
|
||||
SCM_API SCM scm_tan (SCM z);
|
||||
SCM_API SCM scm_sinh (SCM z);
|
||||
SCM_API SCM scm_cosh (SCM z);
|
||||
SCM_API SCM scm_tanh (SCM z);
|
||||
SCM_API SCM scm_asin (SCM z);
|
||||
SCM_API SCM scm_acos (SCM z);
|
||||
SCM_API SCM scm_atan (SCM x, SCM y);
|
||||
SCM_API SCM scm_sys_asinh (SCM z);
|
||||
SCM_API SCM scm_sys_acosh (SCM z);
|
||||
SCM_API SCM scm_sys_atanh (SCM z);
|
||||
SCM_API SCM scm_make_rectangular (SCM z1, SCM z2);
|
||||
SCM_API SCM scm_make_polar (SCM z1, SCM z2);
|
||||
SCM_API SCM scm_real_part (SCM z);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue