public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Design Question
@ 2003-05-28 15:40 Andrew Binkley
  2003-05-29 10:28 ` Brian Gough
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Binkley @ 2003-05-28 15:40 UTC (permalink / raw)
  To: gsl-discuss

I am writing some complex number functions that I would like to contribute
to the GSL when they are complete.  They make use of functions like logb,
scalbn and log1p.  These functions are not included in the ansi standard,
however based on the following excerpt from the GSL Design Document I
think I should assume them:

"In this case, it is best to write code in terms of these native functions
to take advantage of the vendor-supplied system library (for example log1p
is a machine instruction on the Intel x86). The library also provides
portable implementations e.g. gsl_hypot which are used as an automatic
fall back via autoconf when necessary. See the usage of hypot in
`gsl/complex/math.c', the implementation of gsl_hypot and the
corresponding parts of files `configure.in' and `config.h.in' as an
example."

Is this the approach that would lead my code to being the most happily
integrated with the GSL?  Does this mean I shouldn't be using the -ansi
flag when testing my code?

Thanks,
Andrew Binkley

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Design Question
  2003-05-28 15:40 Design Question Andrew Binkley
@ 2003-05-29 10:28 ` Brian Gough
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Gough @ 2003-05-29 10:28 UTC (permalink / raw)
  To: Andrew Binkley; +Cc: gsl-discuss

Andrew Binkley writes:
 > I am writing some complex number functions that I would like to contribute
 > to the GSL when they are complete.  They make use of functions like logb,
 > scalbn and log1p. 

Feel free to use any functions that are defined in the GNU C Library
(all the ones you mention are).  If there isn't a fall-back version in
the sys/ directory in GSL then one can be added.

In the absence of the functions and substitutions in config.h you
won't be able to use -ansi, but it should work once the fall-back
functions are available.

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-29 10:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-28 15:40 Design Question Andrew Binkley
2003-05-29 10:28 ` Brian Gough

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).