[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
doco primitive numerics C funcs
From: |
Kevin Ryde |
Subject: |
doco primitive numerics C funcs |
Date: |
Sat, 07 Jun 2003 08:24:09 +1000 |
User-agent: |
Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) |
* scheme-data.texi (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.
I think it's clearer to have the scheme<->C table first, then the
extra inverse-hyperbolics.
I found the bit
except `expt' and `atan2' (whose entries specifically mention
an equivalent C function)
a little unclear. I thought it was saying there were C "double"
functions mentioned, where instead it's SCM functions. I think this
can be quietly dropped now $expt<->pow and $atan2<->atan2 are in the
table.
For ease of contemplation, the end part proposed is,
C functions for the above are provided by the standard mathematics
library. Naturally these expect and return `double' arguments (*note
Mathematics: (libc)Mathematics.).
Scheme Procedure C Function
`$abs' `fabs'
`$sqrt' `sqrt'
`$sin' `sin'
`$cos' `cos'
`$tan' `tan'
`$asin' `asin'
`$acos' `acos'
`$atan' `atan'
`$atan2' `atan2'
`$exp' `exp'
`$expt' `pow'
`$log' `log'
`$sinh' `sinh'
`$cosh' `cosh'
`$tanh' `tanh'
`$asinh' `asinh'
`$acosh' `acosh'
`$atanh' `atanh'
`asinh', `acosh' and `atanh' are C99 standard but might not be
available on older systems. Guile provides the following equivalents
(on all systems).
- C Function: double scm_asinh (double x)
- C Function: double scm_acosh (double x)
- C Function: double scm_atanh (double x)
Return the hyperbolic arcsine, arccosine or arctangent of X
respectively.
scheme-data.texi.primitive-numerics.diff
Description: Text document
- doco primitive numerics C funcs,
Kevin Ryde <=