freebsd-dev/lib/libF77
Bruce Evans 5d8d8dd3b6 Use the C library version of log10() instead of the inaccurate formula
log10(x) = log10e * log(x).  This fixes some small (one or two ULP)
inaccuracies.

Found by:	ucbtest
1997-02-24 17:44:08 +00:00
..
abort_.c General -Wall warning cleanup, part I. 1996-07-12 18:57:58 +00:00
c_abs.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
c_cos.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
c_div.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
c_exp.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
c_log.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
c_sin.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
c_sqrt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
cabs.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_abs.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_acos.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_asin.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_atan.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_atn2.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_cnjg.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_cos.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_cosh.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_dim.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_exp.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_imag.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_int.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_lg10.c Use the C library version of log10() instead of the inaccurate formula 1997-02-24 17:44:08 +00:00
d_log.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_mod.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_nint.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_prod.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_sign.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_sin.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_sinh.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_sqrt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_tan.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
d_tanh.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
derf_.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
derfc_.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
ef1asc_.c General -Wall warning cleanup, part I. 1996-07-12 18:57:58 +00:00
ef1cmc_.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
erf_.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
erfc_.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
exit.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
f2ch.add Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
F77_aloc.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
getarg_.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
getenv_.c General -Wall warning cleanup, part I. 1996-07-12 18:57:58 +00:00
h_abs.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
h_dim.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
h_dnnt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
h_indx.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
h_len.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
h_mod.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
h_nint.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
h_sign.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
hl_ge.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
hl_gt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
hl_le.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
hl_lt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
i_abs.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
i_dim.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
i_dnnt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
i_indx.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
i_len.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
i_mod.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
i_nint.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
i_sign.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
iargc_.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
l_ge.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
l_gt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
l_le.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
l_lt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
libF77.xsum Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
main.c General -Wall warning cleanup, part I. 1996-07-12 18:57:58 +00:00
makefile Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
Notice Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
pow_ci.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
pow_dd.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
pow_di.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
pow_hh.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
pow_ii.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
pow_qq.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
pow_ri.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
pow_zi.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
pow_zz.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_abs.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_acos.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_asin.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_atan.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_atn2.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_cnjg.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_cos.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_cosh.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_dim.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_exp.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_imag.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_int.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_lg10.c Oops, I thought I was fixing the double precision lg10 in the 1997-02-24 17:35:33 +00:00
r_log.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_mod.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_nint.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_sign.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_sin.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_sinh.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_sqrt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_tan.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
r_tanh.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
README Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
s_cat.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
s_cmp.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
s_copy.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
s_paus.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
s_rnge.c General -Wall warning cleanup, part I. 1996-07-12 18:57:58 +00:00
s_stop.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
sig_die.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
signal_.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
system_.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
Version.c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
z_abs.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
z_cos.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
z_div.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
z_exp.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
z_log.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
z_sin.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
z_sqrt.c Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00

If your compiler does not recognize ANSI C headers,
compile with KR_headers defined:  either add -DKR_headers
to the definition of CFLAGS in the makefile, or insert

#define KR_headers

at the top of f2c.h , cabs.c , main.c , and sig_die.c .

Under MS-DOS, compile s_paus.c with -DMSDOS.

If you have a really ancient K&R C compiler that does not understand
void, add -Dvoid=int to the definition of CFLAGS in the makefile.

If you use a C++ compiler, first create a local f2c.h by appending
f2ch.add to the usual f2c.h, e.g., by issuing the command
	make f2c.h
which assumes f2c.h is installed in /usr/include .

If your system lacks onexit() and you are not using an ANSI C
compiler, then you should compile main.c, s_paus.c, s_stop.c, and
sig_die.c with NO_ONEXIT defined.  See the comments about onexit in
the makefile.

If your system has a double drem() function such that drem(a,b)
is the IEEE remainder function (with double a, b), then you may
wish to compile r_mod.c and d_mod.c with IEEE_drem defined.
On some systems, you may also need to compile with -Ddrem=remainder .

To check for transmission errors, issue the command
	make check
This assumes you have the xsum program whose source, xsum.c,
is distributed as part of "all from f2c/src".  If you do not
have xsum, you can obtain xsum.c by sending the following E-mail
message to netlib@research.att.com
	send xsum.c from f2c/src

The makefile assumes you have installed f2c.h in a standard
place (and does not cause recompilation when f2c.h is changed);
f2c.h comes with "all from f2c" (the source for f2c) and is
available separately ("f2c.h from f2c").

Most of the routines in libF77 are support routines for Fortran
intrinsic functions or for operations that f2c chooses not
to do "in line".  There are a few exceptions, summarized below --
functions and subroutines that appear to your program as ordinary
external Fortran routines.

1.	CALL ABORT prints a message and causes a core dump.

2.	ERF(r) and DERF(d) and the REAL and DOUBLE PRECISION
	error functions (with x REAL and d DOUBLE PRECISION);
	DERF must be declared DOUBLE PRECISION in your program.
	Both ERF and DERF assume your C library provides the
	underlying erf() function (which not all systems do).

3.	ERFC(r) and DERFC(d) are the complementary error functions:
	ERFC(r) = 1 - ERF(r) and DERFC(d) = 1.d0 - DERFC(d)
	(except that their results may be more accurate than
	explicitly evaluating the above formulae would give).
	Again, ERFC and r are REAL, and DERFC and d are DOUBLE
	PRECISION (and must be declared as such in your program),
	and ERFC and DERFC rely on your system's erfc().

4.	CALL GETARG(n,s), where n is an INTEGER and s is a CHARACTER
	variable, sets s to the n-th command-line argument (or to
	all blanks if there are fewer than n command-line arguments);
	CALL GETARG(0,s) sets s to the name of the program (on systems
	that support this feature).  See IARGC below.

5.	CALL GETENV(name, value), where name and value are of type
	CHARACTER, sets value to the environment value, $name, of
	name (or to blanks if $name has not been set).

6.	NARGS = IARGC() sets NARGS to the number of command-line
	arguments (an INTEGER value).

7.	CALL SIGNAL(n,func), where n is an INTEGER and func is an
	EXTERNAL procedure, arranges for func to be invoked when
	signal n occurs (on systems where this makes sense).

8.	CALL SYSTEM(cmd), where cmd is of type CHARACTER, passes
	cmd to the system's command processor (on systems where
	this can be done).

The makefile does not attempt to compile pow_qq.c, which is meant
for use with INTEGER*8.  To use it, you must modify f2c.h to
declare longint appropriately; then add pow_qq.o to the POW =
line in the makefile.

Following Fortran 90, s_cat.c and s_copy.c allow the target of a
(character string) assignment to be appear on its right-hand, at
the cost of some extra overhead for all run-time concatenations.
If you prefer the  extra efficiency that comes with the Fortran 77
requirement that the left-hand side of a character assignment not
be involved in the right-hand side, compile s_cat.c and s_copy.c
with -DNO_OVERWRITE .