/[guile]/guile/guile-core/doc/ref/scheme-data.texi
ViewVC logotype

Diff of /guile/guile-core/doc/ref/scheme-data.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by ossau, Fri Mar 15 14:03:53 2002 UTC revision 1.15 by ossau, Sat Mar 16 00:27:25 2002 UTC
# Line 714  called with one argument @var{z1}, 1/@va Line 714  called with one argument @var{z1}, 1/@va
714    
715  @c begin (texi-doc-string "guile" "abs")  @c begin (texi-doc-string "guile" "abs")
716  @deffn {Scheme Procedure} abs x  @deffn {Scheme Procedure} abs x
717    @deffnx {C Function} scm_abs (x)
718  Return the absolute value of @var{x}.  Return the absolute value of @var{x}.
719    
720    @var{x} must be a number with zero imaginary part.  To calculate the
721    magnitude of a complex number, use @code{magnitude} instead.
722  @end deffn  @end deffn
723    
724  @c begin (texi-doc-string "guile" "max")  @c begin (texi-doc-string "guile" "max")
# Line 747  Round the number @var{x} towards minus i Line 751  Round the number @var{x} towards minus i
751  Round the number @var{x} towards infinity.  Round the number @var{x} towards infinity.
752  @end deffn  @end deffn
753    
754    For the @code{truncate} and @code{round} procedures, the Guile library
755    exports equivalent C functions, but taking and returning arguments of
756    type @code{double} rather than the usual @code{SCM}.
757    
758    @deftypefn {C Function} double scm_truncate (double x)
759    @deftypefnx {C Function} double scm_round (double x)
760    @end deftypefn
761    
762    For @code{floor} and @code{ceiling}, the equivalent C functions are
763    @code{floor} and @code{ceil} from the standard mathematics library
764    (which also take and return @code{double} arguments).
765    
766    
767  @node Scientific  @node Scientific
768  @subsection Scientific Functions  @subsection Scientific Functions
# Line 955  Return the hyperbolic arccosine of @var{ Line 971  Return the hyperbolic arccosine of @var{
971  Return the hyperbolic arctangent of @var{x}.  Return the hyperbolic arctangent of @var{x}.
972  @end deffn  @end deffn
973    
974    For the hyperbolic arc-functions, the Guile library exports C functions
975    corresponding to these Scheme procedures, but taking and returning
976    arguments of type @code{double} rather than the usual @code{SCM}.
977    
978    @deftypefn {C Function} double scm_asinh (double x)
979    @deftypefnx {C Function} double scm_acosh (double x)
980    @deftypefnx {C Function} double scm_atanh (double x)
981    Return the hyperbolic arcsine, arccosine or arctangent of @var{x}
982    respectively.
983    @end deftypefn
984    
985    For all the other Scheme procedures above, except @code{expt} and
986    @code{atan2} (whose entries specifically mention an equivalent C
987    function), the equivalent C functions are those provided by the standard
988    mathematics library.  The mapping is as follows.
989    
990    @multitable {xx} {Scheme Procedure} {C Function}
991    @item @tab Scheme Procedure @tab C Function
992    
993    @item @tab @code{$abs}      @tab @code{fabs}
994    @item @tab @code{$sqrt}     @tab @code{sqrt}
995    @item @tab @code{$sin}      @tab @code{sin}
996    @item @tab @code{$cos}      @tab @code{cos}
997    @item @tab @code{$tan}      @tab @code{tan}
998    @item @tab @code{$asin}     @tab @code{asin}
999    @item @tab @code{$acos}     @tab @code{acos}
1000    @item @tab @code{$atan}     @tab @code{atan}
1001    @item @tab @code{$exp}      @tab @code{exp}
1002    @item @tab @code{$log}      @tab @code{log}
1003    @item @tab @code{$sinh}     @tab @code{sinh}
1004    @item @tab @code{$cosh}     @tab @code{cosh}
1005    @item @tab @code{$tanh}     @tab @code{tanh}
1006    @end multitable
1007    
1008    @noindent
1009    Naturally, these C functions expect and return @code{double} arguments.
1010    
1011    
1012  @node Bitwise Operations  @node Bitwise Operations
1013  @subsection Bitwise Operations  @subsection Bitwise Operations

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26