mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 23:00:22 +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:
parent
416715f48a
commit
94270e8175
1 changed files with 18 additions and 17 deletions
|
@ -1015,21 +1015,9 @@ Return the hyperbolic arccosine of @var{x}.
|
||||||
Return the hyperbolic arctangent of @var{x}.
|
Return the hyperbolic arctangent of @var{x}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
For the hyperbolic arc-functions, the Guile library exports C functions
|
C functions for the above are provided by the standard mathematics
|
||||||
corresponding to these Scheme procedures, but taking and returning
|
library. Naturally these expect and return @code{double} arguments
|
||||||
arguments of type @code{double} rather than the usual @code{SCM}.
|
(@pxref{Mathematics,,, libc, GNU C Library Reference Manual}).
|
||||||
|
|
||||||
@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.
|
|
||||||
|
|
||||||
@multitable {xx} {Scheme Procedure} {C Function}
|
@multitable {xx} {Scheme Procedure} {C Function}
|
||||||
@item @tab Scheme Procedure @tab 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{$asin} @tab @code{asin}
|
||||||
@item @tab @code{$acos} @tab @code{acos}
|
@item @tab @code{$acos} @tab @code{acos}
|
||||||
@item @tab @code{$atan} @tab @code{atan}
|
@item @tab @code{$atan} @tab @code{atan}
|
||||||
|
@item @tab @code{$atan2} @tab @code{atan2}
|
||||||
@item @tab @code{$exp} @tab @code{exp}
|
@item @tab @code{$exp} @tab @code{exp}
|
||||||
|
@item @tab @code{$expt} @tab @code{pow}
|
||||||
@item @tab @code{$log} @tab @code{log}
|
@item @tab @code{$log} @tab @code{log}
|
||||||
@item @tab @code{$sinh} @tab @code{sinh}
|
@item @tab @code{$sinh} @tab @code{sinh}
|
||||||
@item @tab @code{$cosh} @tab @code{cosh}
|
@item @tab @code{$cosh} @tab @code{cosh}
|
||||||
@item @tab @code{$tanh} @tab @code{tanh}
|
@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
|
@end multitable
|
||||||
|
|
||||||
@noindent
|
@code{asinh}, @code{acosh} and @code{atanh} are C99 standard but might
|
||||||
Naturally, these C functions expect and return @code{double} arguments.
|
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
|
@node Bitwise Operations
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue