[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
doco rounding functions
From: |
Kevin Ryde |
Subject: |
doco rounding functions |
Date: |
Thu, 28 Aug 2003 10:01:57 +1000 |
User-agent: |
Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3 (gnu/linux) |
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- doco rounding functions,
Kevin Ryde <=