Re: [pure-lang-users] C macros
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-08-25 18:15:42
|
On Mon, 2008-08-25 at 13:53 -0400, John Cowan wrote: > Eddie Rucker scripsit: > > > > How do I import constants defined as macros in C? > > and also macros like > > #define GSL_FN_FDF_EVAL_DF(FDF,x) (*((FDF)->df))(x,(FDF)->params) > > It's not possible, as all macros are removed in the first pass of the > compiler and don't make it into the shared library at all. For something > like this you need SWIG, which processes the source code. > Thanks. I noticed all of the math functions in math.pure are implemented in GSL. Quoted from the manual "For multiple-valued functions the branch cuts have been chosen to follow the conventions of Abramowitz and Stegun in the Handbook of Mathematical Functions. The functions return principal values which are the same as those in GNU Calc, which in turn are the same as those in Common Lisp, The Language (Second Edition)1 and the HP-28/48 series of calculators." e.r. |