inlining pow(x,two)

Tom MacDonald uunet!fig.cray.com!tam
Wed Apr 3 19:50:27 PST 1991


> If you're asking for a vote on errno I completely agree: "errno has to
> go".  Many reason's exist.  It's indefensible in single threaded
> environments and worse in multi-threaded programs (perhaps not
> directly initiated by the programmer).
> 
> I hear that compatibility is the main issue.  What programs will break if
> math related errors no longer use errno?
> 
> Jerry Huck
> Hewlett Packard

One program that breaks is `awk' which is a standard unix utility.  I've run
into an X-windows calculator that breaks.  This calculator used errno
to allow it to print "error" in the display window when you tried things
like taking the sqrt of a negative number.  There are a couple of other
standard unix commands or utilities that break, although I can't remember
them off the top of my head.

In all practicality though no numeric applications breaks.  Cray C compilers
have been in the field since 1985 and not one complaint from customers about
the missing `errno' functionality.  There is a strict ANSI mode on the
Standard C Compiler (released in 1989) that enables `errno' processing but
everyone seems to bump into something in their code that is not strictly ANSI.
The strict ANSI mode just allows us to get past the test suites.

In the next release of the Standard C Compiler a new option will be
provided to just enable the errno processing.  This makes it easier
to build things like `awk'

not-an-errno-fan-ly yours,

Tom MacDonald
Cray Research



More information about the Numeric-interest mailing list