Mercurial > hg > octave-lojdl
changeset 1255:fa24599e3d2c
[project @ 1995-04-11 17:49:27 by jwe]
author | jwe |
---|---|
date | Tue, 11 Apr 1995 17:49:27 +0000 |
parents | ecf3dc595ecb |
children | 8ed7f351d0de |
files | liboctave/acosh.c liboctave/asinh.c liboctave/atanh.c liboctave/erf.c liboctave/erfc.c liboctave/gamma.c liboctave/lgamma.c src/expm.cc src/givens.cc src/mappers.cc src/qzval.cc src/rand.cc src/syl.cc src/sysdep.cc |
diffstat | 14 files changed, 94 insertions(+), 81 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/acosh.c +++ b/liboctave/acosh.c @@ -28,12 +28,12 @@ #include "f77-uscore.h" -extern double F77_FCN (dacosh) (const double&); +extern double F77_FCN (dacosh, DACOSH) (const double&); double acosh (double x) { - return F77_FCN (dacosh) (x); + return F77_FCN (dacosh, DACOSH) (x); } #endif
--- a/liboctave/asinh.c +++ b/liboctave/asinh.c @@ -28,12 +28,12 @@ #include "f77-uscore.h" -extern double F77_FCN (dasinh) (const double&); +extern double F77_FCN (dasinh, DASINH) (const double&); double asinh (double x) { - return F77_FCN (dasinh) (x); + return F77_FCN (dasinh, DASINH) (x); } #endif
--- a/liboctave/atanh.c +++ b/liboctave/atanh.c @@ -28,12 +28,12 @@ #include "f77-uscore.h" -extern double F77_FCN (datanh) (const double&); +extern double F77_FCN (datanh, DATANH) (const double&); double atanh (double x) { - return F77_FCN (datanh) (x); + return F77_FCN (datanh, DATANH) (x); } #endif
--- a/liboctave/erf.c +++ b/liboctave/erf.c @@ -28,12 +28,12 @@ #include "f77-uscore.h" -extern double F77_FCN (derf) (const double&); +extern double F77_FCN (derf, DERF) (const double&); double erf (double x) { - return F77_FCN (derf) (x); + return F77_FCN (derf, DERF) (x); } #endif
--- a/liboctave/erfc.c +++ b/liboctave/erfc.c @@ -28,12 +28,12 @@ #include "f77-uscore.h" -extern double F77_FCN (derfc) (const double&); +extern double F77_FCN (derfc, DERFC) (const double&); double erfc (double x) { - return F77_FCN (derfc) (x); + return F77_FCN (derfc, DERFC) (x); } #endif
--- a/liboctave/gamma.c +++ b/liboctave/gamma.c @@ -28,12 +28,12 @@ #include "f77-uscore.h" -extern double F77_FCN (dgamma) (const double&); +extern double F77_FCN (dgamma, DGAMMA) (const double&); double gamma (double x) { - return F77_FCN (dgamma) (x); + return F77_FCN (dgamma, DGAMMA) (x); } #endif
--- a/liboctave/lgamma.c +++ b/liboctave/lgamma.c @@ -33,7 +33,7 @@ int signgam; -extern int F77_FCN (dlgams) (const double&, double&, double&); +extern int F77_FCN (dlgams, DLGAMS) (const double&, double&, double&); double lgamma (double x) @@ -41,7 +41,7 @@ double result; double sgngam; - F77_FCN (dlgams) (x, result, sgngam); + F77_FCN (dlgams, DLGAMS) (x, result, sgngam); signgam = (int) sgngam;
--- a/src/expm.cc +++ b/src/expm.cc @@ -46,11 +46,13 @@ extern "C" { - double F77_FCN (dlange) (const char*, const int&, const int&, - const double*, const int&, double*); + double F77_FCN (dlange, DLANGE) (const char*, const int&, + const int&, const double*, + const int&, double*); - double F77_FCN (zlange) (const char*, const int&, const int&, - const Complex*, const int&, double*); + double F77_FCN (zlange, ZLANGE) (const char*, const int&, + const int&, const Complex*, + const int&, double*); } DEFUN_DLD_BUILTIN ("expm", Fexpm, Sexpm, 2, 1, @@ -135,8 +137,9 @@ // Preconditioning step 3: scaling. ColumnVector work(nc); - inf_norm = F77_FCN (dlange) ("I", nc, nc, m.fortran_vec (), nc, - work.fortran_vec ()); + inf_norm = F77_FCN (dlange, DLANGE) ("I", nc, nc, + m.fortran_vec (), nc, + work.fortran_vec ()); sqpow = (int) (1.0 + log (inf_norm) / log (2.0)); @@ -227,8 +230,9 @@ // Preconditioning step 3: scaling. ColumnVector work (nc); - inf_norm = F77_FCN (zlange) ("I", nc, nc, m.fortran_vec (), nc, - work.fortran_vec ()); + inf_norm = F77_FCN (zlange, ZLANGE) ("I", nc, nc, + m.fortran_vec (), nc, + work.fortran_vec ()); sqpow = (int) (1.0 + log (inf_norm) / log (2.0));
--- a/src/givens.cc +++ b/src/givens.cc @@ -40,11 +40,11 @@ extern "C" { - int F77_FCN (dlartg) (const double&, const double&, double&, double&, - double&); + int F77_FCN (dlartg, DLARTG) (const double&, const double&, double&, + double&, double&); - int F77_FCN (zlartg) (const Complex&, const Complex&, double&, - Complex&, Complex&); + int F77_FCN (zlartg, ZLARTG) (const Complex&, const Complex&, + double&, Complex&, Complex&); } DEFUN_DLD_BUILTIN ("givens", Fgivens, Sgivens, 3, 2, @@ -118,7 +118,7 @@ { Complex cs, temp_r; - F77_FCN (zlartg) (cx, cy, cc, cs, temp_r); + F77_FCN (zlartg, ZLARTG) (cx, cy, cc, cs, temp_r); switch (nargout) { @@ -149,7 +149,7 @@ { double s, temp_r; - F77_FCN (dlartg) (x, y, cc, s, temp_r); + F77_FCN (dlartg, DLARTG) (x, y, cc, s, temp_r); switch (nargout) {
--- a/src/mappers.cc +++ b/src/mappers.cc @@ -44,8 +44,8 @@ extern "C" { - double F77_FCN (dgamma) (const double&); - int F77_FCN (dlgams) (const double&, double&, double&); + double F77_FCN (dgamma, DGAMMA) (const double&); + int F77_FCN (dlgams, DLGAMS) (const double&, double&, double&); } #ifndef M_LOG10E @@ -159,7 +159,7 @@ double xgamma (double x) { - return F77_FCN (dgamma) (x); + return F77_FCN (dgamma, DGAMMA) (x); } double @@ -180,7 +180,7 @@ double result; double sgngam; - F77_FCN (dlgams) (x, result, sgngam); + F77_FCN (dlgams, DLGAMS) (x, result, sgngam); return result; }
--- a/src/qzval.cc +++ b/src/qzval.cc @@ -44,14 +44,16 @@ extern "C" { - int F77_FCN (qzhes) (const int&, const int&, double*, double*, - const long&, double*); + int F77_FCN (qzhes, QZHES) (const int&, const int&, double*, + double*, const long&, double*); - int F77_FCN (qzit) (const int&, const int&, double*, double*, - const double&, const long&, double*, int&); + int F77_FCN (qzit, QZIT) (const int&, const int&, double*, double*, + const double&, const long&, double*, + int&); - int F77_FCN (qzval) (const int&, const int&, double*, double*, - double*, double*, double*, const long&, double*); + int F77_FCN (qzval, QZVAL) (const int&, const int&, double*, + double*, double*, double*, double*, + const long&, double*); } DEFUN_DLD_BUILTIN ("qzval", Fqzval, Sqzval, 3, 1, @@ -135,20 +137,21 @@ // Use EISPACK qz functions. - F77_FCN (qzhes) (a_nr, a_nr, ca.fortran_vec (), - cb.fortran_vec (), matz, jnk.fortran_vec ()); + F77_FCN (qzhes, QZHES) (a_nr, a_nr, ca.fortran_vec (), + cb.fortran_vec (), matz, + jnk.fortran_vec ()); - F77_FCN (qzit) (a_nr, a_nr, ca.fortran_vec (), - cb.fortran_vec (), eps, matz, - jnk.fortran_vec (), info); + F77_FCN (qzit, QZIT) (a_nr, a_nr, ca.fortran_vec (), + cb.fortran_vec (), eps, matz, + jnk.fortran_vec (), info); if (info) error ("qzval: trouble in qzit, info = %d", info); - F77_FCN (qzval) (a_nr, a_nr, ca.fortran_vec (), - cb.fortran_vec (), alfr.fortran_vec (), - alfi.fortran_vec (), beta.fortran_vec (), - matz, jnk.fortran_vec ()); + F77_FCN (qzval, QZVAL) (a_nr, a_nr, ca.fortran_vec (), + cb.fortran_vec (), alfr.fortran_vec (), + alfi.fortran_vec (), beta.fortran_vec (), + matz, jnk.fortran_vec ()); // Count and extract finite generalized eigenvalues.
--- a/src/rand.cc +++ b/src/rand.cc @@ -43,10 +43,15 @@ extern "C" { - int *F77_FCN (dgennor) (const double&, const double&, double&); - int *F77_FCN (dgenunf) (const double&, const double&, double&); - int *F77_FCN (setall) (const int&, const int&); - int *F77_FCN (getsd) (int&, int&); + int *F77_FCN (dgennor, DGENNOR) (const double&, const double&, + double&); + + int *F77_FCN (dgenunf, DGENUNF) (const double&, const double&, + double&); + + int *F77_FCN (setall, SETALL) (const int&, const int&); + + int *F77_FCN (getsd, GETSD) (int&, int&); } static double @@ -54,7 +59,7 @@ { union d2i { double d; int i[2]; }; union d2i u; - F77_FCN (getsd) (u.i[0], u.i[1]); + F77_FCN (getsd, GETSD) (u.i[0], u.i[1]); return u.d; } @@ -81,7 +86,7 @@ u.d = val; int i0 = force_to_fit_range (u.i[0], 1, 2147483563); int i1 = force_to_fit_range (u.i[1], 1, 2147483399); - F77_FCN (setall) (i0, i1); + F77_FCN (setall, SETALL) (i0, i1); } static char * @@ -147,7 +152,7 @@ s0 = force_to_fit_range (s0, 1, 2147483563); s1 = force_to_fit_range (s1, 1, 2147483399); - F77_FCN (setall) (s0, s1); + F77_FCN (setall, SETALL) (s0, s1); initialized = 1; } @@ -270,12 +275,12 @@ switch (current_distribution) { case uniform: - F77_FCN (dgenunf) (0.0, 1.0, val); + F77_FCN (dgenunf, DGENUNF) (0.0, 1.0, val); rand_mat.elem (i, j) = val; break; case normal: - F77_FCN (dgennor) (0.0, 1.0, val); + F77_FCN (dgennor, DGENNOR) (0.0, 1.0, val); rand_mat.elem (i, j) = val; break;
--- a/src/syl.cc +++ b/src/syl.cc @@ -43,17 +43,18 @@ extern "C" { - int F77_FCN (dtrsyl) (const char*, const char*, const int&, - const int&, const int&, const double*, - const int&, const double*, const int&, - const double*, const int&, double&, int&, - long, long); + int F77_FCN (dtrsyl, DTRSYL) (const char*, const char*, const int&, + const int&, const int&, const double*, + const int&, const double*, const int&, + const double*, const int&, double&, + int&, long, long); - int F77_FCN (ztrsyl) (const char*, const char*, const int&, - const int&, const int&, const Complex*, - const int&, const Complex*, const int&, - const Complex*, const int&, double&, int&, - long, long); + int F77_FCN (ztrsyl, ZTRSYL) (const char*, const char*, const int&, + const int&, const int&, + const Complex*, const int&, + const Complex*, const int&, + const Complex*, const int&, double&, + int&, long, long); } DEFUN_DLD_BUILTIN ("syl", Fsyl, Ssyl, 4, 1, @@ -147,11 +148,11 @@ double scale; int info; - F77_FCN (ztrsyl) ("N", "N", 1, a_nr, b_nr, - sch_a.fortran_vec (), a_nr, - sch_b.fortran_vec (), b_nr, - cx.fortran_vec (), a_nr, scale, info, - 1L, 1L); + F77_FCN (ztrsyl, ZTRSYL) ("N", "N", 1, a_nr, b_nr, + sch_a.fortran_vec (), a_nr, + sch_b.fortran_vec (), b_nr, + cx.fortran_vec (), a_nr, scale, + info, 1L, 1L); cx = -ua * cx * ub.hermitian (); @@ -196,11 +197,11 @@ double scale; int info; - F77_FCN (dtrsyl) ("N", "N", 1, a_nr, b_nr, - sch_a.fortran_vec (), a_nr, - sch_b.fortran_vec (), b_nr, - cx.fortran_vec (), a_nr, scale, info, - 1L, 1L); + F77_FCN (dtrsyl, DTRSYL) ("N", "N", 1, a_nr, b_nr, + sch_a.fortran_vec (), a_nr, + sch_b.fortran_vec (), b_nr, + cx.fortran_vec (), a_nr, scale, + info, 1L, 1L); if (info) error ("syl: trouble in dtrsyl info = %d", info);
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -71,7 +71,7 @@ LOSE! LOSE! #endif -extern double F77_FCN (d1mach) (const int&); +extern double F77_FCN (d1mach, D1MACH) (const int&); } #ifndef STDIN_FILENO @@ -231,10 +231,10 @@ equiv mach_fp_par[4]; - mach_fp_par[0].d = F77_FCN (d1mach) (1); - mach_fp_par[1].d = F77_FCN (d1mach) (2); - mach_fp_par[2].d = F77_FCN (d1mach) (3); - mach_fp_par[3].d = F77_FCN (d1mach) (4); + mach_fp_par[0].d = F77_FCN (d1mach, D1MACH) (1); + mach_fp_par[1].d = F77_FCN (d1mach, D1MACH) (2); + mach_fp_par[2].d = F77_FCN (d1mach, D1MACH) (3); + mach_fp_par[3].d = F77_FCN (d1mach, D1MACH) (4); int i = 0; do