9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] erf etc
@ 2003-02-26 12:40 Steve Simon
  2003-02-26 16:33 ` Douglas A. Gwyn
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Simon @ 2003-02-26 12:40 UTC (permalink / raw)
  To: 9fans

Aw hell,

Made a fool of myself again.

erf, y[01n], j[01n], and gamma are all in the APE maths library on Plan9

Thanks to all for the sugestions of where to get the source anyway.

The only wrinkle is that they don't appear in maths.h so I get fp stack
faults when I try to us them - adding prototypes in my code solved the problem.

Those who know about standards may disagree but shouldn't their
prototypes go in maths.h

Also is there a reason they didn't make it into the plan9 libc.a & libc.h?

-Steve


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

* Re: [9fans] erf etc
  2003-02-26 12:40 [9fans] erf etc Steve Simon
@ 2003-02-26 16:33 ` Douglas A. Gwyn
  2003-02-26 18:00   ` Russ Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Douglas A. Gwyn @ 2003-02-26 16:33 UTC (permalink / raw)
  To: 9fans

Steve Simon wrote:
> erf, y[01n], j[01n], and gamma are all in the APE maths library on Plan9
> Those who know about standards may disagree but shouldn't their
> prototypes go in maths.h

Sure, just so long as they don't get declared by default in <math.h>.

You may not have been around for the big problem we had on Unix variants
with "name space pollution" in the system headers.  Cleaning that up was
one of the important goals of the C standard.  Now the rule is: standard
headers define & declare only what the standard says they do, with a
couple of classes of names reserved (e.g. is* in <ctype.h>), except that
implementations have a set of names starting with underscore that they
can add if they think they have some need to do so.  In other words, if
you add functions, use a new header.


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

* Re: [9fans] erf etc
  2003-02-26 16:33 ` Douglas A. Gwyn
@ 2003-02-26 18:00   ` Russ Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Russ Cox @ 2003-02-26 18:00 UTC (permalink / raw)
  To: 9fans

I added them to /*/include/ape/math.h,
in the _RESEARCH_SOURCE section.
(Meaning you have to compile with
-D_RESEARCH_SOURCE to get those declarations.)

Russ



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

end of thread, other threads:[~2003-02-26 18:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-26 12:40 [9fans] erf etc Steve Simon
2003-02-26 16:33 ` Douglas A. Gwyn
2003-02-26 18:00   ` Russ Cox

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 NNTP newsgroup(s).