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

(Primitive Numerics): Add atan2, pow, asinh, acosh

and atanh to scheme<->C table.  Note asinh, acosh and atanh are C99,
and scm_asinh, scm_acosh and scm_atanh are equivalents.  Cross ref
glibc "Mathematics".  Reword this end part for clarity.
This commit is contained in:
Kevin Ryde 2003-06-11 22:57:13 +00:00
parent 416715f48a
commit 94270e8175

View file

@ -1015,21 +1015,9 @@ Return the hyperbolic arccosine of @var{x}.
Return the hyperbolic arctangent of @var{x}.
@end deffn
For the hyperbolic arc-functions, the Guile library exports C functions
corresponding to these Scheme procedures, but taking and returning
arguments of type @code{double} rather than the usual @code{SCM}.
@deftypefn {C Function} double scm_asinh (double x)
@deftypefnx {C Function} double scm_acosh (double x)
@deftypefnx {C Function} double scm_atanh (double x)
Return the hyperbolic arcsine, arccosine or arctangent of @var{x}
respectively.
@end deftypefn
For all the other Scheme procedures above, except @code{expt} and
@code{atan2} (whose entries specifically mention an equivalent C
function), the equivalent C functions are those provided by the standard
mathematics library. The mapping is as follows.
C functions for the above are provided by the standard mathematics
library. Naturally these expect and return @code{double} arguments
(@pxref{Mathematics,,, libc, GNU C Library Reference Manual}).
@multitable {xx} {Scheme Procedure} {C Function}
@item @tab Scheme Procedure @tab C Function
@ -1042,15 +1030,28 @@ mathematics library. The mapping is as follows.
@item @tab @code{$asin} @tab @code{asin}
@item @tab @code{$acos} @tab @code{acos}
@item @tab @code{$atan} @tab @code{atan}
@item @tab @code{$atan2} @tab @code{atan2}
@item @tab @code{$exp} @tab @code{exp}
@item @tab @code{$expt} @tab @code{pow}
@item @tab @code{$log} @tab @code{log}
@item @tab @code{$sinh} @tab @code{sinh}
@item @tab @code{$cosh} @tab @code{cosh}
@item @tab @code{$tanh} @tab @code{tanh}
@item @tab @code{$asinh} @tab @code{asinh}
@item @tab @code{$acosh} @tab @code{acosh}
@item @tab @code{$atanh} @tab @code{atanh}
@end multitable
@noindent
Naturally, these C functions expect and return @code{double} arguments.
@code{asinh}, @code{acosh} and @code{atanh} are C99 standard but might
not be available on older systems. Guile provides the following
equivalents (on all systems).
@deftypefn {C Function} double scm_asinh (double x)
@deftypefnx {C Function} double scm_acosh (double x)
@deftypefnx {C Function} double scm_atanh (double x)
Return the hyperbolic arcsine, arccosine or arctangent of @var{x}
respectively.
@end deftypefn
@node Bitwise Operations