unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* doco rounding functions
@ 2003-08-28  0:01 Kevin Ryde
  0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2003-08-28  0:01 UTC (permalink / raw)


A bit of a table in the same style as the primitive numerics section,

        * scheme-data.texi (Arithmetic): Use a table for scheme to C libm
        equivalences, add C99 trunc.


   C functions for some of the above rounding functions are provided by
the standard C mathematics library.  Naturally these expect and return
`double' arguments (*note Rounding Functions: (libc)Rounding
Functions.).

     Scheme Procedure   C Function
     `floor'            `floor'
     `ceiling'          `ceil'
     `truncate'         `trunc'

   `trunc' is C99 standard and might not be available on older systems.
Guile provides an `scm_truncate' equivalent (on all systems), plus a C
level version of the `round' Scheme procedure.

 - C Function: double scm_truncate (double x)
 - C Function: double scm_round (double x)


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-28  0:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-28  0:01 doco rounding functions Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).