#! /bin/sh
#
# To apply this patch, cd to the top level Octave source directory and
# run this file through /bin/sh. It will first remove any files that
# have been deleted from the source distribution since the last
# release and then update the sources with patch(1).
#
# Diffs for updating *.ps, *.dvi, and *.info* files are not included
# because they can be recreated from the Texinfo files using TeX and
# makeinfo.
#
# Diffs for updating parse.cc and y.tab.h are not included because
# they can be recreated from the file parse.y using bison.
#
# Diffs for updating lex.cc are not included because it can be
# recreated from lex.l using flex.
#
# John W. Eaton
# jwe@bevo.che.wisc.edu
# University of Wisconsin-Madison
# Department of Chemical Engineering
if test -f src/octave.cc ; then
true
else
echo '***********************************************************' 1>&2
echo 'You must run this script in the top-level octave directory!' 1>&2
echo '***********************************************************' 1>&2
exit 1
fi
###
### Special commands should go here.
###
rm -f libcruft/specfun/Makefile.in
rm -f libcruft/specfun/ribesl.f libcruft/specfun/rjbesl.f
rm -f libcruft/specfun/rkbesl.f libcruft/specfun/rybesl.f
echo 'patching existing files'
patch -p1 << \PATCH_EOF
diff -cNr octave-2.0.13/ChangeLog octave-2.0.14/ChangeLog
*** octave-2.0.13/ChangeLog Thu May 21 13:16:01 1998
--- octave-2.0.14/ChangeLog Wed Apr 14 12:55:58 1999
***************
*** 1,3 ****
--- 1,102 ----
+ Wed Apr 14 12:55:42 1999 John W. Eaton
+
+ * Version 2.0.14 released.
+
+ Wed Apr 7 14:15:22 1999 John W. Eaton
+
+ * Makefile.in (INSTALL, INSTALL_PROGRAM, INSTALL_DATA):
+ Substitute these here too.
+ (install-strip): Also set INSTALL_SCRIPT here.
+
+ Wed Feb 3 01:02:37 1999 John W. Eaton
+
+ * configure.in: Use AC_OUTPUT_COMMANDS to chmod install-octave so
+ that the command will also executed in config.status.
+
+ Wed Jan 20 12:56:02 1999 John W. Eaton
+
+ * configure.in: Don't put -O in FFLAGS for powerpc-apple-machten*.
+
+ Wed Dec 9 14:02:45 1998 John W. Eaton
+
+ * Makeconf.in (RDYNAMIC_FLAG): Substitute RDYNAMIC_FLAG here.
+ * configure.in: Check for G++ compiler flag -rdynamic if setting
+ up to support dynamic linking, and substitute RDYNAMIC_FLAG if
+ -rdynamic is accepted.
+ * aclocal.m4 (OCTAVE_CC_FLAG, OCTAVE_CXX_FLAG): Clarify usage comment.
+
+ Mon Dec 7 19:49:26 1998 John W. Eaton
+
+ * configure.in: Check for -lm just after compiler tests.
+ Remove -lm from other macro calls. Don't check for -lm on NeXT
+ systems. Eric Norum says /lib/libsys_s.a
+ has all the routines that are traditionally in libc.a and libm.a
+ on *NIX systems. NeXT also supplies a libm.a, but it seems to be
+ horribly buggy.
+
+ Sat Dec 5 10:48:40 1998 John W. Eaton
+
+ * mkoctfile.in: Correctly handle -?.
+
+ Fri Dec 4 18:05:51 1998 Kurt Hornik
+
+ * emacs/octave-mod.el (octave-abbrev-start): Use the correct name
+ of the abbrev table, and provide support for XEmacs.
+ (octave-xemacs-p): New variable.
+
+ Tue Nov 24 23:31:50 1998 John W. Eaton
+
+ * configure.in: Check for strftime too.
+ Avoid checking for termios.h on NeXT systems.
+
+ Wed Nov 18 00:09:30 1998 John W. Eaton
+
+ * emacs/Makefile.in (uninstall): Fix typo.
+
+ Thu Nov 12 10:42:25 1998 John W. Eaton
+
+ * emacs/otags: New script from Mario Storti
+ .
+ * emacs/Makefile.in: Add it to the list of files to distribute and
+ install.
+
+ Wed Nov 11 17:26:26 1998 John W. Eaton
+
+ * configure.in (AC_OUTPUT): Add libcruft/amos/Makefile.
+ Delete libcruft/specfun/Makefile.
+
+ Thu Nov 5 15:59:44 1998 John W. Eaton
+
+ * configure.in: Define __NO_MATH_INLINES.
+ * acconfig.h: Add #undef for it.
+
+ * configure.in (AC_OUTPUT): Escape newlinew in macro call with \.
+
+ Fri Oct 2 14:24:27 1998 Kurt Hornik
+
+ * emacs/octave-inf.el (inferior-octave-prompt): Also match
+ prompts of the form `octave.bin:1>' which come from using
+ precopiled binary versions.
+
+ Mon Aug 31 12:07:02 1998 John W. Eaton
+
+ * config.sub: Accept armv4 everywhere arm is allowed.
+
+ Tue Aug 18 17:02:25 1998 John W. Eaton
+
+ * mkoctfile.in: Allow -DDEF on command line.
+
+ Thu Jun 18 20:24:40 1998 Roman Hodek
+
+ * configure.in (RLD_FLAG): Set correctly for Linux on all
+ architectures.
+
+ Thu May 28 10:17:45 1998 John W. Eaton
+
+ * configure.in: When checking for glob stuff, make sure that the
+ systsem header file has all the definitions that we need. If not,
+ set up to use our replacement library.
+
Thu May 21 13:15:36 1998 John W. Eaton
* Version 2.0.13 released.
diff -cNr octave-2.0.13/Makeconf.in octave-2.0.14/Makeconf.in
*** octave-2.0.13/Makeconf.in Thu May 14 18:39:30 1998
--- octave-2.0.14/Makeconf.in Wed Dec 9 14:25:50 1998
***************
*** 117,122 ****
--- 117,124 ----
SH_LD = @SH_LD@
SH_LDFLAGS = @SH_LDFLAGS@
+ RDYNAMIC_FLAG = @RDYNAMIC_FLAG@
+
RLD_FLAG = @RLD_FLAG@
FLIBS = @FLIBS@
diff -cNr octave-2.0.13/Makefile.in octave-2.0.14/Makefile.in
*** octave-2.0.13/Makefile.in Thu May 14 21:44:55 1998
--- octave-2.0.14/Makefile.in Wed Apr 7 14:13:37 1999
***************
*** 6,11 ****
--- 6,15 ----
# University of Wisconsin-Madison
# Department of Chemical Engineering
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+
TARGETS = octave-bug mkoctfile libcruft liboctave kpathsea dlfcn \
readline src scripts doc check octave.info INSTALL.OCTAVE BUGS \
install uninstall tags TAGS dist conf-dist snapshot snapshot-version
***************
*** 22,28 ****
$(MAKE) -f octMakefile omit_deps=true $@
install-strip:
! $(MAKE) -f octMakefile INSTALL_PROGRAM='${INSTALL} -s' install
binary-dist: FORCE
@if test -f configure && test -f octMakefile.in ; then \
--- 26,33 ----
$(MAKE) -f octMakefile omit_deps=true $@
install-strip:
! $(MAKE) -f octMakefile \
! INSTALL_PROGRAM='${INSTALL} -s' INSTALL_SCRIPT='${INSTALL}' install
binary-dist: FORCE
@if test -f configure && test -f octMakefile.in ; then \
diff -cNr octave-2.0.13/NEWS octave-2.0.14/NEWS
*** octave-2.0.13/NEWS Thu May 21 13:12:05 1998
--- octave-2.0.14/NEWS Tue Nov 17 23:50:12 1998
***************
*** 1,3 ****
--- 1,291 ----
+ Summary of changes for version 2.0.14:
+ -------------------------------------
+
+ This release fixes numerous bugs and adds the following new features:
+
+ * argv is now padded with blanks instead of ASCII NUL.
+
+ * New functions:
+
+ besselh -- Hankel functions of the first and second kind
+ airy -- Airy functions of the first and second kind, and
+ their derivatives
+
+ * The Bessel functions now accept complex values for the argument
+ and any real value for the order.
+
+ * The value of LOADPATH set by the environment variable
+ OCTAVE_PATH, the -p or --path command line options, or on the
+ command line is no longer modified to include the default path.
+ Instead it is left as specified. Its default value is now ":",
+ which tells Octave to search the default path, and the new
+ built-in variable DEFAULT_LOADPATH contains the default list of
+ directories to search.
+
+ * The function file_in_path no longer does any special processing of
+ its PATH argument. To search LOADPATH for files, it is now
+ generally better to use the new function file_in_loadpath.
+
+ * If fread is given a skip parameter, the skip is performed after
+ the read instead of before (for compatibility with Matlab).
+
+ * The new built-in variable `crash_dumps_octave_core' controls
+ whether Octave writes user variables to the file `octave-core'
+ when it crashes or is killed by a signal. The default value is 1
+ (0 if you use --traditional).
+
+ * If LOADPATH contains a doubled colon, the default path is inserted
+ in its place. This is similar to the substitution that also takes
+ place for leading or trailing colons in the LOADPATH.
+
+ * Loops of the form `for i = STRING ... endfor' are now allowed.
+
+ * It is now possible to set the iteration limit for lsode using
+ lsode_options ("step limit", N).
+
+ * New functions:
+
+ is_complex -- tell whether a value is complex
+ isnumeric -- tell whether a value is a numeric object
+ isfinite -- find finite elements of a matrix object
+ rehash -- re-initialize the cache of directories in LOADPATH
+ graw -- send a string to the gnuplot subprocess
+
+ * New functions from Kurt Hornik's Octave-ci package:
+
+ In finance (new directory):
+
+ fv -- future value of an investment
+ fvl -- future value of an initial lump sum investment
+ irr -- internal rate of return of an investment
+ nper -- number of payments needed for amortizing a loan
+ npv -- net present value of a series of payments
+ pmt -- amount of periodic payment needed to amortize a loan
+ pv -- present value of an investment
+ pvl -- present value of an investment that pays off at the end
+ rate -- rate of return of an investment
+ vol -- volatility of financial time series data
+
+ In linear-algebra:
+
+ dmult -- rescale the rows of a matrix
+
+ In signal:
+
+ arch_fit -- fit an ARCH regression model
+ arch_rnd -- simulate an ARCH process
+ arch_test -- test for conditional heteroscedascity
+ arma_rnd -- simulate an ARMA process
+ autocor -- compute autocorrelations
+ autocov -- compute autocovariances
+ autoreg_matrix -- design matrix for autoregressions
+ bartlett -- coefficients of the Bartlett (triangular) window
+ blackman -- coefficients of the Blackman window
+ diffpara -- estimate the fractional differencing parameter
+ durbinlevinson -- perform one step of the Durbin-Levinson algorithm
+ fractdiff -- compute fractional differences
+ hamming -- coefficients of the Hamming window
+ hanning -- coefficients of the Hanning window
+ hurst -- estimate the Hurst parameter
+ periodogram -- compute the periodogram
+ rectangle_lw -- rectangular lag window
+ rectangle_sw -- rectangular spectral window
+ sinetone -- compute a sine tone
+ sinewave -- compute a sine wave
+ spectral_adf -- spectral density estimation
+ spectral_xdf -- spectral density estimation
+ spencer -- apply Spencer's 15-point MA filter
+ stft -- short-term Fourier transform
+ synthesis -- recover a signal from its short-term Fourier transform
+ triangle_lw -- triangular lag window
+ triangle_sw -- triangular spectral window
+ yulewalker -- fit AR model by Yule-Walker method
+
+ In statistics/base (new directory):
+
+ center -- center by subtracting means
+ cloglog -- complementary log-log function
+ cor -- compute correlations
+ cov -- compute covariances
+ cut -- cut data into intervals
+ iqr -- interquartile range
+ kendall -- kendall's rank correlation tau
+ logit -- logit transformation
+ mean -- compute arithmetic, geometric, and harmonic mean
+ meansq -- compute mean square
+ moment -- compute moments
+ ppplot -- perform a PP-plot (probability plot)
+ probit -- probit transformation
+ qqplot -- perform a QQ-plot (quantile plot)
+ range -- compute range
+ ranks -- compute ranks
+ run_count -- count upward runs
+ spearman -- spearman's rank correlation rho
+ statistics -- compute basic statistics
+ studentize -- subtract mean and divide by standard deviation
+ table -- cross tabulation
+ values -- extract unique elements
+ var -- compute variance
+
+ In statistics/distributions (new directory):
+
+ beta_cdf -- CDF of the Beta distribution
+ beta_inv -- Quantile function of the Beta distribution
+ beta_pdf -- PDF of the Beta distribution
+ beta_rnd -- Random deviates from the Beta distribution
+
+ binomial_cdf -- CDF of the binomial distribution
+ binomial_inv -- Quantile function of the binomial distribution
+ binomial_pdf -- PDF of the binomial distribution
+ binomial_rnd -- Random deviates from the binomial distribution
+
+ cauchy_cdf -- CDF of the Cauchy distribution
+ cauchy_inv -- Quantile function of the Cauchy distribution
+ cauchy_pdf -- PDF of the Cauchy distribution
+ cauchy_rnd -- Random deviates from the Cauchy distribution
+
+ chisquare_cdf -- CDF of the chi-square distribution
+ chisquare_inv -- Quantile function of the chi-square distribution
+ chisquare_pdf -- PDF of the chi-sqaure distribution
+ chisquare_rnd -- Random deviates from the chi-square distribution
+
+ discrete_cdf -- CDF of a discrete distribution
+ discrete_inv -- Quantile function of a discrete distribution
+ discrete_pdf -- PDF of a discrete distribution
+ discrete_rnd -- Random deviates from a discrete distribution
+
+ empirical_cdf -- CDF of the empirical distribution
+ empirical_inv -- Quantile function of the empirical distribution
+ empirical_pdf -- PDF of the empirical distribution
+ empirical_rnd -- Bootstrap samples from the empirical distribution
+
+ exponential_cdf -- CDF of the exponential distribution
+ exponential_inv -- Quantile function of the exponential distribution
+ exponential_pdf -- PDF of the exponential distribution
+ exponential_rnd -- Random deviates from the exponential distribution
+
+ f_cdf -- CDF of the F distribution
+ f_inv -- Quantile function of the F distribution
+ f_pdf -- PDF of the F distribution
+ f_rnd -- Random deviates from the F distribution
+
+ gamma_cdf -- CDF of the Gamma distribution
+ gamma_inv -- Quantile function of the Gamma distribution
+ gamma_pdf -- PDF of the Gamma distribution
+ gamma_rnd -- Random deviates from the Gamma distribution
+
+ geometric_cdf -- CDF of the geometric distribution
+ geometric_inv -- Quantile function of the geometric distribution
+ geometric_pdf -- PDF of the geometric distribution
+ geometric_rnd -- Random deviates from the geometric distribution
+
+ hypergeometric_cdf -- CDF of the hypergeometric distribution
+ hypergeometric_inv -- Random deviates from hypergeometric distribution
+ hypergeometric_pdf -- PDF of the hypergeometric distribution
+ hypergeometric_rnd -- Random deviates from hypergeometric distribution
+
+ kolmogorov_smirnov_cdf -- CDF of the Kolmogorov-Smirnov distribution
+
+ laplace_cdf -- CDF of the Laplace distribution
+ laplace_inv -- Quantile function of the Laplace distribution
+ laplace_pdf -- PDF of the Laplace distribution
+ laplace_rnd -- Random deviates from the Laplace distribution
+
+ logistic_cdf -- CDF of the logistic distribution
+ logistic_inv -- Quantile function of the logistic distribution
+ logistic_pdf -- PDF of the logistic distribution
+ logistic_rnd -- Random deviates from the logistic distribution
+
+ lognormal_cdf -- CDF of the log normal distribution
+ lognormal_inv -- Quantile function of the log normal distribution
+ lognormal_pdf -- PDF of the log normal distribution
+ lognormal_rnd -- Random deviates from the log normal distribution
+
+ normal_cdf -- CDF of the normal distribution
+ normal_inv -- Quantile function of the normal distribution
+ normal_pdf -- PDF of the normal distribution
+ normal_rnd -- Random deviates from the normal distribution
+
+ pascal_cdf -- CDF of the Pascal (negative binomial) distribution
+ pascal_inv -- Quantile function of the Pascal distribution
+ pascal_pdf -- PDF of the Pascal (negative binomial) distribution
+ pascal_rnd -- Random deviates from the Pascal distribution
+
+ poisson_cdf -- CDF of the Poisson distribution
+ poisson_inv -- Quantile function of the Poisson distribution
+ poisson_pdf -- PDF of the Poisson distribution
+ poisson_rnd -- Random deviates from the Poisson distribution
+
+ stdnormal_cdf -- CDF of the standard normal distribution
+ stdnormal_inv -- Quantile function of standard normal distribution
+ stdnormal_pdf -- PDF of the standard normal distribution
+ stdnormal_rnd -- Random deviates from standard normal distribution
+
+ t_cdf -- CDF of the t distribution
+ t_inv -- Quantile function of the t distribution
+ t_pdf -- PDF of the t distribution
+ t_rnd -- Random deviates from the t distribution
+
+ uniform_cdf -- CDF of the uniform distribution
+ uniform_inv -- Quantile function of the uniform distribution
+ uniform_pdf -- PDF of the uniform distribution
+ uniform_rnd -- Random deviates from the uniform distribution
+
+ weibull_cdf -- CDF of the Weibull distribution
+ weibull_inv -- Quantile function of the Weibull distribution
+ weibull_pdf -- PDF of the Weibull distribution
+ weibull_rnd -- Random deviates from the Weibull distribution
+
+ wiener_rnd -- Simulate a Wiener process
+
+ In statistics/models (new directory):
+
+ logistic_regression -- ordinal logistic regression
+ logistic_regression_derivatives -- derivates of log-likelihood
+ in logistic regression
+ logistic_regression_likelihood -- likelihood in logistic regression
+
+ In statistics/tests (new directory):
+
+ anova -- one-way analysis of variance
+ bartlett_test -- bartlett test for homogeneity of variances
+ chisquare_test_homogeneity -- chi-square test for homogeneity
+ chisquare_test_independence -- chi-square test for independence
+ cor_test -- test for zero correlation
+ f_test_regression -- test linear hypotheses in linear
+ regression model
+ hotelling_test -- test for mean of a multivariate normal
+ hotelling_test_2 -- compare means of two multivariate normals
+ kolmogorov_smirnov_test -- one-sample Kolmogorov-Smirnov test
+ kolmogorov_smirnov_test_2 -- two-sample Kolmogorov-Smirnov test
+ kruskal_wallis_test -- kruskal-Wallis test
+ manova -- one-way multivariate analysis of variance
+ mcnemar_test -- mcnemar's test for symmetry
+ prop_test_2 -- compare two proportions
+ run_test -- run test for independence
+ sign_test -- sign test
+ t_test -- student's one-sample t test
+ t_test_2 -- student's two-sample t test
+ t_test_regression -- test one linear hypothesis in linear
+ regression model
+ u_test -- mann-Whitney U-test
+ var_test -- f test to compare two variances
+ welch_test -- welch two-sample t test
+ wilcoxon_test -- wilcoxon signed-rank test
+ z_test -- test for mean of a normal sample with
+ known variance
+ z_test_2 -- compare means of two normal samples with
+ known variances
+
+ * The save command now accepts the option -append to save the
+ variables at the end of the file, leaving the existing contents.
+
+ * New command-line option --no-history (also available using the
+ single character option -H) inhibits saving command history.
+
+ * The mkoctfile script now accepts -DDEF options and passes them on
+ to the C and C++ compilers.
+
Summary of changes for version 2.0.13:
-------------------------------------
***************
*** 36,42 ****
* Octave now uses kpathsea 3.2.
! * The new built-in variable kluge_procbuf_delay specifies the number
of microseconds to delay in the parent process after forking. By
default on gnu-win32 systems, it's set to 500000 (1/2 second). On
other systems, the default value is 0. Delaying for a short time
--- 324,330 ----
* Octave now uses kpathsea 3.2.
! * The new built-in variable `kluge_procbuf_delay' specifies the number
of microseconds to delay in the parent process after forking. By
default on gnu-win32 systems, it's set to 500000 (1/2 second). On
other systems, the default value is 0. Delaying for a short time
diff -cNr octave-2.0.13/acconfig.h octave-2.0.14/acconfig.h
*** octave-2.0.13/acconfig.h Sat Apr 18 20:18:21 1998
--- octave-2.0.14/acconfig.h Thu Nov 5 23:38:46 1998
***************
*** 6,11 ****
--- 6,15 ----
Leave the following blank line there!! Autoheader needs it. */
+ /* Define if your version of GNU libc has buggy inline assembly code
+ for math functions like exp. */
+ #undef __NO_MATH_INLINES
+
/* Define if you want bounds checking on element references for
internal array and matrix classes. */
#undef BOUNDS_CHECKING
diff -cNr octave-2.0.13/aclocal.m4 octave-2.0.14/aclocal.m4
*** octave-2.0.13/aclocal.m4 Thu May 14 18:31:20 1998
--- octave-2.0.14/aclocal.m4 Wed Dec 9 14:24:17 1998
***************
*** 689,696 ****
fi
])
dnl
! dnl Check to see if C compiler handles FLAG command line option and
! dnl add it to CFLAGS if it does.
dnl
dnl OCTAVE_CC_FLAG
AC_DEFUN(OCTAVE_CC_FLAG, [
--- 689,698 ----
fi
])
dnl
! dnl Check to see if C compiler handles FLAG command line option. If
! dnl two arguments are specified, execute the second arg as shell
! dnl commands. Otherwise, add FLAG to CFLAGS if the compiler accepts
! dnl the flag.
dnl
dnl OCTAVE_CC_FLAG
AC_DEFUN(OCTAVE_CC_FLAG, [
***************
*** 718,725 ****
fi
])
dnl
! dnl Check to see if C++ compiler handles FLAG command line option and
! dnl add it to CXXFLAGS if it does.
dnl
dnl OCTAVE_CXX_FLAG
AC_DEFUN(OCTAVE_CXX_FLAG, [
--- 720,729 ----
fi
])
dnl
! dnl Check to see if C++ compiler handles FLAG command line option. If
! dnl two arguments are specified, execute the second arg as shell
! dnl commands. Otherwise, add FLAG to CXXFLAGS if the compiler accepts
! dnl the flag.
dnl
dnl OCTAVE_CXX_FLAG
AC_DEFUN(OCTAVE_CXX_FLAG, [
diff -cNr octave-2.0.13/config.h.in octave-2.0.14/config.h.in
*** octave-2.0.13/config.h.in Wed May 13 22:56:44 1998
--- octave-2.0.14/config.h.in Tue Nov 24 23:59:35 1998
***************
*** 97,102 ****
--- 97,106 ----
/* Define to `int' if doesn't define. */
#undef uid_t
+ /* Define if your version of GNU libc has buggy inline assembly code
+ for math functions like exp. */
+ #undef __NO_MATH_INLINES
+
/* Define if you want bounds checking on element references for
internal array and matrix classes. */
#undef BOUNDS_CHECKING
***************
*** 399,404 ****
--- 403,411 ----
/* Define if you have the stat function. */
#undef HAVE_STAT
+ /* Define if you have the stftime function. */
+ #undef HAVE_STFTIME
+
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
***************
*** 536,544 ****
/* Define if you have the header file. */
#undef HAVE_TERMIO_H
-
- /* Define if you have the header file. */
- #undef HAVE_TERMIOS_H
/* Define if you have the header file. */
#undef HAVE_UNISTD_H
--- 543,548 ----
diff -cNr octave-2.0.13/config.sub octave-2.0.14/config.sub
*** octave-2.0.13/config.sub Fri Jan 16 01:17:49 1998
--- octave-2.0.14/config.sub Mon Aug 31 12:06:35 1998
***************
*** 150,156 ****
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
! | arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
--- 150,156 ----
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
! | armv4 | arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
***************
*** 172,178 ****
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
! | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
--- 172,179 ----
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
! | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* \
! | armv4-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
diff -cNr octave-2.0.13/configure octave-2.0.14/configure
*** octave-2.0.13/configure Thu May 21 13:16:26 1998
--- octave-2.0.14/configure Wed Apr 14 12:58:06 1999
***************
*** 26,32 ****
# Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.12
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
--- 26,32 ----
# Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
***************
*** 94,99 ****
--- 94,100 ----
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
+ SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
***************
*** 377,383 ****
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
! echo "configure generated by autoconf version 2.12"
exit 0 ;;
-with-* | --with-*)
--- 378,384 ----
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
! echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
***************
*** 547,555 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
--- 548,558 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
+ ac_exeext=
+ ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
***************
*** 591,616 ****
# Make sure we can run config.sub.
! if $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:600: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
! if host_alias=`$ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
! host=`$ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
--- 594,619 ----
# Make sure we can run config.sub.
! if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:603: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
! if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
! host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
***************
*** 807,830 ****
fi
### See which C++ compiler to use (we expect to find g++).
EXTERN_CXXFLAGS="$CXXFLAGS"
! for ac_prog in $CCC c++ g++ gcc CC cxx cc++
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:820: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CXX="$ac_prog"
--- 810,844 ----
fi
+ ### It seems that there are some broken inline assembly functions in
+ ### the GNU libc. Since I'm not sure how to test whether we are using
+ ### GNU libc, just disable them for all platforms.
+
+ echo "$ac_t""defining __NO_MATH_INLINES avoids buggy GNU libc exp function" 1>&6
+ cat >> confdefs.h <<\EOF
+ #define __NO_MATH_INLINES 1
+ EOF
+
+
### See which C++ compiler to use (we expect to find g++).
EXTERN_CXXFLAGS="$CXXFLAGS"
! for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:833: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CXX="$ac_prog"
***************
*** 847,867 ****
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:851: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
--- 861,883 ----
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:865: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
! cat > conftest.$ac_ext << EOF
!
! #line 876 "configure"
#include "confdefs.h"
!
! int main(){return(0);}
EOF
! if { (eval echo configure:881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
***************
*** 879,885 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
--- 895,901 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
***************
*** 887,898 ****
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:891: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
! echo "configure:896: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 903,914 ----
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:907: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
! echo "configure:912: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 901,907 ****
yes;
#endif
EOF
! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
--- 917,923 ----
yes;
#endif
EOF
! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
***************
*** 912,922 ****
if test $ac_cv_prog_gxx = yes; then
GXX=yes
! ac_test_CXXFLAGS="${CXXFLAGS+set}"
! ac_save_CXXFLAGS="$CXXFLAGS"
! CXXFLAGS=
! echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
! echo "configure:920: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 928,942 ----
if test $ac_cv_prog_gxx = yes; then
GXX=yes
! else
! GXX=
! fi
!
! ac_test_CXXFLAGS="${CXXFLAGS+set}"
! ac_save_CXXFLAGS="$CXXFLAGS"
! CXXFLAGS=
! echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
! echo "configure:940: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 931,950 ****
fi
echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
! if test "$ac_test_CXXFLAGS" = set; then
! CXXFLAGS="$ac_save_CXXFLAGS"
! elif test $ac_cv_prog_cxx_g = yes; then
CXXFLAGS="-g -O2"
else
! CXXFLAGS="-O2"
fi
else
! GXX=
! test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
! echo "configure:948: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 951,974 ----
fi
echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
! if test "$ac_test_CXXFLAGS" = set; then
! CXXFLAGS="$ac_save_CXXFLAGS"
! elif test $ac_cv_prog_cxx_g = yes; then
! if test "$GXX" = yes; then
CXXFLAGS="-g -O2"
else
! CXXFLAGS="-g"
fi
else
! if test "$GXX" = yes; then
! CXXFLAGS="-O2"
! else
! CXXFLAGS=
! fi
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
! echo "configure:972: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 953,969 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
--- 977,993 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
***************
*** 979,985 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
fi
--- 1003,1009 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
fi
***************
*** 1007,1013 ****
echo $ac_n "checking for C++ support for new friend template declaration""... $ac_c" 1>&6
! echo "configure:1011: checking for C++ support for new friend template declaration" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_new_friend_template_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1031,1037 ----
echo $ac_n "checking for C++ support for new friend template declaration""... $ac_c" 1>&6
! echo "configure:1035: checking for C++ support for new friend template declaration" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_new_friend_template_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1017,1023 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
rm -f conftest.h
--- 1041,1047 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
rm -f conftest.h
***************
*** 1034,1040 ****
}
EOB
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
octave_cv_cxx_new_friend_template_decl=no
else
--- 1068,1074 ----
; return 0; }
EOF
! if { (eval echo configure:1072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
octave_cv_cxx_new_friend_template_decl=no
else
***************
*** 1059,1065 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 1083,1089 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 1081,1095 ****
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1085: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
--- 1105,1120 ----
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1109: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
***************
*** 1110,1125 ****
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1114: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
ac_prog_rejected=no
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
--- 1135,1151 ----
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1139: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
***************
*** 1154,1178 ****
echo "$ac_t""no" 1>&6
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:1162: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
--- 1180,1240 ----
echo "$ac_t""no" 1>&6
fi
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+ set dummy cl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:1190: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ fi
+ fi
+ CC="$ac_cv_prog_CC"
+ if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ ;;
+ esac
+ fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:1222: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
! cat > conftest.$ac_ext << EOF
!
! #line 1233 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
! if { (eval echo configure:1238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
***************
*** 1186,1203 ****
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:1196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:1201: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1248,1271 ----
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:1264: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:1269: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1206,1212 ****
yes;
#endif
EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
--- 1274,1280 ----
yes;
#endif
EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
***************
*** 1217,1227 ****
if test $ac_cv_prog_gcc = yes; then
GCC=yes
! ac_test_CFLAGS="${CFLAGS+set}"
! ac_save_CFLAGS="$CFLAGS"
! CFLAGS=
! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:1225: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1285,1299 ----
if test $ac_cv_prog_gcc = yes; then
GCC=yes
! else
! GCC=
! fi
!
! ac_test_CFLAGS="${CFLAGS+set}"
! ac_save_CFLAGS="$CFLAGS"
! CFLAGS=
! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:1297: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1236,1255 ****
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
! if test "$ac_test_CFLAGS" = set; then
! CFLAGS="$ac_save_CFLAGS"
! elif test $ac_cv_prog_cc_g = yes; then
CFLAGS="-g -O2"
else
! CFLAGS="-O2"
fi
else
! GCC=
! test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1253: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
--- 1308,1331 ----
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
! if test "$ac_test_CFLAGS" = set; then
! CFLAGS="$ac_save_CFLAGS"
! elif test $ac_cv_prog_cc_g = yes; then
! if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
! CFLAGS="-g"
fi
else
! if test "$GCC" = yes; then
! CFLAGS="-O2"
! else
! CFLAGS=
! fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1329: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
***************
*** 1264,1277 ****
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
--- 1340,1353 ----
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
***************
*** 1281,1294 ****
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
--- 1357,1387 ----
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <
! Syntax Error
! EOF
! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
! if test -z "$ac_err"; then
! :
! else
! echo "$ac_err" >&5
! echo "configure: failed program was:" >&5
! cat conftest.$ac_ext >&5
! rm -rf conftest*
! CPP="${CC-cc} -nologo -E"
! cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
***************
*** 1301,1306 ****
--- 1394,1401 ----
rm -f conftest*
fi
rm -f conftest*
+ fi
+ rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
***************
*** 1311,1323 ****
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
! echo "configure:1315: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <
Autoconf TIOCGETP
--- 1406,1418 ----
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
! echo "configure:1410: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <
Autoconf TIOCGETP
***************
*** 1335,1341 ****
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <
Autoconf TCGETA
--- 1430,1436 ----
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <
Autoconf TCGETA
***************
*** 1395,1401 ****
ac_safe=`echo "-mieee-fp" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts -mieee-fp""... $ac_c" 1>&6
! echo "configure:1399: checking whether ${CC-cc} accepts -mieee-fp" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1490,1496 ----
ac_safe=`echo "-mieee-fp" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts -mieee-fp""... $ac_c" 1>&6
! echo "configure:1494: checking whether ${CC-cc} accepts -mieee-fp" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1405,1424 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mieee-fp"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
--- 1500,1519 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mieee-fp"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
***************
*** 1429,1435 ****
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
!
fi
--- 1524,1536 ----
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
! ac_ext=c
! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
! ac_cpp='$CPP $CPPFLAGS'
! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
! cross_compiling=$ac_cv_prog_cc_cross
!
fi
***************
*** 1447,1453 ****
ac_safe=`echo "-mieee-fp" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -mieee-fp""... $ac_c" 1>&6
! echo "configure:1451: checking whether ${CXX-c++} accepts -mieee-fp" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1548,1554 ----
ac_safe=`echo "-mieee-fp" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -mieee-fp""... $ac_c" 1>&6
! echo "configure:1552: checking whether ${CXX-c++} accepts -mieee-fp" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1457,1476 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -mieee-fp"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
--- 1558,1577 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -mieee-fp"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
***************
*** 1485,1491 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 1586,1592 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 1506,1512 ****
ac_safe=`echo "-mieee-with-inexact" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts -mieee-with-inexact""... $ac_c" 1>&6
! echo "configure:1510: checking whether ${CC-cc} accepts -mieee-with-inexact" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1607,1613 ----
ac_safe=`echo "-mieee-with-inexact" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts -mieee-with-inexact""... $ac_c" 1>&6
! echo "configure:1611: checking whether ${CC-cc} accepts -mieee-with-inexact" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1516,1535 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mieee-with-inexact"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
--- 1617,1636 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mieee-with-inexact"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
***************
*** 1540,1546 ****
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
!
fi
--- 1641,1653 ----
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
! ac_ext=c
! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
! ac_cpp='$CPP $CPPFLAGS'
! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
! cross_compiling=$ac_cv_prog_cc_cross
!
fi
***************
*** 1557,1563 ****
ac_safe=`echo "-mieee-with-inexact" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -mieee-with-inexact""... $ac_c" 1>&6
! echo "configure:1561: checking whether ${CXX-c++} accepts -mieee-with-inexact" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1664,1670 ----
ac_safe=`echo "-mieee-with-inexact" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -mieee-with-inexact""... $ac_c" 1>&6
! echo "configure:1668: checking whether ${CXX-c++} accepts -mieee-with-inexact" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1567,1586 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -mieee-with-inexact"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
--- 1674,1693 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -mieee-with-inexact"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
***************
*** 1595,1601 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 1702,1708 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 1616,1622 ****
ac_safe=`echo "-mno-fp-in-toc" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts -mno-fp-in-toc""... $ac_c" 1>&6
! echo "configure:1620: checking whether ${CC-cc} accepts -mno-fp-in-toc" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1723,1729 ----
ac_safe=`echo "-mno-fp-in-toc" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts -mno-fp-in-toc""... $ac_c" 1>&6
! echo "configure:1727: checking whether ${CC-cc} accepts -mno-fp-in-toc" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1626,1645 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mno-fp-in-toc"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
--- 1733,1752 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mno-fp-in-toc"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
***************
*** 1650,1656 ****
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
!
fi
--- 1757,1769 ----
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
! ac_ext=c
! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
! ac_cpp='$CPP $CPPFLAGS'
! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
! cross_compiling=$ac_cv_prog_cc_cross
!
fi
***************
*** 1666,1672 ****
ac_safe=`echo "-mno-fp-in-toc" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -mno-fp-in-toc""... $ac_c" 1>&6
! echo "configure:1670: checking whether ${CXX-c++} accepts -mno-fp-in-toc" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1779,1785 ----
ac_safe=`echo "-mno-fp-in-toc" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -mno-fp-in-toc""... $ac_c" 1>&6
! echo "configure:1783: checking whether ${CXX-c++} accepts -mno-fp-in-toc" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1676,1695 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -mno-fp-in-toc"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
--- 1789,1808 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -mno-fp-in-toc"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
***************
*** 1704,1710 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 1817,1823 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 1728,1734 ****
ac_safe=`echo "-fno-rtti" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -fno-rtti""... $ac_c" 1>&6
! echo "configure:1732: checking whether ${CXX-c++} accepts -fno-rtti" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1841,1847 ----
ac_safe=`echo "-fno-rtti" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -fno-rtti""... $ac_c" 1>&6
! echo "configure:1845: checking whether ${CXX-c++} accepts -fno-rtti" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1738,1757 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-rtti"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
--- 1851,1870 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-rtti"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
***************
*** 1766,1772 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 1879,1885 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 1784,1790 ****
ac_safe=`echo "-fno-exceptions" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -fno-exceptions""... $ac_c" 1>&6
! echo "configure:1788: checking whether ${CXX-c++} accepts -fno-exceptions" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1897,1903 ----
ac_safe=`echo "-fno-exceptions" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -fno-exceptions""... $ac_c" 1>&6
! echo "configure:1901: checking whether ${CXX-c++} accepts -fno-exceptions" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1794,1813 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-exceptions"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
--- 1907,1926 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-exceptions"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
***************
*** 1822,1828 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 1935,1941 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 1842,1848 ****
ac_safe=`echo "-fno-implicit-templates" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -fno-implicit-templates""... $ac_c" 1>&6
! echo "configure:1846: checking whether ${CXX-c++} accepts -fno-implicit-templates" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1955,1961 ----
ac_safe=`echo "-fno-implicit-templates" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -fno-implicit-templates""... $ac_c" 1>&6
! echo "configure:1959: checking whether ${CXX-c++} accepts -fno-implicit-templates" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1852,1871 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-implicit-templates"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
--- 1965,1984 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-implicit-templates"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
***************
*** 1880,1886 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 1993,1999 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 1910,1915 ****
--- 2023,2134 ----
fi
+
+ ### Look for math library. If found, this will add -lm to LIBS.
+
+ case "$canonical_host_type" in
+ *-*-nextstep*)
+ ;;
+ *-*-linux*)
+ echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
+ echo "configure:2035: checking for sin in -lm" >&5
+ ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+ LIBS="-lm -lc $LIBS"
+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <&6
+ fi
+
+ ;;
+ *)
+ echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
+ echo "configure:2084: checking for sin in -lm" >&5
+ ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+ LIBS="-lm $LIBS"
+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <&6
+ fi
+
+ ;;
+ esac
+
if test -z "$AR"; then
AR=ar
fi
***************
*** 1924,1938 ****
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1928: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
--- 2143,2158 ----
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2147: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
***************
*** 2002,2016 ****
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2006: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$F77"; then
ac_cv_prog_F77="$F77" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_F77="$ac_prog"
--- 2222,2237 ----
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2226: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$F77"; then
ac_cv_prog_F77="$F77" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_F77="$ac_prog"
***************
*** 2040,2046 ****
else
if test -n "$F77"; then
echo $ac_n "checking for Fortran libraries""... $ac_c" 1>&6
! echo "configure:2044: checking for Fortran libraries" >&5
if eval "test \"`echo '$''{'octave_cv_flibs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 2261,2267 ----
else
if test -n "$F77"; then
echo $ac_n "checking for Fortran libraries""... $ac_c" 1>&6
! echo "configure:2265: checking for Fortran libraries" >&5
if eval "test \"`echo '$''{'octave_cv_flibs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2193,2199 ****
FLIBS="$octave_cv_flibs"
echo "$ac_t""$FLIBS" 1>&6
echo $ac_n "checking whether ${F77-f77} uses uppercase external names""... $ac_c" 1>&6
! echo "configure:2197: checking whether ${F77-f77} uses uppercase external names" >&5
if eval "test \"`echo '$''{'octave_cv_f77_uppercase_names'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 2414,2420 ----
FLIBS="$octave_cv_flibs"
echo "$ac_t""$FLIBS" 1>&6
echo $ac_n "checking whether ${F77-f77} uses uppercase external names""... $ac_c" 1>&6
! echo "configure:2418: checking whether ${F77-f77} uses uppercase external names" >&5
if eval "test \"`echo '$''{'octave_cv_f77_uppercase_names'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 2218,2224 ****
fi
echo $ac_n "checking whether ${F77-f77} appends underscores to external names""... $ac_c" 1>&6
! echo "configure:2222: checking whether ${F77-f77} appends underscores to external names" >&5
if eval "test \"`echo '$''{'octave_cv_f77_append_underscore'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 2439,2445 ----
fi
echo $ac_n "checking whether ${F77-f77} appends underscores to external names""... $ac_c" 1>&6
! echo "configure:2443: checking whether ${F77-f77} appends underscores to external names" >&5
if eval "test \"`echo '$''{'octave_cv_f77_append_underscore'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2250,2256 ****
fi
echo $ac_n "checking whether ${F77-f77} is the GNU Fortran compiler""... $ac_c" 1>&6
! echo "configure:2254: checking whether ${F77-f77} is the GNU Fortran compiler" >&5
if eval "test \"`echo '$''{'octave_cv_f77_is_g77'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 2471,2477 ----
fi
echo $ac_n "checking whether ${F77-f77} is the GNU Fortran compiler""... $ac_c" 1>&6
! echo "configure:2475: checking whether ${F77-f77} is the GNU Fortran compiler" >&5
if eval "test \"`echo '$''{'octave_cv_f77_is_g77'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 2281,2287 ****
fi
else
echo $ac_n "checking ${F77-f77}/f2c compatibility""... $ac_c" 1>&6
! echo "configure:2285: checking ${F77-f77}/f2c compatibility" >&5
if eval "test \"`echo '$''{'octave_cv_f2c_f77_compat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 2502,2508 ----
fi
else
echo $ac_n "checking ${F77-f77}/f2c compatibility""... $ac_c" 1>&6
! echo "configure:2506: checking ${F77-f77}/f2c compatibility" >&5
if eval "test \"`echo '$''{'octave_cv_f2c_f77_compat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 2358,2363 ****
--- 2579,2587 ----
FFLAGS="-fpe1 $FFLAGS"
fi
;;
+ powerpc-apple-machten*)
+ FFLAGS=
+ ;;
esac
if test -n "$FFLAGS"; then
echo "$ac_t""defining FFLAGS to be $FFLAGS" 1>&6
***************
*** 2370,2384 ****
# Extract the first word of "f2c", so it can be a program name with args.
set dummy f2c; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2374: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_F2C'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$F2C"; then
ac_cv_prog_F2C="$F2C" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_F2C="f2c"
--- 2594,2609 ----
# Extract the first word of "f2c", so it can be a program name with args.
set dummy f2c; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2598: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_F2C'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$F2C"; then
ac_cv_prog_F2C="$F2C" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_F2C="f2c"
***************
*** 2434,2440 ****
oct_conflib=libconflib.a
oct_obj_ext=o
! if { (eval echo configure:2438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
$AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&5
if test -n "$RANLIB"; then
$RANLIB $oct_conflib 1>&5
--- 2659,2665 ----
oct_conflib=libconflib.a
oct_obj_ext=o
! if { (eval echo configure:2663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
$AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&5
if test -n "$RANLIB"; then
$RANLIB $oct_conflib 1>&5
***************
*** 2442,2456 ****
fi
rm -f conftest*
echo $ac_n "checking for f_open in -lf2c""... $ac_c" 1>&6
! echo "configure:2446: checking for f_open in -lf2c" >&5
ac_lib_var=`echo f2c'_'f_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
! LIBS="-lf2c -L. -lconflib -lm $LIBS"
cat > conftest.$ac_ext <&6
! echo "configure:2671: checking for f_open in -lf2c" >&5
ac_lib_var=`echo f2c'_'f_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
! LIBS="-lf2c -L. -lconflib $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 2686,2692 ----
f_open()
; return 0; }
EOF
! if { (eval echo configure:2690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 2486,2500 ****
if test -z "$FLIBS"; then
echo $ac_n "checking for d_sin in -lF77""... $ac_c" 1>&6
! echo "configure:2490: checking for d_sin in -lF77" >&5
ac_lib_var=`echo F77'_'d_sin | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
! LIBS="-lF77 -lm $LIBS"
cat > conftest.$ac_ext <&6
! echo "configure:2715: checking for d_sin in -lF77" >&5
ac_lib_var=`echo F77'_'d_sin | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
! LIBS="-lF77 $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 2730,2736 ----
d_sin()
; return 0; }
EOF
! if { (eval echo configure:2734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 2528,2534 ****
if test -n "$FLIBS"; then
echo $ac_n "checking for f_rew in -lI77""... $ac_c" 1>&6
! echo "configure:2532: checking for f_rew in -lI77" >&5
ac_lib_var=`echo I77'_'f_rew | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 2753,2759 ----
if test -n "$FLIBS"; then
echo $ac_n "checking for f_rew in -lI77""... $ac_c" 1>&6
! echo "configure:2757: checking for f_rew in -lI77" >&5
ac_lib_var=`echo I77'_'f_rew | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2536,2542 ****
ac_save_LIBS="$LIBS"
LIBS="-lI77 -lF77 $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 2772,2778 ----
f_rew()
; return 0; }
EOF
! if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 2695,2701 ****
SH_LDFLAGS="-shared -Xlinker -expect_unresolved -Xlinker '*'"
RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)'
;;
! i[3456789]86-*-linux*)
RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)'
;;
i[3456789]86-*-sco3.2v5*)
--- 2920,2926 ----
SH_LDFLAGS="-shared -Xlinker -expect_unresolved -Xlinker '*'"
RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)'
;;
! *-*-linux*)
RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)'
;;
i[3456789]86-*-sco3.2v5*)
***************
*** 2792,2798 ****
### functions like gethostname and gettimeofday is in libsocket.
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
! echo "configure:2796: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
--- 3017,3023 ----
### functions like gethostname and gettimeofday is in libsocket.
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
! echo "configure:3021: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
***************
*** 2814,2831 ****
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
! echo "configure:2818: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
--- 3039,3056 ----
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
! echo "configure:3043: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
***************
*** 2862,2870 ****
fi
echo $ac_n "checking for AIX""... $ac_c" 1>&6
! echo "configure:2866: checking for AIX" >&5
cat > conftest.$ac_ext <&6
! echo "configure:3091: checking for AIX" >&5
cat > conftest.$ac_ext <&6
! echo "configure:2890: checking for getpwnam in -lsun" >&5
ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 3111,3117 ----
echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
! echo "configure:3115: checking for getpwnam in -lsun" >&5
ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2894,2900 ****
ac_save_LIBS="$LIBS"
LIBS="-lsun $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 3130,3136 ----
getpwnam()
; return 0; }
EOF
! if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 2933,2939 ****
fi
echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6
! echo "configure:2937: checking for gethostname in -lsocket" >&5
ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 3158,3164 ----
fi
echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6
! echo "configure:3162: checking for gethostname in -lsocket" >&5
ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2941,2947 ****
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 3177,3183 ----
gethostname()
; return 0; }
EOF
! if { (eval echo configure:3181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 2983,2989 ****
case "$canonical_host_type" in
alpha*-dec-osf*)
echo $ac_n "checking for dgemm_ in -ldxml""... $ac_c" 1>&6
! echo "configure:2987: checking for dgemm_ in -ldxml" >&5
ac_lib_var=`echo dxml'_'dgemm_ | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 3208,3214 ----
case "$canonical_host_type" in
alpha*-dec-osf*)
echo $ac_n "checking for dgemm_ in -ldxml""... $ac_c" 1>&6
! echo "configure:3212: checking for dgemm_ in -ldxml" >&5
ac_lib_var=`echo dxml'_'dgemm_ | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2991,2997 ****
ac_save_LIBS="$LIBS"
LIBS="-ldxml $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 3227,3233 ----
dgemm_()
; return 0; }
EOF
! if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 3030,3036 ****
### be eliminated in favor of run-time checks.
echo $ac_n "checking size of short""... $ac_c" 1>&6
! echo "configure:3034: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 3255,3261 ----
### be eliminated in favor of run-time checks.
echo $ac_n "checking size of short""... $ac_c" 1>&6
! echo "configure:3259: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 3038,3044 ****
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <
main()
--- 3263,3269 ----
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <
main()
***************
*** 3049,3055 ****
exit(0);
}
EOF
! if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
--- 3274,3280 ----
exit(0);
}
EOF
! if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
***************
*** 3069,3075 ****
echo $ac_n "checking size of int""... $ac_c" 1>&6
! echo "configure:3073: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 3294,3300 ----
echo $ac_n "checking size of int""... $ac_c" 1>&6
! echo "configure:3298: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 3077,3083 ****
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <
main()
--- 3302,3308 ----
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <
main()
***************
*** 3088,3094 ****
exit(0);
}
EOF
! if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
--- 3313,3319 ----
exit(0);
}
EOF
! if { (eval echo configure:3317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
***************
*** 3108,3114 ****
echo $ac_n "checking size of long""... $ac_c" 1>&6
! echo "configure:3112: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 3333,3339 ----
echo $ac_n "checking size of long""... $ac_c" 1>&6
! echo "configure:3337: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 3116,3122 ****
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <
main()
--- 3341,3347 ----
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <
main()
***************
*** 3127,3133 ****
exit(0);
}
EOF
! if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
--- 3352,3358 ----
exit(0);
}
EOF
! if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
***************
*** 3152,3170 ****
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:3156: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
! if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
--- 3377,3395 ----
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:3381: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
! if { (eval echo configure:3393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
***************
*** 3185,3209 ****
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:3189: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
# else
! # ifdef _AIX
! #pragma alloca
# else
! # ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
--- 3410,3439 ----
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:3414: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
! # define alloca _alloca
# else
! # if HAVE_ALLOCA_H
! # include
# else
! # ifdef _AIX
! #pragma alloca
! # else
! # ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
+ # endif
# endif
# endif
# endif
***************
*** 3213,3219 ****
char *p = (char *) alloca(1);
; return 0; }
EOF
! if { (eval echo configure:3217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
--- 3443,3449 ----
char *p = (char *) alloca(1);
; return 0; }
EOF
! if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
***************
*** 3238,3256 ****
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
! ALLOCA=alloca.o
cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:3249: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:3479: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:3279: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:3509: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 3533,3539 ----
; return 0; }
EOF
! if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 3330,3336 ****
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:3334: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 3560,3566 ----
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:3564: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 3338,3344 ****
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
--- 3587,3593 ----
exit (find_stack_direction() < 0);
}
EOF
! if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
***************
*** 3379,3390 ****
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
! echo "configure:3383: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:3613: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
--- 3663,3669 ----
; return 0; }
EOF
! if { (eval echo configure:3667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
***************
*** 3457,3463 ****
### See if we should define NPOS.
echo $ac_n "checking whether including defines NPOS""... $ac_c" 1>&6
! echo "configure:3461: checking whether including defines NPOS" >&5
if eval "test \"`echo '$''{'octave_cv_string_npos'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 3687,3693 ----
### See if we should define NPOS.
echo $ac_n "checking whether including defines NPOS""... $ac_c" 1>&6
! echo "configure:3691: checking whether including defines NPOS" >&5
if eval "test \"`echo '$''{'octave_cv_string_npos'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 3466,3483 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <
int main() {
size_t foo = NPOS
; return 0; }
EOF
! if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
octave_cv_string_npos=yes
else
--- 3696,3713 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <
int main() {
size_t foo = NPOS
; return 0; }
EOF
! if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
octave_cv_string_npos=yes
else
***************
*** 3500,3506 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 3730,3736 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 3508,3519 ****
### Checks for header files.
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:3512: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 3738,3749 ----
### Checks for header files.
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:3742: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 3521,3528 ****
#include
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
--- 3751,3758 ----
#include
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
***************
*** 3538,3544 ****
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
--- 3768,3774 ----
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
***************
*** 3556,3562 ****
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
--- 3786,3792 ----
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
***************
*** 3577,3583 ****
:
else
cat > conftest.$ac_ext <
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 3807,3813 ----
:
else
cat > conftest.$ac_ext <
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 3588,3594 ****
exit (0); }
EOF
! if { (eval echo configure:3592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
--- 3818,3824 ----
exit (0); }
EOF
! if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
***************
*** 3616,3627 ****
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
! echo "configure:3620: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_hdr>
--- 3846,3857 ----
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
! echo "configure:3850: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_hdr>
***************
*** 3629,3635 ****
DIR *dirp = 0;
; return 0; }
EOF
! if { (eval echo configure:3633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
--- 3859,3865 ----
DIR *dirp = 0;
; return 0; }
EOF
! if { (eval echo configure:3863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
***************
*** 3654,3660 ****
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
! echo "configure:3658: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 3884,3890 ----
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
! echo "configure:3888: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 3662,3668 ****
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 3903,3909 ----
opendir()
; return 0; }
EOF
! if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 3695,3701 ****
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
! echo "configure:3699: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 3925,3931 ----
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
! echo "configure:3929: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 3703,3709 ****
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 3944,3950 ----
opendir()
; return 0; }
EOF
! if { (eval echo configure:3948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 3737,3748 ****
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:3741: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 3967,3978 ----
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:3971: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 3751,3757 ****
struct tm *tp;
; return 0; }
EOF
! if { (eval echo configure:3755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
--- 3981,3987 ----
struct tm *tp;
; return 0; }
EOF
! if { (eval echo configure:3985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
***************
*** 3772,3783 ****
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
! echo "configure:3776: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 4002,4013 ----
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
! echo "configure:4006: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 3793,3799 ****
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
! if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
--- 4023,4029 ----
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
! if { (eval echo configure:4027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
***************
*** 3814,3840 ****
fi
for ac_hdr in assert.h curses.h dlfcn.h fcntl.h float.h \
floatingpoint.h fnmatch.h glob.h grp.h ieeefp.h limits.h \
memory.h nan.h ncurses.h pwd.h sgtty.h stdlib.h string.h \
sys/param.h sys/resource.h sys/select.h sys/stat.h sys/time.h \
sys/times.h sys/types.h sys/utsname.h termcap.h termio.h \
! termios.h unistd.h varargs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:3827: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
--- 4044,4079 ----
fi
+ ### I'm told that termios.h is broken on NeXT systems.
+
+ TERMIOS_H=termios.h
+ case "$canonical_host_type" in
+ *-*-nextstep*)
+ TERMIOS_H=
+ ;;
+ esac
+
for ac_hdr in assert.h curses.h dlfcn.h fcntl.h float.h \
floatingpoint.h fnmatch.h glob.h grp.h ieeefp.h limits.h \
memory.h nan.h ncurses.h pwd.h sgtty.h stdlib.h string.h \
sys/param.h sys/resource.h sys/select.h sys/stat.h sys/time.h \
sys/times.h sys/types.h sys/utsname.h termcap.h termio.h \
! $TERMIOS_H unistd.h varargs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4066: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
***************
*** 3873,3881 ****
GLOB_INCFLAGS='-I$(top_srcdir)/glob -I$(TOPDIR)/glob'
if test "$ac_cv_header_fnmatch_h" = yes \
&& test "$ac_cv_header_glob_h" = yes; then
! GLOB_DIR=
! echo $ac_n "checking for glob in -lglob""... $ac_c" 1>&6
! echo "configure:3879: checking for glob in -lglob" >&5
ac_lib_var=`echo glob'_'glob | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 4112,4136 ----
GLOB_INCFLAGS='-I$(top_srcdir)/glob -I$(TOPDIR)/glob'
if test "$ac_cv_header_fnmatch_h" = yes \
&& test "$ac_cv_header_glob_h" = yes; then
! cat > conftest.$ac_ext <&5 |
! egrep "yes" >/dev/null 2>&1; then
! rm -rf conftest*
!
! GLOB_DIR=
! echo $ac_n "checking for glob in -lglob""... $ac_c" 1>&6
! echo "configure:4134: checking for glob in -lglob" >&5
ac_lib_var=`echo glob'_'glob | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 3883,3889 ****
ac_save_LIBS="$LIBS"
LIBS="-lglob $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 4149,4155 ----
glob()
; return 0; }
EOF
! if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 3921,3935 ****
echo "$ac_t""no" 1>&6
fi
! for ac_func in fnmatch glob
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:3928: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
fi
! for ac_func in fnmatch glob
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4183: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 4207,4213 ----
; return 0; }
EOF
! if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 3976,3987 ****
fi
done
! if test "$ac_cv_func_fnmatch" = yes \
! && test "$ac_cv_func_glob" = yes; then
! GLOB_DIR=
! LIBGLOB=
! GLOB_INCFLAGS=
! fi
fi
--- 4231,4279 ----
fi
done
! if test "$ac_cv_func_fnmatch" = yes \
! && test "$ac_cv_func_glob" = yes; then
! GLOB_DIR=
! LIBGLOB=
! GLOB_INCFLAGS=
! fi
!
! else
! rm -rf conftest*
!
! ### We provide replacements, so we should set these to "yes".
! if eval "test \"`echo '$''{'ac_cv_func_fnmatch'+set}'`\" = set"; then
! echo $ac_n "(cached) $ac_c" 1>&6
! else
! ac_cv_func_fnmatch=yes
! fi
!
! if eval "test \"`echo '$''{'ac_cv_func_glob'+set}'`\" = set"; then
! echo $ac_n "(cached) $ac_c" 1>&6
! else
! ac_cv_func_glob=yes
! fi
!
!
! fi
! rm -f conftest*
!
! else
! ### We provide replacements, so we should set these to "yes".
! ac_cv_header_fnmatch_h=yes
! ac_cv_header_glob_h=yes
! if eval "test \"`echo '$''{'ac_cv_func_fnmatch'+set}'`\" = set"; then
! echo $ac_n "(cached) $ac_c" 1>&6
! else
! ac_cv_func_fnmatch=yes
! fi
!
! if eval "test \"`echo '$''{'ac_cv_func_glob'+set}'`\" = set"; then
! echo $ac_n "(cached) $ac_c" 1>&6
! else
! ac_cv_func_glob=yes
! fi
!
fi
***************
*** 3995,4010 ****
gettimeofday getuid getwd lstat memmove mkdir mkfifo on_exit pipe \
putenv rename rindex rmdir setgrent setpwent setvbuf sigaction \
sigpending sigprocmask sigsuspend stat strcasecmp strdup strerror \
! stricmp strncasecmp strnicmp tempnam umask unlink usleep vfprintf \
! vsprintf waitpid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4003: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:4295: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 4319,4325 ----
; return 0; }
EOF
! if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 4053,4059 ****
echo $ac_n "checking whether putenv uses malloc""... $ac_c" 1>&6
! echo "configure:4057: checking whether putenv uses malloc" >&5
if eval "test \"`echo '$''{'octave_cv_func_putenv_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 4345,4351 ----
echo $ac_n "checking whether putenv uses malloc""... $ac_c" 1>&6
! echo "configure:4349: checking whether putenv uses malloc" >&5
if eval "test \"`echo '$''{'octave_cv_func_putenv_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 4061,4067 ****
octave_cv_func_putenv_malloc=no
else
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
octave_cv_func_putenv_malloc=yes
else
--- 4406,4412 ----
exit (rstr1 == rstr2 ? 0 : 1);
}
EOF
! if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
octave_cv_func_putenv_malloc=yes
else
***************
*** 4135,4153 ****
fi
echo $ac_n "checking whether program_invocation_name is predefined""... $ac_c" 1>&6
! echo "configure:4139: checking whether program_invocation_name is predefined" >&5
if eval "test \"`echo '$''{'octave_cv_var_program_inv_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
octave_cv_var_program_inv_name=yes
else
--- 4427,4445 ----
fi
echo $ac_n "checking whether program_invocation_name is predefined""... $ac_c" 1>&6
! echo "configure:4431: checking whether program_invocation_name is predefined" >&5
if eval "test \"`echo '$''{'octave_cv_var_program_inv_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
octave_cv_var_program_inv_name=yes
else
***************
*** 4168,4173 ****
--- 4460,4466 ----
LIBDLFCN=
DLFCN_INCFLAGS=
+ RDYNAMIC_FLAG=
if test "$WITH_DL" = yes || test "$WITH_DL" = maybe; then
case "$canonical_host_type" in
rs6000-ibm-aix* | powerpc-ibm-aix*)
***************
*** 4180,4186 ****
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
! echo "configure:4184: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 4473,4479 ----
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
! echo "configure:4477: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4188,4194 ****
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 4492,4498 ----
dlopen()
; return 0; }
EOF
! if { (eval echo configure:4496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 4229,4240 ****
for ac_func in dlopen dlsym dlerror dlclose
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4233: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:4526: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 4550,4556 ----
; return 0; }
EOF
! if { (eval echo configure:4554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 4295,4300 ****
--- 4588,4648 ----
;;
esac
if $WITH_DL; then
+
+ ac_safe=`echo "-rdynamic" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking whether ${CXX-c++} accepts -rdynamic""... $ac_c" 1>&6
+ echo "configure:4595: checking whether ${CXX-c++} accepts -rdynamic" >&5
+ if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+
+
+ ac_ext=C
+ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cxx_cross
+
+ XCXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -rdynamic"
+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "octave_cv_cxx_flag_$ac_safe=yes"
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "octave_cv_cxx_flag_$ac_safe=no"
+ fi
+ rm -f conftest*
+ CXXFLAGS="$XCXXFLAGS"
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+
+
+ fi
+
+ if eval "test \"`echo '$octave_cv_cxx_flag_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ RDYNAMIC_FLAG=-rdynamic
+ else
+ echo "$ac_t""no" 1>&6
+
+ fi
+
cat >> confdefs.h <<\EOF
#define WITH_DL 1
EOF
***************
*** 4307,4315 ****
if test "$WITH_SHL" = yes || test "$WITH_SHL" = maybe; then
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:4313: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 4655,4664 ----
+
if test "$WITH_SHL" = yes || test "$WITH_SHL" = maybe; then
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:4662: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4317,4323 ****
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 4677,4683 ----
shl_load()
; return 0; }
EOF
! if { (eval echo configure:4681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 4358,4369 ****
for ac_func in shl_load shl_findsym
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4362: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:4711: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 4735,4741 ----
; return 0; }
EOF
! if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 4448,4459 ****
### There is more than one possible prototype for gettimeofday. See
### which one (if any) appears in sys/time.h.
echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
! echo "configure:4452: checking for gettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:4801: checking for gettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_gettimeofday=yes"
else
--- 4825,4831 ----
; return 0; }
EOF
! if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gettimeofday=yes"
else
***************
*** 4491,4504 ****
if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat > conftest.$ac_ext <
int main() {
gettimeofday ((struct timeval *) 0,(struct timezone *) 0);
; return 0; }
EOF
! if { (eval echo configure:4502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
--- 4840,4853 ----
if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat > conftest.$ac_ext <
int main() {
gettimeofday ((struct timeval *) 0,(struct timezone *) 0);
; return 0; }
EOF
! if { (eval echo configure:4851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
***************
*** 4524,4538 ****
### with functions from the BSD/NET2 math library.
echo $ac_n "checking for quiet_nan in -lsunmath""... $ac_c" 1>&6
! echo "configure:4528: checking for quiet_nan in -lsunmath" >&5
ac_lib_var=`echo sunmath'_'quiet_nan | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
! LIBS="-lsunmath -lm $LIBS"
cat > conftest.$ac_ext <&6
! echo "configure:4877: checking for quiet_nan in -lsunmath" >&5
ac_lib_var=`echo sunmath'_'quiet_nan | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
! LIBS="-lsunmath $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 4892,4898 ----
quiet_nan()
; return 0; }
EOF
! if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 4571,4678 ****
fi
-
- case "$canonical_host_type" in
- *-*-linux*)
- echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
- echo "configure:4579: checking for sin in -lm" >&5
- ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lm -lc $LIBS"
- cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
-
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <&6
- fi
-
- ;;
- *)
- echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
- echo "configure:4628: checking for sin in -lm" >&5
- ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lm $LIBS"
- cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
-
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <&6
- fi
-
- ;;
- esac
-
### I am told that Inf and NaN don't work on m68k HP sytems, and that
### on SCO systems, isnan and isinf don't work, but they can be
### replaced by something that does.
--- 4920,4925 ----
***************
*** 4701,4712 ****
for ac_func in finite isnan isinf infinity quiet_nan
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4705: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:4952: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 4976,4982 ----
; return 0; }
EOF
! if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 4761,4772 ****
for ac_func in acosh asinh atanh erf erfc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4765: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:5012: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 5036,5042 ----
; return 0; }
EOF
! if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 4817,4828 ****
### Checks for OS specific cruft.
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
! echo "configure:4821: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 5064,5075 ----
### Checks for OS specific cruft.
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
! echo "configure:5068: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 4830,4836 ****
struct stat s; s.st_blksize;
; return 0; }
EOF
! if { (eval echo configure:4834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
--- 5077,5083 ----
struct stat s; s.st_blksize;
; return 0; }
EOF
! if { (eval echo configure:5081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
***************
*** 4851,4862 ****
fi
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
! echo "configure:4855: checking for st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 5098,5109 ----
fi
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
! echo "configure:5102: checking for st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 4864,4870 ****
struct stat s; s.st_blocks;
; return 0; }
EOF
! if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
--- 5111,5117 ----
struct stat s; s.st_blocks;
; return 0; }
EOF
! if { (eval echo configure:5115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
***************
*** 4883,4898 ****
EOF
else
! LIBOBJS="$LIBOBJS fileblocks.o"
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
! echo "configure:4891: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 5130,5145 ----
EOF
else
! LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
! echo "configure:5138: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 4900,4906 ****
struct stat s; s.st_rdev;
; return 0; }
EOF
! if { (eval echo configure:4904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
--- 5147,5153 ----
struct stat s; s.st_rdev;
; return 0; }
EOF
! if { (eval echo configure:5151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
***************
*** 4921,4932 ****
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
! echo "configure:4925: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 5168,5179 ----
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
! echo "configure:5172: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 4934,4940 ****
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
! if { (eval echo configure:4938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
--- 5181,5187 ----
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
! if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
***************
*** 4955,4966 ****
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
! echo "configure:4959: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_cv_struct_tm>
--- 5202,5213 ----
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
! echo "configure:5206: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_cv_struct_tm>
***************
*** 4968,4974 ****
struct tm tm; tm.tm_zone;
; return 0; }
EOF
! if { (eval echo configure:4972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
--- 5215,5221 ----
struct tm tm; tm.tm_zone;
; return 0; }
EOF
! if { (eval echo configure:5219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
***************
*** 4988,4999 ****
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
! echo "configure:4992: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#ifndef tzname /* For SGI. */
--- 5235,5246 ----
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
! echo "configure:5239: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#ifndef tzname /* For SGI. */
***************
*** 5003,5009 ****
atoi(*tzname);
; return 0; }
EOF
! if { (eval echo configure:5007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
--- 5250,5256 ----
atoi(*tzname);
; return 0; }
EOF
! if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
***************
*** 5025,5031 ****
fi
echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
! echo "configure:5029: checking whether closedir returns void" >&5
if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 5272,5278 ----
fi
echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
! echo "configure:5276: checking whether closedir returns void" >&5
if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 5033,5045 ****
ac_cv_func_closedir_void=yes
else
cat > conftest.$ac_ext <
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
! if { (eval echo configure:5043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_closedir_void=no
else
--- 5280,5292 ----
ac_cv_func_closedir_void=yes
else
cat > conftest.$ac_ext <
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
! if { (eval echo configure:5290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_closedir_void=no
else
***************
*** 5063,5074 ****
echo $ac_n "checking for gr_passwd in struct group""... $ac_c" 1>&6
! echo "configure:5067: checking for gr_passwd in struct group" >&5
if eval "test \"`echo '$''{'octave_cv_struct_gr_passwd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 5310,5321 ----
echo $ac_n "checking for gr_passwd in struct group""... $ac_c" 1>&6
! echo "configure:5314: checking for gr_passwd in struct group" >&5
if eval "test \"`echo '$''{'octave_cv_struct_gr_passwd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 5076,5082 ****
struct group s; s.gr_passwd;
; return 0; }
EOF
! if { (eval echo configure:5080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
octave_cv_struct_gr_passwd=yes
else
--- 5323,5329 ----
struct group s; s.gr_passwd;
; return 0; }
EOF
! if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
octave_cv_struct_gr_passwd=yes
else
***************
*** 5100,5106 ****
TERMLIBS=""
for termlib in ncurses curses termcap terminfo termlib; do
echo $ac_n "checking for tputs in -l${termlib}""... $ac_c" 1>&6
! echo "configure:5104: checking for tputs in -l${termlib}" >&5
ac_lib_var=`echo ${termlib}'_'tputs | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 5347,5353 ----
TERMLIBS=""
for termlib in ncurses curses termcap terminfo termlib; do
echo $ac_n "checking for tputs in -l${termlib}""... $ac_c" 1>&6
! echo "configure:5351: checking for tputs in -l${termlib}" >&5
ac_lib_var=`echo ${termlib}'_'tputs | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 5108,5114 ****
ac_save_LIBS="$LIBS"
LIBS="-l${termlib} $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 5366,5372 ----
tputs()
; return 0; }
EOF
! if { (eval echo configure:5370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 5160,5175 ****
fi
echo $ac_n "checking for struct exception in math.h""... $ac_c" 1>&6
! echo "configure:5164: checking for struct exception in math.h" >&5
cat > conftest.$ac_ext <
int main() {
struct exception *x; x->type; x->name;
; return 0; }
EOF
! if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
--- 5407,5422 ----
fi
echo $ac_n "checking for struct exception in math.h""... $ac_c" 1>&6
! echo "configure:5411: checking for struct exception in math.h" >&5
cat > conftest.$ac_ext <
int main() {
struct exception *x; x->type; x->name;
; return 0; }
EOF
! if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
***************
*** 5187,5198 ****
### Signal stuff.
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:5191: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 5434,5445 ----
### Signal stuff.
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:5438: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 5209,5215 ****
int i;
; return 0; }
EOF
! if { (eval echo configure:5213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
--- 5456,5462 ----
int i;
; return 0; }
EOF
! if { (eval echo configure:5460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
***************
*** 5228,5239 ****
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
! echo "configure:5232: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 5475,5486 ----
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
! echo "configure:5479: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 5245,5251 ****
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
! if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
--- 5492,5498 ----
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
! if { (eval echo configure:5496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
***************
*** 5266,5281 ****
fi
echo $ac_n "checking for sys_siglist variable""... $ac_c" 1>&6
! echo "configure:5270: checking for sys_siglist variable" >&5
cat > conftest.$ac_ext <
int main() {
extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);
; return 0; }
EOF
! if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
--- 5513,5528 ----
fi
echo $ac_n "checking for sys_siglist variable""... $ac_c" 1>&6
! echo "configure:5517: checking for sys_siglist variable" >&5
cat > conftest.$ac_ext <
int main() {
extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);
; return 0; }
EOF
! if { (eval echo configure:5526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
***************
*** 5291,5303 ****
rm -f conftest*
echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
! echo "configure:5295: checking for type of signal functions" >&5
if eval "test \"`echo '$''{'octave_cv_signal_vintage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
--- 5538,5550 ----
rm -f conftest*
echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
! echo "configure:5542: checking for type of signal functions" >&5
if eval "test \"`echo '$''{'octave_cv_signal_vintage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
***************
*** 5310,5316 ****
; return 0; }
EOF
! if { (eval echo configure:5314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
octave_cv_signal_vintage=posix
else
--- 5557,5563 ----
; return 0; }
EOF
! if { (eval echo configure:5561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
octave_cv_signal_vintage=posix
else
***************
*** 5319,5325 ****
rm -rf conftest*
cat > conftest.$ac_ext <
int main() {
--- 5566,5572 ----
rm -rf conftest*
cat > conftest.$ac_ext <
int main() {
***************
*** 5329,5335 ****
; return 0; }
EOF
! if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
octave_cv_signal_vintage=4.2bsd
else
--- 5576,5582 ----
; return 0; }
EOF
! if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
octave_cv_signal_vintage=4.2bsd
else
***************
*** 5338,5344 ****
rm -rf conftest*
cat > conftest.$ac_ext <
--- 5585,5591 ----
rm -rf conftest*
cat > conftest.$ac_ext <
***************
*** 5351,5357 ****
; return 0; }
EOF
! if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
octave_cv_signal_vintage=svr3
else
--- 5598,5604 ----
; return 0; }
EOF
! if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
octave_cv_signal_vintage=svr3
else
***************
*** 5392,5398 ****
echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
! echo "configure:5396: checking if signal handlers must be reinstalled when invoked" >&5
if eval "test \"`echo '$''{'octave_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 5639,5645 ----
echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
! echo "configure:5643: checking if signal handlers must be reinstalled when invoked" >&5
if eval "test \"`echo '$''{'octave_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 5404,5410 ****
fi
else
cat > conftest.$ac_ext <
--- 5651,5657 ----
fi
else
cat > conftest.$ac_ext <
***************
*** 5446,5452 ****
}
EOF
! if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
octave_cv_must_reinstall_sighandlers=no
else
--- 5693,5699 ----
}
EOF
! if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
octave_cv_must_reinstall_sighandlers=no
else
***************
*** 5476,5487 ****
### Type stuff.
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
! echo "configure:5480: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
--- 5723,5734 ----
### Type stuff.
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
! echo "configure:5727: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
***************
*** 5490,5496 ****
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_mode_t=yes
else
--- 5737,5743 ----
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_mode_t=yes
else
***************
*** 5509,5520 ****
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
! echo "configure:5513: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
--- 5756,5767 ----
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
! echo "configure:5760: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
***************
*** 5523,5529 ****
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_off_t=yes
else
--- 5770,5776 ----
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_off_t=yes
else
***************
*** 5542,5553 ****
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:5546: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
--- 5789,5800 ----
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:5793: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
***************
*** 5556,5562 ****
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_pid_t=yes
else
--- 5803,5809 ----
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_pid_t=yes
else
***************
*** 5575,5586 ****
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:5579: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
--- 5822,5833 ----
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:5826: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
***************
*** 5589,5595 ****
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_size_t=yes
else
--- 5836,5842 ----
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_size_t=yes
else
***************
*** 5608,5619 ****
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
! echo "configure:5612: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
--- 5855,5866 ----
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
! echo "configure:5859: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
***************
*** 5642,5653 ****
fi
echo $ac_n "checking for dev_t""... $ac_c" 1>&6
! echo "configure:5646: checking for dev_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
--- 5889,5900 ----
fi
echo $ac_n "checking for dev_t""... $ac_c" 1>&6
! echo "configure:5893: checking for dev_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
***************
*** 5656,5662 ****
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_dev_t=yes
else
--- 5903,5909 ----
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_dev_t=yes
else
***************
*** 5675,5686 ****
fi
echo $ac_n "checking for ino_t""... $ac_c" 1>&6
! echo "configure:5679: checking for ino_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
--- 5922,5933 ----
fi
echo $ac_n "checking for ino_t""... $ac_c" 1>&6
! echo "configure:5926: checking for ino_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
***************
*** 5689,5695 ****
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_ino_t=yes
else
--- 5936,5942 ----
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_ino_t=yes
else
***************
*** 5708,5719 ****
fi
echo $ac_n "checking for nlink_t""... $ac_c" 1>&6
! echo "configure:5712: checking for nlink_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_nlink_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
--- 5955,5966 ----
fi
echo $ac_n "checking for nlink_t""... $ac_c" 1>&6
! echo "configure:5959: checking for nlink_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_nlink_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
***************
*** 5722,5728 ****
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "nlink_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_nlink_t=yes
else
--- 5969,5975 ----
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
! egrep "(^|[^a-zA-Z_0-9])nlink_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_nlink_t=yes
else
***************
*** 5741,5752 ****
fi
echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
! echo "configure:5745: checking for sigset_t" >&5
if eval "test \"`echo '$''{'octave_cv_type_sigset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
--- 5988,5999 ----
fi
echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
! echo "configure:5992: checking for sigset_t" >&5
if eval "test \"`echo '$''{'octave_cv_type_sigset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#if STDC_HEADERS
***************
*** 5794,5805 ****
for ac_func in getrusage times
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:5798: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:6045: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 6069,6075 ----
; return 0; }
EOF
! if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 5893,5907 ****
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:5897: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$LEX"; then
ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_LEX="flex"
--- 6140,6155 ----
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:6144: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$LEX"; then
ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_LEX="flex"
***************
*** 5926,5932 ****
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
! echo "configure:5930: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 6174,6180 ----
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
! echo "configure:6178: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 5934,5940 ****
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 6193,6199 ----
yywrap()
; return 0; }
EOF
! if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 5987,6001 ****
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:5991: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_YACC="$ac_prog"
--- 6235,6250 ----
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:6239: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_YACC="$ac_prog"
***************
*** 6026,6032 ****
esac
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:6030: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 6275,6281 ----
esac
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:6279: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 6055,6069 ****
# Extract the first word of "runtest", so it can be a program name with args.
set dummy runtest; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:6059: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RUNTEST"; then
ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RUNTEST="runtest"
--- 6304,6319 ----
# Extract the first word of "runtest", so it can be a program name with args.
set dummy runtest; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:6308: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RUNTEST"; then
ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RUNTEST="runtest"
***************
*** 6095,6122 ****
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:6103: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
! for ac_prog in ginstall installbsd scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
- # OSF/1 installbsd also uses dspmsg, but is usable.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
--- 6345,6374 ----
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+ # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:6354: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
! # Don't use installbsd from OSF since it installs stuff as root
! # by default.
! for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
***************
*** 6146,6151 ****
--- 6398,6405 ----
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
INSTALL_SCRIPT='${INSTALL}'
***************
*** 6169,6183 ****
# Extract the first word of "gnuplot", so it can be a program name with args.
set dummy gnuplot; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:6173: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNUPLOT_BINARY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$GNUPLOT_BINARY"; then
ac_cv_prog_GNUPLOT_BINARY="$GNUPLOT_BINARY" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_GNUPLOT_BINARY="gnuplot"
--- 6423,6438 ----
# Extract the first word of "gnuplot", so it can be a program name with args.
set dummy gnuplot; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:6427: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNUPLOT_BINARY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$GNUPLOT_BINARY"; then
ac_cv_prog_GNUPLOT_BINARY="$GNUPLOT_BINARY" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_GNUPLOT_BINARY="gnuplot"
***************
*** 6196,6202 ****
if test -n "$GNUPLOT_BINARY"; then
echo $ac_n "checking to see if your gnuplot supports multiplot""... $ac_c" 1>&6
! echo "configure:6200: checking to see if your gnuplot supports multiplot" >&5
if test -z "`echo 'set term unknown; set multiplot' | \
$GNUPLOT_BINARY 2>&1`"; then
echo "$ac_t""yes" 1>&6
--- 6451,6457 ----
if test -n "$GNUPLOT_BINARY"; then
echo $ac_n "checking to see if your gnuplot supports multiplot""... $ac_c" 1>&6
! echo "configure:6455: checking to see if your gnuplot supports multiplot" >&5
if test -z "`echo 'set term unknown; set multiplot' | \
$GNUPLOT_BINARY 2>&1`"; then
echo "$ac_t""yes" 1>&6
***************
*** 6208,6214 ****
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking to see if your gnuplot supports multiple plot windows""... $ac_c" 1>&6
! echo "configure:6212: checking to see if your gnuplot supports multiple plot windows" >&5
if test -z "`echo 'set term x11 2' | $GNUPLOT_BINARY 2>&1`"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
--- 6463,6469 ----
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking to see if your gnuplot supports multiple plot windows""... $ac_c" 1>&6
! echo "configure:6467: checking to see if your gnuplot supports multiple plot windows" >&5
if test -z "`echo 'set term x11 2' | $GNUPLOT_BINARY 2>&1`"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
***************
*** 6254,6268 ****
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:6258: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_PAGER'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$DEFAULT_PAGER"; then
ac_cv_prog_DEFAULT_PAGER="$DEFAULT_PAGER" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_DEFAULT_PAGER="$ac_prog"
--- 6509,6524 ----
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:6513: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_PAGER'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$DEFAULT_PAGER"; then
ac_cv_prog_DEFAULT_PAGER="$DEFAULT_PAGER" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_DEFAULT_PAGER="$ac_prog"
***************
*** 6325,6331 ****
ac_safe=`echo "-Wall" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts -Wall""... $ac_c" 1>&6
! echo "configure:6329: checking whether ${CC-cc} accepts -Wall" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 6581,6587 ----
ac_safe=`echo "-Wall" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts -Wall""... $ac_c" 1>&6
! echo "configure:6585: checking whether ${CC-cc} accepts -Wall" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 6335,6354 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
--- 6591,6610 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
***************
*** 6359,6365 ****
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
!
fi
--- 6615,6627 ----
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
! ac_ext=c
! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
! ac_cpp='$CPP $CPPFLAGS'
! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
! cross_compiling=$ac_cv_prog_cc_cross
!
fi
***************
*** 6379,6385 ****
ac_safe=`echo "-Wall" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -Wall""... $ac_c" 1>&6
! echo "configure:6383: checking whether ${CXX-c++} accepts -Wall" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 6641,6647 ----
ac_safe=`echo "-Wall" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts -Wall""... $ac_c" 1>&6
! echo "configure:6645: checking whether ${CXX-c++} accepts -Wall" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 6389,6408 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Wall"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
--- 6651,6670 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Wall"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
***************
*** 6417,6423 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 6679,6685 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 6454,6460 ****
ac_safe=`echo "$flag" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts $flag""... $ac_c" 1>&6
! echo "configure:6458: checking whether ${CC-cc} accepts $flag" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 6716,6722 ----
ac_safe=`echo "$flag" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CC-cc} accepts $flag""... $ac_c" 1>&6
! echo "configure:6720: checking whether ${CC-cc} accepts $flag" >&5
if eval "test \"`echo '$''{'octave_cv_cc_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 6464,6483 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $flag"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
--- 6726,6745 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
XCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $flag"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cc_flag_$ac_safe=yes"
else
***************
*** 6488,6494 ****
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
!
fi
--- 6750,6762 ----
fi
rm -f conftest*
CFLAGS="$XCFLAGS"
! ac_ext=c
! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
! ac_cpp='$CPP $CPPFLAGS'
! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
! cross_compiling=$ac_cv_prog_cc_cross
!
fi
***************
*** 6509,6515 ****
ac_safe=`echo "$flag" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts $flag""... $ac_c" 1>&6
! echo "configure:6513: checking whether ${CXX-c++} accepts $flag" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 6777,6783 ----
ac_safe=`echo "$flag" | sed 'y%./+-%__p_%'`
echo $ac_n "checking whether ${CXX-c++} accepts $flag""... $ac_c" 1>&6
! echo "configure:6781: checking whether ${CXX-c++} accepts $flag" >&5
if eval "test \"`echo '$''{'octave_cv_cxx_flag_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 6519,6538 ****
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $flag"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
--- 6787,6806 ----
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $flag"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "octave_cv_cxx_flag_$ac_safe=yes"
else
***************
*** 6547,6553 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
--- 6815,6821 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
***************
*** 6603,6609 ****
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
! case `(ac_space=' '; set) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
--- 6871,6877 ----
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
! case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
***************
*** 6670,6676 ****
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
! echo "$CONFIG_STATUS generated by autoconf version 2.12"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
--- 6938,6944 ----
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
! echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
***************
*** 6681,6699 ****
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
! trap 'rm -fr `echo "Makefile octMakefile Makeconf install-octave
! test/Makefile dlfcn/Makefile
! doc/Makefile doc/faq/Makefile doc/interpreter/Makefile
! doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile
! emacs/Makefile examples/Makefile liboctave/Makefile
! src/Makefile libcruft/Makefile libcruft/Makerules
! libcruft/blas/Makefile libcruft/balgen/Makefile
! libcruft/dassl/Makefile libcruft/eispack/Makefile
! libcruft/fftpack/Makefile libcruft/lapack/Makefile
! libcruft/linpack/Makefile libcruft/minpack/Makefile
! libcruft/misc/Makefile libcruft/odepack/Makefile
! libcruft/quadpack/Makefile libcruft/ranlib/Makefile
! libcruft/specfun/Makefile libcruft/slatec-fn/Makefile
libcruft/slatec-err/Makefile libcruft/villad/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <> $CONFIG_STATUS < conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
+ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+ s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
***************
*** 6768,6774 ****
s%@F2C@%$F2C%g
s%@FORTRAN_MAIN_FLAG@%$FORTRAN_MAIN_FLAG%g
s%@FC@%$FC%g
- s%@FFLAGS@%$FFLAGS%g
s%@FLIBS@%$FLIBS%g
s%@F2CFLAGS@%$F2CFLAGS%g
/@f77_rules_frag@/r $f77_rules_frag
--- 7038,7043 ----
***************
*** 6794,6799 ****
--- 7063,7069 ----
s%@WITH_DL@%$WITH_DL%g
s%@LIBDLFCN@%$LIBDLFCN%g
s%@DLFCN_INCFLAGS@%$DLFCN_INCFLAGS%g
+ s%@RDYNAMIC_FLAG@%$RDYNAMIC_FLAG%g
s%@WITH_SHL@%$WITH_SHL%g
s%@WITH_DYNAMIC_LINKING@%$WITH_DYNAMIC_LINKING%g
s%@LIBOBJS@%$LIBOBJS%g
***************
*** 6808,6815 ****
s%@LN_S@%$LN_S%g
s%@RUNTEST@%$RUNTEST%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
- s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@DEFAULT_PAGER@%$DEFAULT_PAGER%g
s%@GNUPLOT_BINARY@%$GNUPLOT_BINARY%g
s%@EXE@%$EXE%g
--- 7078,7085 ----
s%@LN_S@%$LN_S%g
s%@RUNTEST@%$RUNTEST%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+ s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@DEFAULT_PAGER@%$DEFAULT_PAGER%g
s%@GNUPLOT_BINARY@%$GNUPLOT_BINARY%g
s%@EXE@%$EXE%g
***************
*** 6856,6874 ****
cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
--- 7126,7144 ----
cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
***************
*** 7145,7151 ****
fi
! chmod 755 install-octave
### Print a summary so that important information isn't missed.
--- 7415,7421 ----
fi
!
### Print a summary so that important information isn't missed.
***************
*** 7261,7263 ****
--- 7531,7535 ----
fi
### End of configure.
+ chmod +x install-octave
+
diff -cNr octave-2.0.13/configure.in octave-2.0.14/configure.in
*** octave-2.0.13/configure.in Fri May 15 00:37:57 1998
--- octave-2.0.14/configure.in Thu Feb 4 15:20:14 1999
***************
*** 158,163 ****
--- 158,170 ----
AC_DEFINE(BOUNDS_CHECKING, 1)
fi
+ ### It seems that there are some broken inline assembly functions in
+ ### the GNU libc. Since I'm not sure how to test whether we are using
+ ### GNU libc, just disable them for all platforms.
+
+ AC_MSG_RESULT([defining __NO_MATH_INLINES avoids buggy GNU libc exp function])
+ AC_DEFINE(__NO_MATH_INLINES, 1)
+
### See which C++ compiler to use (we expect to find g++).
EXTERN_CXXFLAGS="$CXXFLAGS"
***************
*** 284,289 ****
--- 291,311 ----
fi
AC_SUBST(LD_STATIC_FLAG)
+ dnl This is bogus. We shouldn't have to explicitly add libc too!
+
+ ### Look for math library. If found, this will add -lm to LIBS.
+
+ case "$canonical_host_type" in
+ *-*-nextstep*)
+ ;;
+ *-*-linux*)
+ AC_CHECK_LIB(m, sin, , , -lc)
+ ;;
+ *)
+ AC_CHECK_LIB(m, sin)
+ ;;
+ esac
+
OCTAVE_PROG_AR
AC_PROG_RANLIB
***************
*** 362,367 ****
--- 384,392 ----
FFLAGS="-fpe1 $FFLAGS"
fi
;;
+ powerpc-apple-machten*)
+ FFLAGS=
+ ;;
esac
if test -n "$FFLAGS"; then
AC_MSG_RESULT([defining FFLAGS to be $FFLAGS])
***************
*** 417,427 ****
fi
fi
rm -f conftest*
! AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, [-L. -lconflib -lm])
rm -f $oct_conflib
if test -z "$FLIBS"; then
! AC_CHECK_LIB(F77, d_sin, FLIBS=-lF77, FLIBS=, -lm)
if test -n "$FLIBS"; then
AC_CHECK_LIB(I77, f_rew, FLIBS="$FLIBS -lI77", FLIBS=, -lF77)
fi
--- 442,452 ----
fi
fi
rm -f conftest*
! AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, [-L. -lconflib])
rm -f $oct_conflib
if test -z "$FLIBS"; then
! AC_CHECK_LIB(F77, d_sin, FLIBS=-lF77, FLIBS=)
if test -n "$FLIBS"; then
AC_CHECK_LIB(I77, f_rew, FLIBS="$FLIBS -lI77", FLIBS=, -lF77)
fi
***************
*** 526,534 ****
SH_LDFLAGS="-shared -Xlinker -expect_unresolved -Xlinker '*'"
RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)'
;;
! changequote(,)dnl
! i[3456789]86-*-linux*)
! changequote([,])dnl
RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)'
;;
changequote(,)dnl
--- 551,557 ----
SH_LDFLAGS="-shared -Xlinker -expect_unresolved -Xlinker '*'"
RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)'
;;
! *-*-linux*)
RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)'
;;
changequote(,)dnl
***************
*** 655,666 ****
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(assert.h curses.h dlfcn.h fcntl.h float.h \
floatingpoint.h fnmatch.h glob.h grp.h ieeefp.h limits.h \
memory.h nan.h ncurses.h pwd.h sgtty.h stdlib.h string.h \
sys/param.h sys/resource.h sys/select.h sys/stat.h sys/time.h \
sys/times.h sys/types.h sys/utsname.h termcap.h termio.h \
! termios.h unistd.h varargs.h)
if test "$ac_cv_header_termios_h" = yes \
|| test "$ac_cv_header_termio_h" = yes \
--- 678,698 ----
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
+ ### I'm told that termios.h is broken on NeXT systems.
+
+ TERMIOS_H=termios.h
+ case "$canonical_host_type" in
+ *-*-nextstep*)
+ TERMIOS_H=
+ ;;
+ esac
+
AC_CHECK_HEADERS(assert.h curses.h dlfcn.h fcntl.h float.h \
floatingpoint.h fnmatch.h glob.h grp.h ieeefp.h limits.h \
memory.h nan.h ncurses.h pwd.h sgtty.h stdlib.h string.h \
sys/param.h sys/resource.h sys/select.h sys/stat.h sys/time.h \
sys/times.h sys/types.h sys/utsname.h termcap.h termio.h \
! $TERMIOS_H unistd.h varargs.h)
if test "$ac_cv_header_termios_h" = yes \
|| test "$ac_cv_header_termio_h" = yes \
***************
*** 675,689 ****
GLOB_INCFLAGS='-I$(top_srcdir)/glob -I$(TOPDIR)/glob'
if test "$ac_cv_header_fnmatch_h" = yes \
&& test "$ac_cv_header_glob_h" = yes; then
! GLOB_DIR=
! AC_CHECK_LIB(glob, glob)
! AC_CHECK_FUNCS(fnmatch glob)
! if test "$ac_cv_func_fnmatch" = yes \
! && test "$ac_cv_func_glob" = yes; then
! GLOB_DIR=
! LIBGLOB=
! GLOB_INCFLAGS=
! fi
fi
AC_SUBST(GLOB_DIR)
AC_SUBST(LIBGLOB)
--- 707,741 ----
GLOB_INCFLAGS='-I$(top_srcdir)/glob -I$(TOPDIR)/glob'
if test "$ac_cv_header_fnmatch_h" = yes \
&& test "$ac_cv_header_glob_h" = yes; then
! AC_EGREP_CPP(yes,
! [#ifdef FNM_NOESCAPE
! #ifdef FNM_FOOBAR_PATHNAME
! #ifdef FNM_PERIOD
! yes
! #endif
! #endif
! #endif
! ], [
! GLOB_DIR=
! AC_CHECK_LIB(glob, glob)
! AC_CHECK_FUNCS(fnmatch glob)
! if test "$ac_cv_func_fnmatch" = yes \
! && test "$ac_cv_func_glob" = yes; then
! GLOB_DIR=
! LIBGLOB=
! GLOB_INCFLAGS=
! fi
! ], [
! ### We provide replacements, so we should set these to "yes".
! AC_CACHE_VAL(ac_cv_func_fnmatch, ac_cv_func_fnmatch=yes)
! AC_CACHE_VAL(ac_cv_func_glob, ac_cv_func_glob=yes)
! ])
! else
! ### We provide replacements, so we should set these to "yes".
! ac_cv_header_fnmatch_h=yes
! ac_cv_header_glob_h=yes
! AC_CACHE_VAL(ac_cv_func_fnmatch, ac_cv_func_fnmatch=yes)
! AC_CACHE_VAL(ac_cv_func_glob, ac_cv_func_glob=yes)
fi
AC_SUBST(GLOB_DIR)
AC_SUBST(LIBGLOB)
***************
*** 697,710 ****
gettimeofday getuid getwd lstat memmove mkdir mkfifo on_exit pipe \
putenv rename rindex rmdir setgrent setpwent setvbuf sigaction \
sigpending sigprocmask sigsuspend stat strcasecmp strdup strerror \
! stricmp strncasecmp strnicmp tempnam umask unlink usleep vfprintf \
! vsprintf waitpid)
OCTAVE_SMART_PUTENV
OCTAVE_PROGRAM_INVOCATION_NAME
LIBDLFCN=
DLFCN_INCFLAGS=
if test "$WITH_DL" = yes || test "$WITH_DL" = maybe; then
case "$canonical_host_type" in
rs6000-ibm-aix* | powerpc-ibm-aix*)
--- 749,763 ----
gettimeofday getuid getwd lstat memmove mkdir mkfifo on_exit pipe \
putenv rename rindex rmdir setgrent setpwent setvbuf sigaction \
sigpending sigprocmask sigsuspend stat strcasecmp strdup strerror \
! stftime stricmp strncasecmp strnicmp tempnam umask unlink usleep \
! vfprintf vsprintf waitpid)
OCTAVE_SMART_PUTENV
OCTAVE_PROGRAM_INVOCATION_NAME
LIBDLFCN=
DLFCN_INCFLAGS=
+ RDYNAMIC_FLAG=
if test "$WITH_DL" = yes || test "$WITH_DL" = maybe; then
case "$canonical_host_type" in
rs6000-ibm-aix* | powerpc-ibm-aix*)
***************
*** 734,739 ****
--- 787,793 ----
;;
esac
if $WITH_DL; then
+ OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic])
AC_DEFINE(WITH_DL, 1)
fi
else
***************
*** 742,747 ****
--- 796,802 ----
AC_SUBST(WITH_DL)
AC_SUBST(LIBDLFCN)
AC_SUBST(DLFCN_INCFLAGS)
+ AC_SUBST(RDYNAMIC_FLAG)
if test "$WITH_SHL" = yes || test "$WITH_SHL" = maybe; then
AC_CHECK_LIB(dld, shl_load)
***************
*** 800,817 ****
### are often available. If they are missing, we try to replace them
### with functions from the BSD/NET2 math library.
! AC_CHECK_LIB(sunmath, quiet_nan, , , -lm)
!
! dnl This is bogus. We shouldn't have to explicitly add libc too!
!
! case "$canonical_host_type" in
! *-*-linux*)
! AC_CHECK_LIB(m, sin, , , -lc)
! ;;
! *)
! AC_CHECK_LIB(m, sin)
! ;;
! esac
### I am told that Inf and NaN don't work on m68k HP sytems, and that
### on SCO systems, isnan and isinf don't work, but they can be
--- 855,861 ----
### are often available. If they are missing, we try to replace them
### with functions from the BSD/NET2 math library.
! AC_CHECK_LIB(sunmath, quiet_nan)
### I am told that Inf and NaN don't work on m68k HP sytems, and that
### on SCO systems, isnan and isinf don't work, but they can be
***************
*** 1059,1080 ****
### Do the substitutions in all the Makefiles.
! AC_OUTPUT(Makefile octMakefile Makeconf install-octave
! test/Makefile dlfcn/Makefile
! doc/Makefile doc/faq/Makefile doc/interpreter/Makefile
! doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile
! emacs/Makefile examples/Makefile liboctave/Makefile
! src/Makefile libcruft/Makefile libcruft/Makerules
! libcruft/blas/Makefile libcruft/balgen/Makefile
! libcruft/dassl/Makefile libcruft/eispack/Makefile
! libcruft/fftpack/Makefile libcruft/lapack/Makefile
! libcruft/linpack/Makefile libcruft/minpack/Makefile
! libcruft/misc/Makefile libcruft/odepack/Makefile
! libcruft/quadpack/Makefile libcruft/ranlib/Makefile
! libcruft/specfun/Makefile libcruft/slatec-fn/Makefile
libcruft/slatec-err/Makefile libcruft/villad/Makefile)
! chmod 755 install-octave
### Print a summary so that important information isn't missed.
--- 1103,1124 ----
### Do the substitutions in all the Makefiles.
! AC_OUTPUT(Makefile octMakefile Makeconf install-octave \
! test/Makefile dlfcn/Makefile \
! doc/Makefile doc/faq/Makefile doc/interpreter/Makefile \
! doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile \
! emacs/Makefile examples/Makefile liboctave/Makefile \
! src/Makefile libcruft/Makefile libcruft/Makerules \
! libcruft/amos/Makefile libcruft/blas/Makefile \
! libcruft/balgen/Makefile libcruft/dassl/Makefile \
! libcruft/eispack/Makefile libcruft/fftpack/Makefile \
! libcruft/lapack/Makefile libcruft/linpack/Makefile \
! libcruft/minpack/Makefile libcruft/misc/Makefile \
! libcruft/odepack/Makefile libcruft/quadpack/Makefile \
! libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile \
libcruft/slatec-err/Makefile libcruft/villad/Makefile)
! AC_OUTPUT_COMMANDS([chmod +x install-octave])
### Print a summary so that important information isn't missed.
diff -cNr octave-2.0.13/doc/ChangeLog octave-2.0.14/doc/ChangeLog
*** octave-2.0.13/doc/ChangeLog Thu May 21 13:15:49 1998
--- octave-2.0.14/doc/ChangeLog Wed Apr 14 12:55:53 1999
***************
*** 1,3 ****
--- 1,12 ----
+ Wed Apr 14 12:55:42 1999 John W. Eaton
+
+ * Version 2.0.14 released.
+
+ Fri Oct 9 00:27:33 1998 John W. Eaton
+
+ * faq/Makefile.in, interpreter/Makefile.in, liboctave/Makefile.in:
+ New rules for generating HTML files from Texinfo sources.
+
Thu May 21 13:15:36 1998 John W. Eaton
* Version 2.0.13 released.
diff -cNr octave-2.0.13/doc/faq/Makefile.in octave-2.0.14/doc/faq/Makefile.in
*** octave-2.0.13/doc/faq/Makefile.in Tue May 20 14:46:29 1997
--- octave-2.0.14/doc/faq/Makefile.in Fri Oct 9 00:30:36 1998
***************
*** 22,28 ****
TEXINFO := Octave-FAQ.texi
! FORMATTED := Octave-FAQ.info Octave-FAQ.dvi Octave-FAQ.ps
DISTFILES := Makefile.in $(TEXINFO) $(FORMATTED)
--- 22,28 ----
TEXINFO := Octave-FAQ.texi
! FORMATTED := Octave-FAQ.info Octave-FAQ.dvi Octave-FAQ.ps Octave-FAQ_*.html
DISTFILES := Makefile.in $(TEXINFO) $(FORMATTED)
***************
*** 35,41 ****
sed -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp
mv $@.tmp $@
! all: Octave-FAQ.info Octave-FAQ.dvi Octave-FAQ.ps
.PHONY: all
Octave-FAQ.info: Octave-FAQ.texi
--- 35,41 ----
sed -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp
mv $@.tmp $@
! all: Octave-FAQ.info Octave-FAQ.dvi Octave-FAQ.ps Octave-FAQ_toc.html
.PHONY: all
Octave-FAQ.info: Octave-FAQ.texi
***************
*** 49,54 ****
--- 49,57 ----
Octave-FAQ.ps: Octave-FAQ.dvi
-dvips -o Octave-FAQ.ps Octave-FAQ.dvi
+ Octave-FAQ_toc.html:
+ -texi2html -split_chapter $(srcdir)/Octave-FAQ.texi
+
check install uninstall:
.PHONY: check install uninstall
***************
*** 75,80 ****
--- 78,84 ----
maintainer-clean: distclean
rm -f tags TAGS Octave-FAQ.info Octave-FAQ.info-*
rm -f Octave-FAQ.dvi Octave-FAQ.ps
+ rm -f Octave-FAQ_*.html
.PHONY: maintainer-clean
dist: all
diff -cNr octave-2.0.13/doc/faq/Octave-FAQ_1.html octave-2.0.14/doc/faq/Octave-FAQ_1.html
*** octave-2.0.13/doc/faq/Octave-FAQ_1.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/faq/Octave-FAQ_1.html Fri Oct 9 00:26:25 1998
***************
*** 0 ****
--- 1,92 ----
+
+
+
+
+ Frequently asked questions about Octave (with answers) - What is Octave?
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+ This is a list of frequently asked questions (FAQ) for Octave users.
+
+
+
+ Some information in this FAQ was written for earlier versions of
+ Octave and may now be obsolete.
+
+
+
+ I'm looking for new questions (with answers), better answers,
+ or both. Please send suggestions to bug-octave@bevo.che.wisc.edu.
+ If you have general questions about Octave, or need help for something
+ that is not covered by the Octave manual or the FAQ, please use the
+ help-octave@bevo.che.wisc.edu mailing list.
+
+
+
+ This FAQ is intended to supplement, not replace, the Octave manual.
+ Before posting a question to the help-octave mailing list, you should
+ first check to see if the topic is covered in the manual.
+
+
+
+
+
+
+
+
+ Octave is a high-level interactive language, primarily intended for
+ numerical computations that is mostly compatible with
+ MATLAB.(1)
+
+
+
+ Octave can do arithmetic for real and complex scalars and matrices,
+ solve sets of nonlinear algebraic equations, integrate functions over
+ finite and infinite intervals, and integrate systems of ordinary
+ differential and differential-algebraic equations.
+
+
+
+ Octave uses the GNU readline library to handle reading and editing
+ input. By default, the line editing commands are similar to the
+ cursor movement commands used by GNU Emacs, and a vi-style line
+ editing interface is also available. At the end of each session, the
+ command history is saved, so that commands entered during previous
+ sessions are not lost.
+
+
+
+ The Octave distribution includes a 200+ page Texinfo manual. Access
+ to the complete text of the manual is available via the help command
+ at the Octave prompt.
+
+
+
+ Two and three dimensional plotting is fully supported using gnuplot.
+
+
+
+ The underlying numerical solvers are currently standard Fortran ones
+ like Lapack, Linpack, Odepack, the Blas, etc., packaged in a library
+ of C++ classes. If possible, the Fortran subroutines are compiled
+ with the system's Fortran compiler, and called directly from the C++
+ functions. If that's not possible, you can still compile Octave if
+ you have the free Fortran to C translator f2c.
+
+
+
+ Octave is also free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/faq/Octave-FAQ_10.html octave-2.0.14/doc/faq/Octave-FAQ_10.html
*** octave-2.0.13/doc/faq/Octave-FAQ_10.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/faq/Octave-FAQ_10.html Fri Oct 9 00:26:25 1998
***************
*** 0 ****
--- 1,112 ----
+
+
+
+
+ Frequently asked questions about Octave (with answers) - Porting programs from Matlab to Octave
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+ "I wrote some code for MATLAB, and I want to get it running under
+ Octave. Is there anything I should watch out for?"
+
+
+
+ The differences between Octave and MATLAB typically fall into one of
+ three categories:
+
+
+
+
+ -
+
+ Irrelevant.
+
+
-
+
+ Known differences, perhaps configurable with a user preference variable.
+
+
-
+
+ Unknown differences.
+
+
+
+ The first category, irrelevant differences, do not affect computations
+ and most likely do not affect the execution of function files.
+
+
+
+ The differences of the second category are usually because the authors
+ of Octave decided on a better (subjective) implementation that the way
+ MATLAB does it, and so introduced "user preference variables" so that
+ you can customize Octave's behavior to be either MATLAB-compatible or
+ to use Octave's new features. To make Octave more MATLAB-compatible,
+ put the following statements in your `~/.octaverc' file, or use the
+ command line option `--traditional', which implies all of these
+ settings. Note that this list may not be complete, because some new
+ variables may have been introduced since this document was last updated.
+
+
+
+
+ PS1 = ">> "
+ PS2 = ""
+ beep_on_error = 1.0
+ default_eval_print_flag = 0.0
+ default_save_format = "mat-binary"
+ define_all_return_values = 1.0
+ do_fortran_indexing = 1.0
+ empty_list_elements_ok = 1.0
+ fixed_point_format = 1.0
+ implicit_num_to_str_ok = 1.0
+ implicit_str_to_num_ok = 1.0
+ ok_to_lose_imaginary_part = 1.0
+ page_screen_output = 0.0
+ prefer_column_vectors = 0.0
+ prefer_zero_one_indexing = 1.0
+ print_empty_dimensions = 0.0
+ treat_neg_dim_as_zero = 1.0
+ warn_function_name_clash = 0.0
+ whitespace_in_literal_matrix = "traditional"
+
+
+
+ Some other known differences are:
+
+
+
+
+ -
+
+ The Octave plotting functions are mostly compatible with the ones from
+ MATLAB 3.x, but not from MATLAB 4.x.
+
+
+
+ The third category of differences is (hopefully) shrinking. If you find
+ a difference between Octave behavior and MATLAB, then you should send a
+ description of this difference (with code illustrating the difference,
+ if possible) to bug-octave@bevo.che.wisc.edu.
+
+
+
+ An archive of old postings to the Octave mailing lists is maintained
+ on ftp.che.wisc.edu in the directory `/pub/octave/MAILING-LISTS'.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/faq/Octave-FAQ_11.html octave-2.0.14/doc/faq/Octave-FAQ_11.html
*** octave-2.0.13/doc/faq/Octave-FAQ_11.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/faq/Octave-FAQ_11.html Fri Oct 9 00:26:25 1998
***************
*** 0 ****
--- 1,129 ----
+
+
+
+
+ Frequently asked questions about Octave (with answers) - Concept Index
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
a
+
+ Additional help
+ Argument lists, variable-length
+
+ b
+
+ Boolean operators, short-circuit
+ Bug in Octave, newly found
+
+ c
+
+ Command completion
+ Command history
+ Compatibility with MATLAB
+
+ d
+
+ DASSL
+ Data structures
+ Decrement operators
+ DJGPP
+
+ e
+
+ EMX
+
+ f
+
+ Flex
+ FSF [Free Software Foundation]
+ FSF, contact <gnu@prep.ai.mit.edu>
+ Function name completion
+
+ g
+
+ GNU [GNU's not unix]
+ GNU Bison
+ GNU g++
+ GNU gcc
+ GNU Make
+ GNUware, anonymous FTP sites
+
+ h
+
+ History
+
+ i
+
+ Increment operators
+
+ l
+
+ libg++
+ Logical operators, short-circuit
+ LSODE
+
+ m
+
+ Mailing lists, bug-octave
+ Mailing lists, help-octave
+ Manual, for Octave
+ MATLAB compatibility
+ MS-DOS support
+
+ n
+
+ Name completion
+
+ o
+
+ Octave bug report
+ Octave, building
+ Octave, documentation
+ Octave, getting a copy
+ Octave, ordering
+ Octave, version date
+ Operators, boolean
+ Operators, decrement
+ Operators, increment
+ OS/2 support
+
+ r
+
+ Return lists, variable-length
+
+ s
+
+ Short-circuit boolean operators
+ Source code
+ Structures
+
+ u
+
+ Unwind-protect
+
+ v
+
+ Variable name completion
+ Variable-length argument lists
+ Variable-length return lists
+ VAX
+ VMS support
+
+ w
+
+ Windows support
+
+
+
+
+ Version 2.0.10 of Octave was released February 6, 1998. Most bugs
+ reported since version 2.0 was release have been fixed, and a number of
+ new features have been added. Octave is now much more compatible with
+ MATLAB.
+
+
+
+ A list of user-visible changes in recent versions of Octave may be found
+ in the file NEWS, distributed in both source and binary releases of
+ Octave.
+
+
+
+ Typing a TAB character (ASCII code 9) on the command line causes Octave
+ to attempt to complete variable, function, and file names. Octave uses
+ the text before the cursor as the initial portion of the name to
+ complete.
+
+
+
+ When running interactively, Octave saves the commands you type in an
+ internal buffer so that you can recall and edit them. Emacs and vi
+ editing modes are available with Emacs keybindings enabled by default.
+
+
+
+ Octave includes a limited amount of support for organizing data in
+ structures. The current implementation uses an associative array
+ with indices limited to strings, but the syntax is more like C-style
+ structures. Here are some examples of using data structures in Octave.
+
+
+
+
+ This feature should be considered experimental, but you should expect it
+ to work. Suggestions for ways to improve it are welcome.
+
+
+
+
+
+ For matrix and vector arguments, the increment and decrement operators
+ work on each element of the operand.
+
+
+
+ It is not currently possible to increment index expressions. For
+ example, you might expect that the expression v(4)++
would
+ increment the fourth element of the vector v, but instead it
+ results in a parse error. This problem may be fixed in a future
+ release of Octave.
+
+
+
+
+
+ Octave supports a limited form of exception handling modelled after the
+ unwind-protect form of Lisp. The general form of an
+ unwind_protect
block looks like this:
+
+
+
+
+ Octave has a real mechanism for handling functions that take an
+ unspecified number of arguments, so it is no longer necessary to place
+ an upper bound on the number of optional arguments that a function can
+ accept.
+
+
+
+ Here is an example of a function that uses the new syntax to print a
+ header followed by an unspecified number of values:
+
+
+
+
+ Octave also has a real mechanism for handling functions that return an
+ unspecified number of values, so it is no longer necessary to place an
+ upper bound on the number of outputs that a function can produce.
+
+
+
+ Octave includes LSODE and DASSL for solving systems of stiff ordinary
+ differential and differential-algebraic equations. These functions are
+ built in to the interpreter.
+
+
+
+ The Octave distribution includes a 220+ page manual that is also
+ distributed under the terms of the GNU GPL.
+
+
+
+ The Octave manual is intended to be a complete reference for Octave, but
+ it is not a finished document. If you have problems using it, or find
+ that some topic is not adequately explained, indexed, or
+ cross-referenced, please send a bug report to bug-octave@bevo.che.wisc.edu.
+
+
+
+ Because the Octave manual is written using Texinfo, the complete text of
+ the Octave manual is also available on line using the GNU Info system
+ via the GNU Emacs, info, or xinfo programs, or by using the `help -i'
+ command to start the GNU info browser directly from the Octave prompt.
+
+
+
+ It is also possible to use your favorite WWW browser to read the Octave
+ manual by converting the Texinfo source to HTML using the
+ texi2html
program.
+
+
+
+ You can get Octave from a friend who has a copy, by anonymous FTP, or by
+ ordering a tape or CD-ROM from the Free Software Foundation (FSF).
+
+
+
+ Octave was not developed by the FSF, but the FSF does distribute Octave,
+ and the developers of Octave support the efforts of the FSF by
+ encouraging users of Octave to order Octave on CD-ROM directly from
+ the FSF.
+
+
+
+ The FSF is a nonprofit organization that distributes software and
+ manuals to raise funds for more GNU development. Buying a CD-ROM from
+ the FSF contributes directly to paying staff to develop GNU software.
+ CD-ROMs cost $240 if an organization is buying, or $60 if an individual
+ is buying.
+
+
+
+ For more information about ordering from the FSF, contact
+ gnu@gnu.org, phone (617) 542-5942 or anonymous ftp the file
+ `/pub/gnu/GNUinfo/ORDERS' from ftp.gnu.org.
+
+
+
+ If you are on the Internet, you can copy the latest distribution
+ version of Octave from the file `/pub/octave/octave-M.N.tar.gz', on
+ the host `ftp.che.wisc.edu'. This tar file has been compressed
+ with GNU gzip, so be sure to use binary mode for the transfer. `M'
+ and `N' stand for version numbers; look at a listing of the
+ directory through ftp to see what version is available. After you
+ unpack the distribution, be sure to look at the files `README' and
+ `INSTALL'.
+
+
+
+ Binaries for several popular systems are also available. If you would
+ like help out by making binaries available for other systems, please
+ contact bug-octave@bevo.che.wisc.edu.
+
+
+
+ A list of user-visible changes since the last release is available in
+ the file `NEWS'. The file `ChangeLog' in the source
+ distribution contains a more detailed record of changes made since the
+ last release.
+
+
+
+
+
+ Octave currently runs on Unix-like systems, OS/2, and Windows NT/95
+ (using the gnu-win32 tools from Cygnus Support). It should be possible
+ to make Octave work on other systems as well. If you are interested in
+ porting Octave to other systems, please contact
+ bug-octave@bevo.che.wisc.edu.
+
+
+
+
+
+ Octave requires approximately 125MB of disk storage to unpack and
+ compile from source (significantly less if you don't compile with
+ debugging symbols or create shared libraries). Once installed, Octave
+ requires approximately 65MB of disk space (again, considerably less if
+ you don't build shared libraries or the binaries and libraries do not
+ include debugging symbols).
+
+
+
+
+
+
+ To compile Octave, you will need a recent version of GNU Make. You
+ will also need g++ 2.7.2 or later. Version 2.8.0 or egcs 1.0.x should
+ work. Later versions may work, but C++ is still evolving, so don't be
+ too surprised if you run into some trouble.
+
+
+
+ It is no longer necessary to have libg++, but you do need to have the
+ GNU implementation of libstdc++. If you are using g++ 2.7.2,
+ libstdc++ is distributed along with libg++, but for later versions,
+ libstdc++ is distributed separately. For egcs, libstdc++ is included
+ with the compiler distribution.
+
+
+
+ <em>You must have gnu make to compile octave</em>. Octave's Makefiles
+ use features of GNU Make that are not present in other versions of make.
+ GNU Make is very portable and easy to install.
+
+
+
+
+
+ Currently, Octave can only be compiled with the GNU C++ compiler. It
+ would be nice to make it possible to compile Octave with other C++
+ compilers, but the maintainers do not have sufficient time to devote to
+ this. If you are interested in working to make Octave portable to other
+ compilers, please contact bug-octave@bevo.che.wisc.edu.
+
+
+
+ This list is probably far too short. Feel free to suggest additional
+ questions (preferably with answers!)
+
+
+
+
+ is available for questions related to using, installing, and porting
+ Octave that are not adequately answered by the Octave manual or by this
+ document.
+
+
+
+ If you would like to join the discussion and receive all messages sent
+ to the list, please send a short note to
+
+
+
+
+ An archive of old postings to the help-octave mailing list is maintained
+ on ftp.che.wisc.edu in the directory `/pub/octave/MAILING-LISTS'.
+
+
+
+ "I think I have found a bug in Octave, but I'm not sure. How do I know,
+ and who should I tell?"
+
+
+
+ First, see the section on bugs and bug reports in the Octave manual.
+ The Octave manual is included in the Octave distribution.
+
+
+
+ When you report a bug, make sure to describe the type of computer you
+ are using, the version of the operating system it is running, and the
+ version of Octave that you are using. Also provide enough code so that
+ the Octave maintainers can duplicate your bug.
+
+
+
+ If you have Octave working at all, the easiest way to do this is to use
+ the Octave function bug_report
. When you execute this function,
+ Octave will prompt you for a subject and then invoke the editor on a
+ file that already contains all the configuration information. When you
+ exit the editor, Octave will mail the bug report for you.
+
+
+ " visits the menu
item named `Item', etc.
+ * Menu: The list of major topics begins on the next line.
+
* Octave: (octave). Interactive language for numerical computations.
diff -cNr octave-2.0.13/doc/interpreter/emacs.texi octave-2.0.14/doc/interpreter/emacs.texi
*** octave-2.0.13/doc/interpreter/emacs.texi Thu Feb 12 02:14:23 1998
--- octave-2.0.14/doc/interpreter/emacs.texi Fri Dec 4 17:07:02 1998
***************
*** 337,342 ****
--- 337,349 ----
There is also rudimentary support for Imenu (currently, function names
can be indexed).
+ @cindex TAGS
+ @cindex Emacs TAGS files
+ @cindex @code{otags}
+ You can generate TAGS files for Emacs from Octave @file{.m} files using
+ the shell script @code{otags} that is installed alongside your copy of
+ Octave.
+
Customization of Octave mode can be performed by modification of the
variable @code{octave-mode-hook}. It the value of this variable is
non-@code{nil}, turning on Octave mode calls its value.
diff -cNr octave-2.0.13/doc/interpreter/func.texi octave-2.0.14/doc/interpreter/func.texi
*** octave-2.0.13/doc/interpreter/func.texi Wed Jan 28 22:34:13 1998
--- octave-2.0.14/doc/interpreter/func.texi Fri Dec 4 17:15:03 1998
***************
*** 630,644 ****
@c XXX FIXME XXX -- note about time stamps on files in NFS environments?
@defvr {Built-in Variable} LOADPATH
A colon separated list of directories in which to search for function
files. @xref{Functions and Scripts}. The value of @code{LOADPATH}
overrides the environment variable @code{OCTAVE_PATH}. @xref{Installation}.
@code{LOADPATH} is now handled in the same way as @TeX{} handles
! @code{TEXINPUTS}. If the path starts with @samp{:}, the standard path
! is prepended to the value of @code{LOADPATH}. If it ends with @samp{:}
! the standard path is appended to the value of @code{LOADPATH}.
In addition, if any path element ends in @samp{//}, that directory and
all subdirectories it contains are searched recursively for function
--- 630,652 ----
@c XXX FIXME XXX -- note about time stamps on files in NFS environments?
+ @defvr {Built-in Variable} DEFAULT_LOADPATH
+ A colon separated list of directories in which to search for function
+ files by default. The value of this variable is also automatically
+ substituted for leading, trailing, or doubled colons that appear in the
+ built-in variable @code{LOADPATH}.
+ @end defvr
+
@defvr {Built-in Variable} LOADPATH
A colon separated list of directories in which to search for function
files. @xref{Functions and Scripts}. The value of @code{LOADPATH}
overrides the environment variable @code{OCTAVE_PATH}. @xref{Installation}.
@code{LOADPATH} is now handled in the same way as @TeX{} handles
! @code{TEXINPUTS}. Leading, trailing, or doubled colons that appear in
! @code{LOADPATH} are replaced by the value of @code{DEFAULT_LOADPATH}.
! The default value of @code{LOADPATH} is @code{":"}, which tells Octave
! to search in the directories specified by @code{DEFAULT_LOADPATH}.
In addition, if any path element ends in @samp{//}, that directory and
all subdirectories it contains are searched recursively for function
diff -cNr octave-2.0.13/doc/interpreter/io.texi octave-2.0.14/doc/interpreter/io.texi
*** octave-2.0.13/doc/interpreter/io.texi Wed Sep 10 16:01:56 1997
--- octave-2.0.14/doc/interpreter/io.texi Wed Apr 14 12:52:51 1999
***************
*** 145,153 ****
@table @code
@item short
! This is the default format. Octave will try to print numbers with at
! least 5 significant figures within a field that is a maximum of 10
! characters wide.
If Octave is unable to format a matrix so that columns line up on the
decimal point and all the numbers fit within the maximum field width,
--- 145,152 ----
@table @code
@item short
! Octave will try to print numbers with at least 3 significant figures
! within a field that is a maximum of 8 characters wide.
If Octave is unable to format a matrix so that columns line up on the
decimal point and all the numbers fit within the maximum field width,
***************
*** 213,218 ****
--- 212,227 ----
in IEEE format with the least significant byte first. This format only
works for numeric types.
@end table
+
+ By default, Octave will try to print numbers with at least 5 significant
+ figures within a field that is a maximum of 10 characters wide.
+
+ If Octave is unable to format a matrix so that columns line up on the
+ decimal point and all the numbers fit within the maximum field width,
+ it switches to an @samp{e} format.
+
+ If @code{format} is invoked without any options, the default format
+ state is restored.
@end deffn
@defvr {Built-in Variable} print_answer_id_name
***************
*** 379,385 ****
the file @file{data} in Octave's binary format.
@end deffn
! There are two variables that modify the behavior of @code{save}.
@defvr {Built-in Variable} default_save_format
This variable specifies the default format for the @code{save} command.
--- 388,401 ----
the file @file{data} in Octave's binary format.
@end deffn
! There are two variables that modify the behavior of @code{save} and one
! that controls whether variables are saved when Octave exits unexpectedly.
!
! @defvr {Built-in Variable} crash_dumps_octave_core
! If this variable is set to a nonzero value, Octave tries to save all
! current variables the the file "octave-core" if it crashes or receives a
! hangup, terminate or similar signal. The default value is 1.
! @end defvr
@defvr {Built-in Variable} default_save_format
This variable specifies the default format for the @code{save} command.
***************
*** 1049,1055 ****
Read as much as possible, returning a column vector.
@item @var{nr}
! @itemx [@var{nr}, Inf]
Read as much as possible, returning a matrix with @var{nr} rows. If the
number of elements read is not an exact multiple of @var{nr}, the last
column is padded with zeros.
--- 1065,1073 ----
Read as much as possible, returning a column vector.
@item @var{nr}
! Read up to @var{nr} elements, returning a column vector.
!
! @item [@var{nr}, Inf]
Read as much as possible, returning a matrix with @var{nr} rows. If the
number of elements read is not an exact multiple of @var{nr}, the last
column is padded with zeros.
***************
*** 1303,1309 ****
Read as much as possible, returning a column vector.
@item @var{nr}
! @itemx [@var{nr}, Inf]
Read as much as possible, returning a matrix with @var{nr} rows. If the
number of elements read is not an exact multiple of @var{nr}, the last
column is padded with zeros.
--- 1321,1329 ----
Read as much as possible, returning a column vector.
@item @var{nr}
! Read up to @var{nr} elements, returning a column vector.
!
! @item [@var{nr}, Inf]
Read as much as possible, returning a matrix with @var{nr} rows. If the
number of elements read is not an exact multiple of @var{nr}, the last
column is padded with zeros.
diff -cNr octave-2.0.13/doc/interpreter/matrix.texi octave-2.0.14/doc/interpreter/matrix.texi
*** octave-2.0.13/doc/interpreter/matrix.texi Tue Feb 17 12:31:28 1998
--- octave-2.0.14/doc/interpreter/matrix.texi Wed Nov 11 11:04:11 1998
***************
*** 68,74 ****
@end example
@noindent
! tests a random 5 by 5 matrix to see if all of it's elements are less
than 0.9.
Note that in conditional contexts (like the test clause of @code{if} and
--- 68,74 ----
@end example
@noindent
! tests a random 5 by 5 matrix to see if all of its elements are less
than 0.9.
Note that in conditional contexts (like the test clause of @code{if} and
diff -cNr octave-2.0.13/doc/interpreter/octave_1.html octave-2.0.14/doc/interpreter/octave_1.html
*** octave-2.0.13/doc/interpreter/octave_1.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_1.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,369 ----
+
+
+
+
+ GNU Octave - Preface
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+ % Copyright (C) 1996, 1997 John W. Eaton
+ % This is part of the Octave manual.
+ % For copying conditions, see the file gpl.texi.
+
+
+
+ \input texinfo
+
+
+
+
+ Copyright (C) 1996, 1997 John W. Eaton.
+
+
+
+ This is the third edition of the Octave documentation, and is consistent
+ with version 2.0.13 of Octave.
+
+
+
+ Permission is granted to make and distribute verbatim copies of
+ this manual provided the copyright notice and this permission notice
+ are preserved on all copies.
+
+
+
+ Permission is granted to copy and distribute modified versions of this
+ manual under the conditions for verbatim copying, provided that the entire
+ resulting derived work is distributed under the terms of a permission
+ notice identical to this one.
+
+
+
+ Permission is granted to copy and distribute translations of this manual
+ into another language, under the same conditions as for modified versions.
+
+
+
+ Portions of this document have been adapted from the gawk
,
+ readline
, gcc
, and C library manuals, published by the Free
+ Software Foundation, 59 Temple Place--Suite 330, Boston, MA
+ 02111--1307, USA.
+
+
+
+
+
+
+
+
+
+
+
+
+ Octave was originally intended to be companion software for an
+ undergraduate-level textbook on chemical reactor design being written by
+ James B. Rawlings of the University of Wisconsin-Madison and John
+ G. Ekerdt of the University of Texas.
+
+
+
+ Clearly, Octave is now much more than just another `courseware' package
+ with limited utility beyond the classroom. Although our initial goals
+ were somewhat vague, we knew that we wanted to create something that
+ would enable students to solve realistic problems, and that they could
+ use for many things other than chemical reactor design problems.
+
+
+
+ There are those who would say that we should be teaching the students
+ Fortran instead, because that is the computer language of engineering,
+ but every time we have tried that, the students have spent far too much
+ time trying to figure out why their Fortran code crashes and not enough
+ time learning about chemical engineering. With Octave, most students
+ pick up the basics quickly, and are using it confidently in just a few
+ hours.
+
+
+
+ Although it was originally intended to be used to teach reactor design,
+ it has been used in several other undergraduate and graduate
+ courses in the Chemical Engineering Department at the University of
+ Texas, and the math department at the University of Texas has been using
+ it for teaching differential equations and linear algebra as well. If
+ you find it useful, please let us know. We are always interested to
+ find out how Octave is being used in other places.
+
+
+
+ Virtually everyone thinks that the name Octave has something to do with
+ music, but it is actually the name of a former professor of mine who
+ wrote a famous textbook on chemical reaction engineering, and who was
+ also well known for his ability to do quick `back of the envelope'
+ calculations. We hope that this software will make it possible for many
+ people to do more ambitious computations just as easily.
+
+
+
+ Everyone is encouraged to share this software with others under the
+ terms of the GNU General Public License (see section GNU GENERAL PUBLIC LICENSE) as described
+ at the beginning of this manual. You are also encouraged to help make
+ Octave more useful by writing and contributing additional functions for
+ it, and by reporting any problems you may have.
+
+
+
+
+
+
+
+
+
+
+
+ Many people have already contributed to Octave's development. In
+ addition to John W. Eaton, the following people have helped write parts
+ of Octave or helped out in various other ways.
+
+
+
+
+
+ -
+
+ Thomas Baier @email{baier@ci.tuwien.ac.at} wrote the original versions
+ of
popen
, pclose
, execute
, sync_system
, and
+ async_system
.
+
+ -
+
+ Karl Berry @email{karl@cs.umb.edu} wrote the
kpathsea
library
+ that allows Octave to recursively search directory paths for function
+ and script files.
+
+ -
+
+ Georg Beyerle @email{gbeyerle@awi-potsdam.de} contributed code to save
+ values in MATLAB's `.mat'-file format, and has provided many
+ useful bug reports and suggestions.
+
+
-
+
+ John Campbell @email{jcc@bevo.che.wisc.edu} wrote most of the file and
+ C-style input and output functions.
+
+
-
+
+ Brian Fox @email{bfox@gnu.ai.mit.edu} wrote the
readline
library
+ used for command history editing, and the portion of this manual that
+ documents it.
+
+ -
+
+ Klaus Gebhardt @email{gebhardt@crunch.ikp.physik.th-darmstadt.de}
+ ported Octave to OS/2.
+
+
-
+
+ A. Scottedward Hodel @email{A.S.Hodel@eng.auburn.edu} contributed a number
+ of functions including
expm
, qzval
, qzhess
,
+ syl
, lyap
, and balance
.
+
+ -
+
+ Kurt Hornik @email{Kurt.Hornik@ci.tuwien.ac.at} provided the
+
corrcoef
, cov
, fftconv
, fftfilt
, gcd
,
+ lcd
, kurtosis
, null
, orth
, poly
,
+ polyfit
, roots
, and skewness
functions, supplied
+ documentation for these and numerous other functions, rewrote the Emacs
+ mode for editing Octave code and provided its documentation, and has
+ helped tremendously with testing. He has also been a constant source of
+ new ideas for improving Octave.
+
+ -
+
+ Phil Johnson @email{johnsonp@nicco.sscnet.ucla.edu} has helped to make
+ Linux releases available.
+
+
-
+
+ Friedrich Leisch @email{leisch@ci.tuwien.ac.at} provided the
+
mahalanobis
function.
+
+ -
+
+ Ken Neighbors @email{wkn@leland.stanford.edu} has provided many useful
+ bug reports and comments on MATLAB compatibility.
+
+
-
+
+ Rick Niles @email{niles@axp745.gsfc.nasa.gov} rewrote Octave's plotting
+ functions to add line styles and the ability to specify an unlimited
+ number of lines in a single call. He also continues to track down odd
+ incompatibilities and bugs.
+
+
-
+
+ Mark Odegard @email{meo@sugarland.unocal.com} provided the initial
+ implementation of
fread
, fwrite
, feof
, and
+ ferror
.
+
+ -
+
+ Tony Richardson @email{tony@guts.biomed.uakron.edu} wrote Octave's
+ image processing functions as well as most of the original polynomial
+ functions.
+
+
-
+
+ R. Bruce Tenison @email{Bruce.Tenison@eng.auburn.edu} wrote the
+
hess
and schur
functions.
+
+ -
+
+ Teresa Twaroch @email{twaroch@ci.tuwien.ac.at} provided the functions
+
gls
and ols
.
+
+ -
+
+ Andreas Weingessel @email{Andreas.Weingessel@ci.tuwien.ac.at} wrote the
+ audio functions
lin2mu
, loadaudio
, mu2lin
,
+ playaudio
, record
, saveaudio
, and setaudio
.
+
+ -
+
+ Fook Fah Yap @email{ffy@eng.cam.ac.uk} provided the
fft
and
+ ifft
functions and valuable bug reports for early versions.
+
+
+
+ Special thanks to the following people and organizations for
+ supporting the development of Octave:
+
+
+
+
+ -
+
+ Digital Equipment Corporation, for an equipment grant as part of their
+ External Research Program.
+
+
-
+
+ Sun Microsystems, Inc., for an Academic Equipment grant.
+
+
-
+
+ International Business Machines, Inc., for providing equipment as part
+ of a grant to the University of Texas College of Engineering.
+
+
-
+
+ Texaco Chemical Company, for providing funding to continue the
+ development of this software.
+
+
-
+
+ The University of Texas College of Engineering, for providing a
+ Challenge for Excellence Research Supplement, and for providing an
+ Academic Development Funds grant.
+
+
-
+
+ The State of Texas, for providing funding through the Texas
+ Advanced Technology Program under Grant No. 003658-078.
+
+
-
+
+ Noel Bell, Senior Engineer, Texaco Chemical Company, Austin Texas.
+
+
-
+
+ James B. Rawlings, Professor, University of Wisconsin-Madison,
+ Department of Chemical Engineering.
+
+
-
+
+ Richard Stallman, for writing GNU.
+
+
+
+ This project would not have been possible without the GNU software used
+ in and used to produce Octave.
+
+
+
+
+
+
+
+
+
+
+
+ There are a number of ways that you can contribute to help make Octave a
+ better system. Perhaps the most important way to contribute is to write
+ high-quality code for solving new problems, and to make your code freely
+ available for others to use.
+
+
+
+ If you find Octave useful, consider providing additional funding to
+ continue its development. Even a modest amount of additional funding
+ could make a significant difference in the amount of time that is
+ available for development and support.
+
+
+
+ If you cannot provide funding or contribute code, you can still help
+ make Octave better and more reliable by reporting any bugs you find and
+ by offering suggestions for ways to improve Octave. See section Known Causes of Trouble, for
+ tips on how to write useful bug reports.
+
+
+
+
+
+
+
+
+
+
+ Octave is free software. This means that everyone is free to
+ use it and free to redistribute it on certain conditions. Octave is not
+ in the public domain. It is copyrighted and there are restrictions on
+ its distribution, but the restrictions are designed to ensure that
+ others will have the same freedom to use and redistribute Octave that
+ you have. The precise conditions can be found in the GNU General Public
+ License that comes with Octave and that also appears in section GNU GENERAL PUBLIC LICENSE.
+
+
+
+ Octave is available on CD-ROM with various collections of other free
+ software, and from the Free Software Foundation. Ordering a copy of
+ Octave from the Free Software Foundation helps to fund the development
+ of more free software. For more information, write to
+
+
+
+
+
+ Free Software Foundation
+ 59 Temple Place--Suite 330
+ Boston, MA 02111--1307
+ USA
+
+
+
+
+ Octave is also available on the Internet from
+ @url{ftp://ftp.che.wisc.edu/pub/octave}, and additional information is
+ available from @url{http://www.che.wisc.edu/octave}.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_10.html octave-2.0.14/doc/interpreter/octave_10.html
*** octave-2.0.13/doc/interpreter/octave_10.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_10.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,152 ----
+
+
+
+
+ GNU Octave - Evaluation
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ Normally, you evaluate expressions simply by typing them at the Octave
+ prompt, or by asking Octave to interpret commands that you have saved in
+ a file.
+
+
+
+ Sometimes, you may find it necessary to evaluate an expression that has
+ been computed and stored in a string, or use a string as the name of a
+ function to call. The eval
and feval
functions allow you
+ to do just that, and are necessary in order to evaluate commands that
+ are not known until run time, or to write functions that will need to
+ call user-supplied functions.
+
+
+
+
+ - Built-in Function: eval (command)
+
-
+ Parse the string command and evaluate it as if it were an Octave
+ program, returning the last value computed. The command is
+ evaluated in the current context, so any results remain available after
+
eval
returns. For example,
+
+
+
+
+ eval ("a = 13")
+ -| a = 13
+ => 13
+
+
+
+ In this case, the value of the evaluated expression is printed and it is
+ also returned returned from eval
. Just as with any other
+ expression, you can turn printing off by ending the expression in a
+ semicolon. For example,
+
+
+
+
+ eval ("a = 13;")
+ => 13
+
+
+
+ In this example, the variable a
has been given the value 13, but
+ the value of the expression is not printed. You can also turn off
+ automatic printing for all expressions executed by eval
using the
+ variable default_eval_print_flag
.
+
+
+
+
+
+ - Built-in Variable: default_eval_print_flag
+
-
+ If the value of this variable is nonzero, Octave prints the results of
+ commands executed by
eval
that do not end with semicolons. If it
+ is zero, automatic printing is suppressed. The default value is 1.
+
+
+
+
+
+ - Built-in Function: feval (name, ...)
+
-
+ Evaluate the function named name. Any arguments after the first
+ are passed on to the named function. For example,
+
+
+
+
+ feval ("acos", -1)
+ => 3.1416
+
+
+
+ calls the function acos
with the argument `-1'.
+
+
+
+ The function feval
is necessary in order to be able to write
+ functions that call user-supplied functions, because Octave does not
+ have a way to declare a pointer to a function (like C) or to declare a
+ special kind of variable that can be used to hold the name of a function
+ (like EXTERNAL
in Fortran). Instead, you must refer to functions
+ by name, and use feval
to call them.
+
+
+
+
+ Here is a simple-minded function using feval
that finds the root
+ of a user-supplied function of one variable using Newton's method.
+
+
+
+
+ function result = newtroot (fname, x)
+
+ # usage: newtroot (fname, x)
+ #
+ # fname : a string naming a function f(x).
+ # x : initial guess
+
+ delta = tol = sqrt (eps);
+ maxit = 200;
+ fx = feval (fname, x);
+ for i = 1:maxit
+ if (abs (fx) < tol)
+ result = x;
+ return;
+ else
+ fx_new = feval (fname, x + delta);
+ deriv = (fx_new - fx) / delta;
+ x = x - fx / deriv;
+ fx = fx_new;
+ endif
+ endfor
+
+ result = x;
+
+ endfunction
+
+
+
+ Note that this is only meant to be an example of calling user-supplied
+ functions and should not be taken too seriously. In addition to using a
+ more robust algorithm, any serious code would check the number and type
+ of all the arguments, ensure that the supplied function really was a
+ function, etc. See See section Predicates for Numeric Objects, for example,
+ for a list of predicates for numeric objects, and See section Status of Variables, for a description of the exist
function.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_11.html octave-2.0.14/doc/interpreter/octave_11.html
*** octave-2.0.13/doc/interpreter/octave_11.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_11.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,950 ----
+
+
+
+
+ GNU Octave - Statements
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+ Statements may be a simple constant expression or a complicated list of
+ nested loops and conditional statements.
+
+
+
+ Control statements such as if
, while
, and so on
+ control the flow of execution in Octave programs. All the control
+ statements start with special keywords such as if
and
+ while
, to distinguish them from simple expressions.
+ Many control statements contain other statements; for example, the
+ if
statement contains another statement which may or may not be
+ executed.
+
+
+
+
+ Each control statement has a corresponding end statement that
+ marks the end of the end of the control statement. For example, the
+ keyword endif
marks the end of an if
statement, and
+ endwhile
marks the end of a while
statement. You can use
+ the keyword end
anywhere a more specific end keyword is expected,
+ but using the more specific keywords is preferred because if you use
+ them, Octave is able to provide better diagnostics for mismatched or
+ missing end tokens.
+
+
+
+ The list of statements contained between keywords like if
or
+ while
and the corresponding end statement is called the
+ body of a control statement.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The if
statement is Octave's decision-making statement. There
+ are three basic forms of an if
statement. In its simplest form,
+ it looks like this:
+
+
+
+
+ if (condition)
+ then-body
+ endif
+
+
+
+ condition is an expression that controls what the rest of the
+ statement will do. The then-body is executed only if
+ condition is true.
+
+
+
+ The condition in an if
statement is considered true if its value
+ is non-zero, and false if its value is zero. If the value of the
+ conditional expression in an if
statement is a vector or a
+ matrix, it is considered true only if all of the elements are
+ non-zero.
+
+
+
+ The second form of an if statement looks like this:
+
+
+
+
+ if (condition)
+ then-body
+ else
+ else-body
+ endif
+
+
+
+ If condition is true, then-body is executed; otherwise,
+ else-body is executed.
+
+
+
+ Here is an example:
+
+
+
+
+ if (rem (x, 2) == 0)
+ printf ("x is even\n");
+ else
+ printf ("x is odd\n");
+ endif
+
+
+
+ In this example, if the expression rem (x, 2) == 0
is true (that
+ is, the value of x
is divisible by 2), then the first
+ printf
statement is evaluated, otherwise the second printf
+ statement is evaluated.
+
+
+
+ The third and most general form of the if
statement allows
+ multiple decisions to be combined in a single statement. It looks like
+ this:
+
+
+
+
+ if (condition)
+ then-body
+ elseif (condition)
+ elseif-body
+ else
+ else-body
+ endif
+
+
+
+ Any number of elseif
clauses may appear. Each condition is
+ tested in turn, and if one is found to be true, its corresponding
+ body is executed. If none of the conditions are true and the
+ else
clause is present, its body is executed. Only one
+ else
clause may appear, and it must be the last part of the
+ statement.
+
+
+
+ In the following example, if the first condition is true (that is, the
+ value of x
is divisible by 2), then the first printf
+ statement is executed. If it is false, then the second condition is
+ tested, and if it is true (that is, the value of x
is divisible
+ by 3), then the second printf
statement is executed. Otherwise,
+ the third printf
statement is performed.
+
+
+
+
+ if (rem (x, 2) == 0)
+ printf ("x is even\n");
+ elseif (rem (x, 3) == 0)
+ printf ("x is odd and divisible by 3\n");
+ else
+ printf ("x is odd\n");
+ endif
+
+
+
+ Note that the elseif
keyword must not be spelled else if
,
+ as is allowed in Fortran. If it is, the space between the else
+ and if
will tell Octave to treat this as a new if
+ statement within another if
statement's else
clause. For
+ example, if you write
+
+
+
+
+ if (c1)
+ body-1
+ else if (c2)
+ body-2
+ endif
+
+
+
+ Octave will expect additional input to complete the first if
+ statement. If you are using Octave interactively, it will continue to
+ prompt you for additional input. If Octave is reading this input from a
+ file, it may complain about missing or mismatched end
statements,
+ or, if you have not used the more specific end
statements
+ (endif
, endfor
, etc.), it may simply produce incorrect
+ results, without producing any warning messages.
+
+
+
+ It is much easier to see the error if we rewrite the statements above
+ like this,
+
+
+
+
+ if (c1)
+ body-1
+ else
+ if (c2)
+ body-2
+ endif
+
+
+
+ using the indentation to show how Octave groups the statements.
+ See section Functions and Script Files.
+
+
+
+
+ - Built-in Variable: warn_assign_as_truth_value
+
-
+ If the value of
warn_assign_as_truth_value
is nonzero, a
+ warning is issued for statements like
+
+
+
+
+ if (s = t)
+ ...
+
+
+
+ since such statements are not common, and it is likely that the intent
+ was to write
+
+
+
+
+ if (s == t)
+ ...
+
+
+
+ instead.
+
+
+
+ There are times when it is useful to write code that contains
+ assignments within the condition of a while
or if
+ statement. For example, statements like
+
+
+
+
+ while (c = getc())
+ ...
+
+
+
+ are common in C programming.
+
+
+
+ It is possible to avoid all warnings about such statements by setting
+ warn_assign_as_truth_value
to 0, but that may also
+ let real errors like
+
+
+
+
+ if (x = 1) # intended to test (x == 1)!
+ ...
+
+
+
+ slip by.
+
+
+
+ In such cases, it is possible suppress errors for specific statements by
+ writing them with an extra set of parentheses. For example, writing the
+ previous example as
+
+
+
+
+ while ((c = getc()))
+ ...
+
+
+
+ will prevent the warning from being printed for this statement, while
+ allowing Octave to warn about other assignments used in conditional
+ contexts.
+
+
+
+ The default value of warn_assign_as_truth_value
is 1.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The switch
statement was introduced in Octave 2.0.5. It should
+ be considered experimental, and details of the implementation may change
+ slightly in future versions of Octave. If you have comments or would
+ like to share your experiences in trying to use this new command in real
+ programs, please send them to
+ @email{octave-maintainers@bevo.che.wisc.edu}. (But if you think you've
+ found a bug, please report it to @email{bug-octave@bevo.che.wisc.edu}.
+
+
+
+ The general form of the switch
statement is
+
+
+
+
+ switch expression
+ case label
+ command_list
+ case label
+ command_list
+ ...
+
+ otherwise
+ command_list
+ endswitch
+
+
+
+
+
+
+
+ - Built-in Variable: warn_variable_switch_label
+
-
+ If the value of this variable is nonzero, Octave will print a warning if
+ a switch label is not a constant or constant expression
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ In programming, a loop means a part of a program that is (or at least can
+ be) executed two or more times in succession.
+
+
+
+ The while
statement is the simplest looping statement in Octave.
+ It repeatedly executes a statement as long as a condition is true. As
+ with the condition in an if
statement, the condition in a
+ while
statement is considered true if its value is non-zero, and
+ false if its value is zero. If the value of the conditional expression
+ in a while
statement is a vector or a matrix, it is considered
+ true only if all of the elements are non-zero.
+
+
+
+ Octave's while
statement looks like this:
+
+
+
+
+ while (condition)
+ body
+ endwhile
+
+
+
+ Here body is a statement or list of statements that we call the
+ body of the loop, and condition is an expression that
+ controls how long the loop keeps running.
+
+
+
+ The first thing the while
statement does is test condition.
+ If condition is true, it executes the statement body. After
+ body has been executed, condition is tested again, and if it
+ is still true, body is executed again. This process repeats until
+ condition is no longer true. If condition is initially
+ false, the body of the loop is never executed.
+
+
+
+ This example creates a variable fib
that contains the first ten
+ elements of the Fibonacci sequence.
+
+
+
+
+ fib = ones (1, 10);
+ i = 3;
+ while (i <= 10)
+ fib (i) = fib (i-1) + fib (i-2);
+ i++;
+ endwhile
+
+
+
+ Here the body of the loop contains two statements.
+
+
+
+ The loop works like this: first, the value of i
is set to 3.
+ Then, the while
tests whether i
is less than or equal to
+ 10. This is the case when i
equals 3, so the value of the
+ i
-th element of fib
is set to the sum of the previous two
+ values in the sequence. Then the i++
increments the value of
+ i
and the loop repeats. The loop terminates when i
+ reaches 11.
+
+
+
+ A newline is not required between the condition and the
+ body; but using one makes the program clearer unless the body is very
+ simple.
+
+
+
+ See section The if
Statement for a description of the variable
+ warn_assign_as_truth_value
.
+
+
+
+
+
+
+
+
+
+
+
+ The for
statement makes it more convenient to count iterations of a
+ loop. The general form of the for
statement looks like this:
+
+
+
+
+ for var = expression
+ body
+ endfor
+
+
+
+ where body stands for any statement or list of statements,
+ expression is any valid expression, and var may take several
+ forms. Usually it is a simple variable name or an indexed variable. If
+ the value of expression is a structure, var may also be a
+ list. See section Looping Over Structure Elements, below.
+
+
+
+ The assignment expression in the for
statement works a bit
+ differently than Octave's normal assignment statement. Instead of
+ assigning the complete result of the expression, it assigns each column
+ of the expression to var in turn. If expression is a range,
+ a row vector, or a scalar, the value of var will be a scalar each
+ time the loop body is executed. If var is a column vector or a
+ matrix, var will be a column vector each time the loop body is
+ executed.
+
+
+
+ The following example shows another way to create a vector containing
+ the first ten elements of the Fibonacci sequence, this time using the
+ for
statement:
+
+
+
+
+ fib = ones (1, 10);
+ for i = 3:10
+ fib (i) = fib (i-1) + fib (i-2);
+ endfor
+
+
+
+ This code works by first evaluating the expression 3:10
, to
+ produce a range of values from 3 to 10 inclusive. Then the variable
+ i
is assigned the first element of the range and the body of the
+ loop is executed once. When the end of the loop body is reached, the
+ next value in the range is assigned to the variable i
, and the
+ loop body is executed again. This process continues until there are no
+ more elements to assign.
+
+
+
+ Although it is possible to rewrite all for
loops as while
+ loops, the Octave language has both statements because often a
+ for
loop is both less work to type and more natural to think of.
+ Counting the number of iterations is very common in loops and it can be
+ easier to think of this counting as part of looping rather than as
+ something to do inside the loop.
+
+
+
+
+
+
+
+
+
+
+
+
+ A special form of the for
statement allows you to loop over all
+ the elements of a structure:
+
+
+
+
+ for [ val, key ] = expression
+ body
+ endfor
+
+
+
+ In this form of the for
statement, the value of expression
+ must be a structure. If it is, key and val are set to the
+ name of the element and the corresponding value in turn, until there are
+ no more elements. For example,
+
+
+
+
+ x.a = 1
+ x.b = [1, 2; 3, 4]
+ x.c = "string"
+ for [val, key] = x
+ key
+ val
+ endfor
+
+ -| key = a
+ -| val = 1
+ -| key = b
+ -| val =
+ -|
+ -| 1 2
+ -| 3 4
+ -|
+ -| key = c
+ -| val = string
+
+
+
+ The elements are not accessed in any particular order. If you need to
+ cycle through the list in a particular way, you will have to use the
+ function struct_elements
and sort the list yourself.
+
+
+
+ The key variable may also be omitted. If it is, the brackets are
+ also optional. This is useful for cycling through the values of all the
+ structure elements when the names of the elements do not need to be
+ known.
+
+
+
+
+
+
+
+
+
+
+ The break
statement jumps out of the innermost for
or
+ while
loop that encloses it. The break
statement may only
+ be used within the body of a loop. The following example finds the
+ smallest divisor of a given integer, and also identifies prime numbers:
+
+
+
+
+ num = 103;
+ div = 2;
+ while (div*div <= num)
+ if (rem (num, div) == 0)
+ break;
+ endif
+ div++;
+ endwhile
+ if (rem (num, div) == 0)
+ printf ("Smallest divisor of %d is %d\n", num, div)
+ else
+ printf ("%d is prime\n", num);
+ endif
+
+
+
+ When the remainder is zero in the first while
statement, Octave
+ immediately breaks out of the loop. This means that Octave
+ proceeds immediately to the statement following the loop and continues
+ processing. (This is very different from the exit
statement
+ which stops the entire Octave program.)
+
+
+
+ Here is another program equivalent to the previous one. It illustrates
+ how the condition of a while
statement could just as well
+ be replaced with a break
inside an if
:
+
+
+
+
+ num = 103;
+ div = 2;
+ while (1)
+ if (rem (num, div) == 0)
+ printf ("Smallest divisor of %d is %d\n", num, div);
+ break;
+ endif
+ div++;
+ if (div*div > num)
+ printf ("%d is prime\n", num);
+ break;
+ endif
+ endwhile
+
+
+
+
+
+
+
+
+
+
+ The continue
statement, like break
, is used only inside
+ for
or while
loops. It skips over the rest of the loop
+ body, causing the next cycle around the loop to begin immediately.
+ Contrast this with break
, which jumps out of the loop altogether.
+ Here is an example:
+
+
+
+
+ # print elements of a vector of random
+ # integers that are even.
+
+ # first, create a row vector of 10 random
+ # integers with values between 0 and 100:
+
+ vec = round (rand (1, 10) * 100);
+
+ # print what we're interested in:
+
+ for x = vec
+ if (rem (x, 2) != 0)
+ continue;
+ endif
+ printf ("%d\n", x);
+ endfor
+
+
+
+ If one of the elements of vec is an odd number, this example skips
+ the print statement for that element, and continues back to the first
+ statement in the loop.
+
+
+
+ This is not a practical example of the continue
statement, but it
+ should give you a clear understanding of how it works. Normally, one
+ would probably write the loop like this:
+
+
+
+
+ for x = vec
+ if (rem (x, 2) == 0)
+ printf ("%d\n", x);
+ endif
+ endfor
+
+
+
+
+
+
+
+
+
+
+
+
+ Octave supports a limited form of exception handling modelled after the
+ unwind-protect form of Lisp.
+
+
+
+ The general form of an unwind_protect
block looks like this:
+
+
+
+
+ unwind_protect
+ body
+ unwind_protect_cleanup
+ cleanup
+ end_unwind_protect
+
+
+
+ Where body and cleanup are both optional and may contain any
+ Octave expressions or commands. The statements in cleanup are
+ guaranteed to be executed regardless of how control exits body.
+
+
+
+ This is useful to protect temporary changes to global variables from
+ possible errors. For example, the following code will always restore
+ the original value of the built-in variable do_fortran_indexing
+ even if an error occurs while performing the indexing operation.
+
+
+
+
+ save_do_fortran_indexing = do_fortran_indexing;
+ unwind_protect
+ do_fortran_indexing = 1;
+ elt = a (idx)
+ unwind_protect_cleanup
+ do_fortran_indexing = save_do_fortran_indexing;
+ end_unwind_protect
+
+
+
+ Without unwind_protect
, the value of do_fortran_indexing
+ would not be restored if an error occurs while performing the indexing
+ operation because evaluation would stop at the point of the error and
+ the statement to restore the value would not be executed.
+
+
+
+
+
+
+
+
+
+
+
+
+ In addition to unwind_protect, Octave supports another limited form of
+ exception handling.
+
+
+
+ The general form of a try
block looks like this:
+
+
+
+
+ try
+ body
+ catch
+ cleanup
+ end_try_catch
+
+
+
+ Where body and cleanup are both optional and may contain any
+ Octave expressions or commands. The statements in cleanup are
+ only executed if an error occurs in body.
+
+
+
+ No warnings or error messages are printed while body is
+ executing. If an error does occur during the execution of body,
+ cleanup can access the text of the message that would have been
+ printed in the builtin constant __error_text__
. This is the same
+ as eval (try, catch)
(which may now also use
+ __error_text__
) but it is more efficient since the commands do
+ not need to be parsed each time the try and catch statements
+ are evaluated. See section Error Handling, for more information about the
+ __error_text__
variable.
+
+
+
+ Octave's try block is a very limited variation on the Lisp
+ condition-case form (limited because it cannot handle different classes
+ of errors separately). Perhaps at some point Octave can have some sort
+ of classification of errors and try-catch can be improved to be as
+ powerful as condition-case in Lisp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ In the Octave language, most statements end with a newline character and
+ you must tell Octave to ignore the newline character in order to
+ continue a statement from one line to the next. Lines that end with the
+ characters ...
or \
are joined with the following line
+ before they are divided into tokens by Octave's parser. For example,
+ the lines
+
+
+
+
+ x = long_variable_name ...
+ + longer_variable_name \
+ - 42
+
+
+
+ form a single statement. The backslash character on the second line
+ above is interpreted a continuation character, not as a division
+ operator.
+
+
+
+ For continuation lines that do not occur inside string constants,
+ whitespace and comments may appear between the continuation marker and
+ the newline character. For example, the statement
+
+
+
+
+ x = long_variable_name ... # comment one
+ + longer_variable_name \ # comment two
+ - 42 # last comment
+
+
+
+ is equivalent to the one shown above. Inside string constants, the
+ continuation marker must appear at the end of the line just before the
+ newline character.
+
+
+
+ Input that occurs inside parentheses can be continued to the next line
+ without having to use a continuation marker. For example, it is
+ possible to write statements like
+
+
+
+
+ if (fine_dining_destination == on_a_boat
+ || fine_dining_destination == on_a_train)
+ suess (i, will, not, eat, them, sam, i, am, i,
+ will, not, eat, green, eggs, and, ham);
+ endif
+
+
+
+ without having to add to the clutter with continuation markers.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_12.html octave-2.0.14/doc/interpreter/octave_12.html
*** octave-2.0.13/doc/interpreter/octave_12.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_12.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,1355 ----
+
+
+
+
+ GNU Octave - Functions and Script Files
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+
+ Complicated Octave programs can often be simplified by defining
+ functions. Functions can be defined directly on the command line during
+ interactive Octave sessions, or in external files, and can be called just
+ like built-in functions.
+
+
+
+
+
+
+
+
+
+
+
+
+ In its simplest form, the definition of a function named name
+ looks like this:
+
+
+
+
+ function name
+ body
+ endfunction
+
+
+
+ A valid function name is like a valid variable name: a sequence of
+ letters, digits and underscores, not starting with a digit. Functions
+ share the same pool of names as variables.
+
+
+
+ The function body consists of Octave statements. It is the
+ most important part of the definition, because it says what the function
+ should actually do.
+
+
+
+ For example, here is a function that, when executed, will ring the bell
+ on your terminal (assuming that it is possible to do so):
+
+
+
+
+ function wakeup
+ printf ("\a");
+ endfunction
+
+
+
+ The printf
statement (see section Input and Output) simply tells
+ Octave to print the string "\a"
. The special character `\a'
+ stands for the alert character (ASCII 7). See section Strings.
+
+
+
+ Once this function is defined, you can ask Octave to evaluate it by
+ typing the name of the function.
+
+
+
+ Normally, you will want to pass some information to the functions you
+ define. The syntax for passing parameters to a function in Octave is
+
+
+
+
+ function name (arg-list)
+ body
+ endfunction
+
+
+
+ where arg-list is a comma-separated list of the function's
+ arguments. When the function is called, the argument names are used to
+ hold the argument values given in the call. The list of arguments may
+ be empty, in which case this form is equivalent to the one shown above.
+
+
+
+ To print a message along with ringing the bell, you might modify the
+ beep
to look like this:
+
+
+
+
+ function wakeup (message)
+ printf ("\a%s\n", message);
+ endfunction
+
+
+
+ Calling this function using a statement like this
+
+
+
+
+ wakeup ("Rise and shine!");
+
+
+
+ will cause Octave to ring your terminal's bell and print the message
+ `Rise and shine!', followed by a newline character (the `\n'
+ in the first argument to the printf
statement).
+
+
+
+ In most cases, you will also want to get some information back from the
+ functions you define. Here is the syntax for writing a function that
+ returns a single value:
+
+
+
+
+ function ret-var = name (arg-list)
+ body
+ endfunction
+
+
+
+ The symbol ret-var is the name of the variable that will hold the
+ value to be returned by the function. This variable must be defined
+ before the end of the function body in order for the function to return
+ a value.
+
+
+
+ Variables used in the body of a function are local to the
+ function. Variables named in arg-list and ret-var are also
+ local to the function. See section Global Variables, for information about
+ how to access global variables inside a function.
+
+
+
+ For example, here is a function that computes the average of the
+ elements of a vector:
+
+
+
+
+ function retval = avg (v)
+ retval = sum (v) / length (v);
+ endfunction
+
+
+
+ If we had written avg
like this instead,
+
+
+
+
+ function retval = avg (v)
+ if (is_vector (v))
+ retval = sum (v) / length (v);
+ endif
+ endfunction
+
+
+
+ and then called the function with a matrix instead of a vector as the
+ argument, Octave would have printed an error message like this:
+
+
+
+
+ error: `retval' undefined near line 1 column 10
+ error: evaluating index expression near line 7, column 1
+
+
+
+ because the body of the if
statement was never executed, and
+ retval
was never defined. To prevent obscure errors like this,
+ it is a good idea to always make sure that the return variables will
+ always have values, and to produce meaningful error messages when
+ problems are encountered. For example, avg
could have been
+ written like this:
+
+
+
+
+ function retval = avg (v)
+ retval = 0;
+ if (is_vector (v))
+ retval = sum (v) / length (v);
+ else
+ error ("avg: expecting vector argument");
+ endif
+ endfunction
+
+
+
+ There is still one additional problem with this function. What if it is
+ called without an argument? Without additional error checking, Octave
+ will probably print an error message that won't really help you track
+ down the source of the error. To allow you to catch errors like this,
+ Octave provides each function with an automatic variable called
+ nargin
. Each time a function is called, nargin
is
+ automatically initialized to the number of arguments that have actually
+ been passed to the function. For example, we might rewrite the
+ avg
function like this:
+
+
+
+
+ function retval = avg (v)
+ retval = 0;
+ if (nargin != 1)
+ usage ("avg (vector)");
+ endif
+ if (is_vector (v))
+ retval = sum (v) / length (v);
+ else
+ error ("avg: expecting vector argument");
+ endif
+ endfunction
+
+
+
+ Although Octave does not automatically report an error if you call a
+ function with more arguments than expected, doing so probably indicates
+ that something is wrong. Octave also does not automatically report an
+ error if a function is called with too few arguments, but any attempt to
+ use a variable that has not been given a value will result in an error.
+ To avoid such problems and to provide useful messages, we check for both
+ possibilities and issue our own error message.
+
+
+
+
+ - Automatic Variable: nargin
+
-
+ When a function is called, this local variable is automatically
+ initialized to the number of arguments passed to the function. At the
+ top level,
nargin
holds the number of command line arguments that
+ were passed to Octave.
+
+
+
+
+
+ - Built-in Variable: silent_functions
+
-
+ If the value of
silent_functions
is nonzero, internal output
+ from a function is suppressed. Otherwise, the results of expressions
+ within a function body that are not terminated with a semicolon will
+ have their values printed. The default value is 0.
+
+
+
+ For example, if the function
+
+
+
+
+ function f ()
+ 2 + 2
+ endfunction
+
+
+
+ is executed, Octave will either print `ans = 4' or nothing
+ depending on the value of silent_functions
.
+
+
+
+
+
+ - Built-in Variable: warn_missing_semicolon
+
-
+ If the value of this variable is nonzero, Octave will warn when
+ statements in function definitions don't end in semicolons. The default
+ value is 0.
+
+
+
+
+
+
+
+
+ Unlike many other computer languages, Octave allows you to define
+ functions that return more than one value. The syntax for defining
+ functions that return multiple values is
+
+
+
+
+ function [ret-list] = name (arg-list)
+ body
+ endfunction
+
+
+
+ where name, arg-list, and body have the same meaning
+ as before, and ret-list is a comma-separated list of variable
+ names that will hold the values returned from the function. The list of
+ return values must have at least one element. If ret-list has
+ only one element, this form of the function
statement is
+ equivalent to the form described in the previous section.
+
+
+
+ Here is an example of a function that returns two values, the maximum
+ element of a vector and the index of its first occurrence in the vector.
+
+
+
+
+ function [max, idx] = vmax (v)
+ idx = 1;
+ max = v (idx);
+ for i = 2:length (v)
+ if (v (i) > max)
+ max = v (i);
+ idx = i;
+ endif
+ endfor
+ endfunction
+
+
+
+ In this particular case, the two values could have been returned as
+ elements of a single array, but that is not always possible or
+ convenient. The values to be returned may not have compatible
+ dimensions, and it is often desirable to give the individual return
+ values distinct names.
+
+
+
+ In addition to setting nargin
each time a function is called,
+ Octave also automatically initializes nargout
to the number of
+ values that are expected to be returned. This allows you to write
+ functions that behave differently depending on the number of values that
+ the user of the function has requested. The implicit assignment to the
+ built-in variable ans
does not figure in the count of output
+ arguments, so the value of nargout
may be zero.
+
+
+
+ The svd
and lu
functions are examples of built-in
+ functions that behave differently depending on the value of
+ nargout
.
+
+
+
+ It is possible to write functions that only set some return values. For
+ example, calling the function
+
+
+
+
+ function [x, y, z] = f ()
+ x = 1;
+ z = 2;
+ endfunction
+
+
+
+ as
+
+
+
+
+ [a, b, c] = f ()
+
+
+
+ produces:
+
+
+
+
+ a = 1
+
+ b = [](0x0)
+
+ c = 2
+
+
+
+ provided that the built-in variable define_all_return_values
is
+ nonzero and the value of default_return_value
is `[]'.
+ See section Summary of Built-in Variables.
+
+
+
+
+ - Automatic Variable: nargout
+
-
+ When a function is called, this local variable is automatically
+ initialized to the number of arguments expected to be returned. For
+ example,
+
+
+
+
+ f ()
+
+
+
+ will result in nargout
being set to 0 inside the function
+ f
and
+
+
+
+
+ [s, t] = f ()
+
+
+
+ will result in nargout
being set to 2 inside the function
+ f
.
+
+
+
+ At the top level, nargout
is undefined.
+
+
+
+
+
+ - Built-in Variable: default_return_value
+
-
+ The value given to otherwise uninitialized return values if
+
define_all_return_values
is nonzero. The default value is
+ []
.
+
+
+
+
+
+ - Built-in Variable: define_all_return_values
+
-
+ If the value of
define_all_return_values
is nonzero, Octave
+ will substitute the value specified by default_return_value
for
+ any return values that remain undefined when a function returns. The
+ default value is 0.
+
+
+
+
+
+ - Function File: nargchk (nargin_min, nargin_max, n)
+
-
+ If n is in the range nargin_min through nargin_max
+ inclusive, return the empty matrix. Otherwise, return a message
+ indicating whether n is too large or too small.
+
+
+
+ This is useful for checking to see that the number of arguments supplied
+ to a function is within an acceptable range.
+
+
+
+
+
+
+
+
+
+
+
+
+ Octave has a real mechanism for handling functions that take an
+ unspecified number of arguments, so it is not necessary to place an
+ upper bound on the number of optional arguments that a function can
+ accept.
+
+
+
+
+ Here is an example of a function that uses the new syntax to print a
+ header followed by an unspecified number of values:
+
+
+
+
+ function foo (heading, ...)
+ disp (heading);
+ va_start ();
+ ## Pre-decrement to skip `heading' arg.
+ while (--nargin)
+ disp (va_arg ());
+ endwhile
+ endfunction
+
+
+
+ The ellipsis that marks the variable argument list may only appear once
+ and must be the last element in the list of arguments.
+
+
+
+
+ - Built-in Function: va_start ()
+
-
+ Position an internal pointer to the first unnamed argument and allows
+ you to cycle through the arguments more than once. It is not necessary
+ to call
va_start
if you do not plan to cycle through the
+ arguments more than once. This function may only be called inside
+ functions that have been declared to accept a variable number of input
+ arguments.
+
+
+
+
+
+ - Built-in Function: va_arg ()
+
-
+ Return the value of the next available argument and move the internal
+ pointer to the next argument. It is an error to call
va_arg()
+ when there are no more arguments available.
+
+
+
+
+ Sometimes it is useful to be able to pass all unnamed arguments to
+ another function. The keyword all_va_args makes this very easy to
+ do. For example,
+
+
+
+
+ function f (...)
+ while (nargin--)
+ disp (va_arg ())
+ endwhile
+ endfunction
+
+ function g (...)
+ f ("begin", all_va_args, "end")
+ endfunction
+
+ g (1, 2, 3)
+
+ -| begin
+ -| 1
+ -| 2
+ -| 3
+ -| end
+
+
+
+
+ - Keyword: all_va_args
+
-
+ This keyword stands for the entire list of optional argument, so it is
+ possible to use it more than once within the same function without
+ having to call
va_start
. It can only be used within functions
+ that take a variable number of arguments. It is an error to use it in
+ other contexts.
+
+
+
+
+
+
+
+
+
+
+
+
+ Octave also has a real mechanism for handling functions that return an
+ unspecified number of values, so it is no longer necessary to place an
+ upper bound on the number of outputs that a function can produce.
+
+
+
+ Here is an example of a function that uses a variable-length return list
+ to produce n values:
+
+
+
+
+ function [...] = f (n, x)
+ for i = 1:n
+ vr_val (i * x);
+ endfor
+ endfunction
+
+ [dos, quatro] = f (2, 2)
+ => dos = 2
+ => quatro = 4
+
+
+
+ As with variable argument lists, the ellipsis that marks the variable
+ return list may only appear once and must be the last element in the
+ list of returned values.
+
+
+
+
+ - Built-in Function: vr_val (val)
+
-
+ Each time this function is called, it places the value of its argument
+ at the end of the list of values to return from the current function.
+ Once
vr_val
has been called, there is no way to go back to the
+ beginning of the list and rewrite any of the return values. This
+ function may only be called within functions that have been declared to
+ return an unspecified number of output arguments (by using the special
+ ellipsis notation described above).
+
+
+
+
+
+
+
+
+ The body of a user-defined function can contain a return
statement.
+ This statement returns control to the rest of the Octave program. It
+ looks like this:
+
+
+
+
+ return
+
+
+
+ Unlike the return
statement in C, Octave's return
+ statement cannot be used to return a value from a function. Instead,
+ you must assign values to the list of return variables that are part of
+ the function
statement. The return
statement simply makes
+ it easier to exit a function from a deeply nested loop or conditional
+ statement.
+
+
+
+ Here is an example of a function that checks to see if any elements of a
+ vector are nonzero.
+
+
+
+
+ function retval = any_nonzero (v)
+ retval = 0;
+ for i = 1:length (v)
+ if (v (i) != 0)
+ retval = 1;
+ return;
+ endif
+ endfor
+ printf ("no nonzero elements found\n");
+ endfunction
+
+
+
+ Note that this function could not have been written using the
+ break
statement to exit the loop once a nonzero value is found
+ without adding extra logic to avoid printing the message if the vector
+ does contain a nonzero element.
+
+
+
+
+ - Keyword: return
+
-
+ When Octave encounters the keyword
return
inside a function or
+ script, it returns control to be caller immediately. At the top level,
+ the return statement is ignored. A return
statement is assumed
+ at the end of every function definition.
+
+
+
+
+
+ - Built-in Variable: return_last_computed_value
+
-
+ If the value of
return_last_computed_value
is true, and a
+ function is defined without explicitly specifying a return value, the
+ function will return the value of the last expression. Otherwise, no
+ value will be returned. The default value is 0.
+
+
+
+ For example, the function
+
+
+
+
+ function f ()
+ 2 + 2;
+ endfunction
+
+
+
+ will either return nothing, if the value of
+ return_last_computed_value
is 0, or 4, if the value of
+ return_last_computed_value
is nonzero.
+
+
+
+
+
+
+
+
+
+
+
+ Except for simple one-shot programs, it is not practical to have to
+ define all the functions you need each time you need them. Instead, you
+ will normally want to save them in a file so that you can easily edit
+ them, and save them for use at a later time.
+
+
+
+ Octave does not require you to load function definitions from files
+ before using them. You simply need to put the function definitions in a
+ place where Octave can find them.
+
+
+
+ When Octave encounters an identifier that is undefined, it first looks
+ for variables or functions that are already compiled and currently
+ listed in its symbol table. If it fails to find a definition there, it
+ searches the list of directories specified by the built-in variable
+ LOADPATH
for files ending in `.m' that have the same base
+ name as the undefined identifier.(4) Once Octave finds a file
+ with a name that matches, the contents of the file are read. If it
+ defines a single function, it is compiled and executed.
+ See section Script Files, for more information about how you can define more
+ than one function in a single file.
+
+
+
+ When Octave defines a function from a function file, it saves the full
+ name of the file it read and the time stamp on the file. After
+ that, it checks the time stamp on the file every time it needs the
+ function. If the time stamp indicates that the file has changed since
+ the last time it was read, Octave reads it again.
+
+
+
+ Checking the time stamp allows you to edit the definition of a function
+ while Octave is running, and automatically use the new function
+ definition without having to restart your Octave session. Checking the
+ time stamp every time a function is used is rather inefficient, but it
+ has to be done to ensure that the correct function definition is used.
+
+
+
+ To avoid degrading performance unnecessarily by checking the time stamps
+ on functions that are not likely to change, Octave assumes that function
+ files in the directory tree
+ `octave-home/share/octave/version/m'
+ will not change, so it doesn't have to check their time stamps every time the
+ functions defined in those files are used. This is normally a very good
+ assumption and provides a significant improvement in performance for the
+ function files that are distributed with Octave.
+
+
+
+ If you know that your own function files will not change while you are
+ running Octave, you can improve performance by setting the variable
+ ignore_function_time_stamp
to "all"
, so that Octave will
+ ignore the time stamps for all function files. Setting it to
+ "system"
gives the default behavior. If you set it to anything
+ else, Octave will check the time stamps on all function files.
+
+
+
+
+
+ - Built-in Variable: LOADPATH
+
-
+ A colon separated list of directories in which to search for function
+ files. See section Functions and Script Files. The value of
LOADPATH
+ overrides the environment variable OCTAVE_PATH
. See section Installing Octave.
+
+
+
+ LOADPATH
is now handled in the same way as TeX handles
+ TEXINPUTS
. If the path starts with `:', the standard path
+ is prepended to the value of LOADPATH
. If it ends with `:'
+ the standard path is appended to the value of LOADPATH
.
+
+
+
+ In addition, if any path element ends in `//', that directory and
+ all subdirectories it contains are searched recursively for function
+ files. This can result in a slight delay as Octave caches the lists of
+ files found in the LOADPATH
the first time Octave searches for a
+ function. After that, searching is usually much faster because Octave
+ normally only needs to search its internal cache for files.
+
+
+
+ To improve performance of recursive directory searching, it is best for
+ each directory that is to be searched recursively to contain
+ either additional subdirectories or function files, but
+ not a mixture of both.
+
+
+
+ See section Organization of Functions Distributed with Octave for a description of the function file
+ directories that are distributed with Octave.
+
+
+
+
+
+ - Built-in Variable: ignore_function_time_stamp
+
-
+ This variable can be used to prevent Octave from making the system call
+
stat
each time it looks up functions defined in function files.
+ If ignore_function_time_stamp
to "system"
, Octave will not
+ automatically recompile function files in subdirectories of
+ `octave-home/lib/version' if they have changed since
+ they were last compiled, but will recompile other function files in the
+ LOADPATH
if they change. If set to "all"
, Octave will not
+ recompile any function files unless their definitions are removed with
+ clear
. For any other value of ignore_function_time_stamp
,
+ Octave will always check to see if functions defined in function files
+ need to recompiled. The default value of ignore_function_time_stamp
is
+ "system"
.
+
+
+
+
+
+ - Built-in Variable: warn_function_name_clash
+
-
+ If the value of
warn_function_name_clash
is nonzero, a warning is
+ issued when Octave finds that the name of a function defined in a
+ function file differs from the name of the file. (If the names
+ disagree, the name declared inside the file is ignored.) If the value
+ is 0, the warning is omitted. The default value is 1.
+
+
+
+
+
+
+
+
+ A script file is a file containing (almost) any sequence of Octave
+ commands. It is read and evaluated just as if you had typed each
+ command at the Octave prompt, and provides a convenient way to perform a
+ sequence of commands that do not logically belong inside a function.
+
+
+
+ Unlike a function file, a script file must not begin with the
+ keyword function
. If it does, Octave will assume that it is a
+ function file, and that it defines a single function that should be
+ evaluated as soon as it is defined.
+
+
+
+ A script file also differs from a function file in that the variables
+ named in a script file are not local variables, but are in the same
+ scope as the other variables that are visible on the command line.
+
+
+
+ Even though a script file may not begin with the function
+ keyword, it is possible to define more than one function in a single
+ script file and load (but not execute) all of them at once. To do
+ this, the first token in the file (ignoring comments and other white
+ space) must be something other than function
. If you have no
+ other statements to evaluate, you can use a statement that has no
+ effect, like this:
+
+
+
+
+ # Prevent Octave from thinking that this
+ # is a function file:
+
+ 1;
+
+ # Define function one:
+
+ function one ()
+ ...
+
+
+
+ To have Octave read and compile these functions into an internal form,
+ you need to make sure that the file is in Octave's LOADPATH
, then
+ simply type the base name of the file that contains the commands.
+ (Octave uses the same rules to search for script files as it does to
+ search for function files.)
+
+
+
+ If the first token in a file (ignoring comments) is function
,
+ Octave will compile the function and try to execute it, printing a
+ message warning about any non-whitespace characters that appear after
+ the function definition.
+
+
+
+ Note that Octave does not try to look up the definition of any identifier
+ until it needs to evaluate it. This means that Octave will compile the
+ following statements if they appear in a script file, or are typed at
+ the command line,
+
+
+
+
+ # not a function file:
+ 1;
+ function foo ()
+ do_something ();
+ endfunction
+ function do_something ()
+ do_something_else ();
+ endfunction
+
+
+
+ even though the function do_something
is not defined before it is
+ referenced in the function foo
. This is not an error because
+ Octave does not need to resolve all symbols that are referenced by a
+ function until the function is actually evaluated.
+
+
+
+ Since Octave doesn't look for definitions until they are needed, the
+ following code will always print `bar = 3' whether it is typed
+ directly on the command line, read from a script file, or is part of a
+ function body, even if there is a function or script file called
+ `bar.m' in Octave's LOADPATH
.
+
+
+
+
+ eval ("bar = 3");
+ bar
+
+
+
+ Code like this appearing within a function body could fool Octave if
+ definitions were resolved as the function was being compiled. It would
+ be virtually impossible to make Octave clever enough to evaluate this
+ code in a consistent fashion. The parser would have to be able to
+ perform the call to eval
at compile time, and that would be
+ impossible unless all the references in the string to be evaluated could
+ also be resolved, and requiring that would be too restrictive (the
+ string might come from user input, or depend on things that are not
+ known until the function is evaluated).
+
+
+
+ Although Octave normally executes commands from script files that have
+ the name `file.m', you can use the function source
to
+ execute commands from any file.
+
+
+
+
+ - Built-in Function: source (file)
+
-
+ Parse and execute the contents of file. This is equivalent to
+ executing commands from a script file, but without requiring the file to
+ be named `file.m'.
+
+
+
+
+
+
+
+
+
+
+
+ On some systems, Octave can dynamically load and execute functions
+ written in C++. Octave can only directly call functions written in C++,
+ but you can also load functions written in other languages
+ by calling them from a simple wrapper function written in C++.
+
+
+
+ Here is an example of how to write a C++ function that Octave can load,
+ with commentary. The source for this function is included in the source
+ distributions of Octave, in the file `examples/oregonator.cc'. It
+ defines the same set of differential equations that are used in the
+ example problem of section Ordinary Differential Equations. By running
+ that example and this one, we can compare the execution times to see
+ what sort of increase in speed you can expect by using dynamically
+ linked functions.
+
+
+
+ The function defined in `oregonator.cc' contains just 8 statements,
+ and is not much different than the code defined in the corresponding
+ M-file (also distributed with Octave in the file
+ `examples/oregonator.m').
+
+
+
+ Here is the complete text of `oregonator.cc':
+
+
+
+ just
+
+
+
+
+ #include <octave/oct.h>
+
+ DEFUN_DLD (oregonator, args, ,
+ "The `oregonator'.")
+ {
+ ColumnVector dx (3);
+
+ ColumnVector x = args(0).vector_value ();
+
+ dx(0) = 77.27 * (x(1) - x(0)*x(1) + x(0)
+ - 8.375e-06*pow (x(0), 2));
+
+ dx(1) = (x(2) - x(0)*x(1) - x(1)) / 77.27;
+
+ dx(2) = 0.161*(x(0) - x(2));
+
+ return octave_value (dx);
+ }
+
+
+
+ The first line of the file,
+
+
+
+
+ #include <octave/oct.h>
+
+
+
+ includes declarations for all of Octave's internal functions that you
+ will need. If you need other functions from the standard C++ or C
+ libraries, you can include the necessary headers here.
+
+
+
+ The next two lines
+
+
+ DEFUN_DLD (oregonator, args, ,
+ "The `oregonator'.")
+
+
+
+ declares the function. The macro DEFUN_DLD
and the macros that
+ it depends on are defined in the files `defun-dld.h',
+ `defun.h', and `defun-int.h' (these files are included in the
+ header file `octave/oct.h').
+
+
+
+ Note that the third parameter to DEFUN_DLD
(nargout
) is
+ not used, so it is omitted from the list of arguments to in order to
+ avoid the warning from gcc about an unused function parameter.
+
+
+
+ simply declares an object to store the right hand sides of the
+ differential equation, and
+
+
+
+ The statement
+
+
+
+
+ ColumnVector x = args(0).vector_value ();
+
+
+
+ extracts a column vector from the input arguments. The variable
+ args
is passed to functions defined with DEFUN_DLD
as an
+ octave_value_list
object, which includes methods for getting the
+ length of the list and extracting individual elements.
+
+
+
+ In this example, we don't check for errors, but that is not difficult.
+ All of the Octave's built-in functions do some form of checking on their
+ arguments, so you can check the source code for those functions for
+ examples of various strategies for verifying that the correct number and
+ types of arguments have been supplied.
+
+
+
+ The next statements
+
+
+
+
+ ColumnVector dx (3);
+
+ dx(0) = 77.27 * (x(1) - x(0)*x(1) + x(0)
+ - 8.375e-06*pow (x(0), 2));
+
+ dx(1) = (x(2) - x(0)*x(1) - x(1)) / 77.27;
+
+ dx(2) = 0.161*(x(0) - x(2));
+
+
+
+ define the right hand side of the differential equation. Finally, we
+ can return dx
:
+
+
+
+
+ return octave_value (dx);
+
+
+
+ The actual return type is octave_value_list
, but it is only
+ necessary to convert the return type to an octave_value
because
+ there is a default constructor that can automatically create an object
+ of that type from an octave_value
object, so we can just use that
+ instead.
+
+
+
+ To use this file, your version of Octave must support dynamic linking.
+ To find out if it does, type the command
+ octave_config_info ("dld") at the Octave prompt. Support for
+ dynamic linking is included if this command returns 1.
+
+
+
+ To compile the example file, type the command `mkoctfile
+ oregonator.cc' at the shell prompt. The script mkoctfile
should
+ have been installed along with Octave. Running it will create a file
+ called `oregonator.oct' that can be loaded by Octave. To test the
+ `oregonator.oct' file, start Octave and type the command
+
+
+
+
+ oregonator ([1, 2, 3], 0)
+
+
+
+ at the Octave prompt. Octave should respond by printing
+
+
+
+
+ ans =
+
+ 77.269353
+ -0.012942
+ -0.322000
+
+
+
+ You can now use the `oregonator.oct' file just as you would the
+ oregonator.m
file to solve the set of differential equations.
+
+
+
+ On a 133 MHz Pentium running Linux, Octave can solve the problem shown
+ in section Ordinary Differential Equations in about 1.4 second using the
+ dynamically linked function, compared to about 19 seconds using the
+ M-file. Similar decreases in execution time can be expected for other
+ functions, particularly those that rely on functions like lsode
+ that require user-supplied functions.
+
+
+
+ Just as for M-files, Octave will automatically reload dynamically linked
+ functions when the files that define them are more recent than the last
+ time that the function was loaded. Two variables are available to
+ control how Octave behaves when dynamically linked functions are cleared
+ or reloaded.
+
+
+
+
+ - Built-in Variable: auto_unload_dot_oct_files
+
-
+ If the value of
auto_unload_dot_oct_files
is nonzero, Octave will
+ automatically unload any `.oct' files when there are no longer any
+ functions in the symbol table that reference them.
+
+
+
+
+
+ - Built-in Variable: warn_reload_forces_clear
+
-
+ If several functions have been loaded from the same file, Octave must
+ clear all the functions before any one of them can be reloaded. If
+
warn_reload_forces_clear
, Octave will warn you when this happens,
+ and print a list of the additional functions that it is forced to clear.
+
+
+
+
+ Additional examples for writing dynamically linked functions are
+ available in the files in the `src' directory of the Octave
+ distribution. Currently, this includes the files
+
+
+
+
+ balance.cc fft2.cc inv.cc qzval.cc
+ chol.cc filter.cc log.cc schur.cc
+ colloc.cc find.cc lsode.cc sort.cc
+ dassl.cc fsolve.cc lu.cc svd.cc
+ det.cc givens.cc minmax.cc syl.cc
+ eig.cc hess.cc pinv.cc
+ expm.cc ifft.cc qr.cc
+ fft.cc ifft2.cc quad.cc
+
+
+
+ These files use the macro DEFUN_DLD_BUILTIN
instead of
+ DEFUN_DLD
. The difference between these two macros is just that
+ DEFUN_DLD_BUILTIN
can define a built-in function that is not
+ dynamically loaded if the operating system does not support dynamic
+ linking. To define your own dynamically linked functions you should use
+ DEFUN_DLD
.
+
+
+
+ There is currently no detailed description of all the functions that you
+ can call in a built-in function. For the time being, you will have to
+ read the source code for Octave.
+
+
+
+
+
+
+
+ Many of Octave's standard functions are distributed as function files.
+ They are loosely organized by topic, in subdirectories of
+ `octave-home/lib/octave/version/m', to make it easier
+ to find them.
+
+
+
+ The following is a list of all the function file subdirectories, and the
+ types of functions you will find there.
+
+
+
+
+ - `audio'
+
-
+ Functions for playing and recording sounds.
+
+
- `control'
+
-
+ Functions for design and simulation of automatic control systems.
+
+
- `elfun'
+
-
+ Elementary functions.
+
+
- `general'
+
-
+ Miscellaneous matrix manipulations, like
flipud
, rot90
,
+ and triu
, as well as other basic functions, like
+ is_matrix
, nargchk
, etc.
+
+ - `image'
+
-
+ Image processing tools. These functions require the X Window System.
+
+
- `io'
+
-
+ Input-ouput functions.
+
+
- `linear-algebra'
+
-
+ Functions for linear algebra.
+
+
- `miscellaneous'
+
-
+ Functions that don't really belong anywhere else.
+
+
- `plot'
+
-
+ A set of functions that implement the MATLAB-like plotting functions.
+
+
- `polynomial'
+
-
+ Functions for manipulating polynomials.
+
+
- `set'
+
-
+ Functions for creating and manipulating sets of unique values.
+
+
- `signal'
+
-
+ Functions for signal processing applications.
+
+
- `specfun'
+
-
+ Special functions.
+
+
- `special-matrix'
+
-
+ Functions that create special matrix forms.
+
+
- `startup'
+
-
+ Octave's system-wide startup file.
+
+
- `statistics'
+
-
+ Statistical functions.
+
+
- `strings'
+
-
+ Miscellaneous string-handling functions.
+
+
- `time'
+
-
+ Functions related to time keeping.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_13.html octave-2.0.14/doc/interpreter/octave_13.html
*** octave-2.0.13/doc/interpreter/octave_13.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_13.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,196 ----
+
+
+
+
+ GNU Octave - Error Handling
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ Octave includes several functions for printing error and warning
+ messages. When you write functions that need to take special action
+ when they encounter abnormal conditions, you should print the error
+ messages using the functions described in this chapter.
+
+
+
+
+ - Built-in Function: error (template, ...)
+
-
+ The
error
function formats the optional arguments under the
+ control of the template string template using the same rules as
+ the printf
family of functions (see section Formatted Output).
+ The resulting message is prefixed by the string `error: ' and
+ printed on the stderr
stream.
+
+
+
+ Calling error
also sets Octave's internal error state such that
+ control will return to the top level without evaluating any more
+ commands. This is useful for aborting from functions or scripts.
+
+
+
+ If the error message does not end with a new line character, Octave will
+ print a traceback of all the function calls leading to the error. For
+ example, given the following function definitions:
+
+
+
+
+ function f () g () end
+ function g () h () end
+ function h () nargin == 1 || error ("nargin != 1"); end
+
+
+
+ calling the function f
will result in a list of messages that
+ can help you to quickly locate the exact location of the error:
+
+
+
+
+ f ()
+ error: nargin != 1
+ error: evaluating index expression near line 1, column 30
+ error: evaluating binary operator `||' near line 1, column 27
+ error: called from `h'
+ error: called from `g'
+ error: called from `f'
+
+
+
+ If the error message ends in a new line character, Octave will print the
+ message but will not display any traceback messages as it returns
+ control to the top level. For example, modifying the error message
+ in the previous example to end in a new line causes Octave to only print
+ a single message:
+
+
+
+
+ function h () nargin == 1 || error ("nargin != 1\n"); end
+ f ()
+ error: nargin != 1
+
+
+
+
+
+
+ - Built-in Variable: error_text
+
-
+ This variable contains the text of error messages that would have
+ been printed in the body of the most recent
unwind_protect
or
+ try
statement or the try part of the most recent call to
+ the eval
function. Outside of the unwind_protect
and
+ try
statements or the eval
function, or if no error has
+ occurred within them, the value of error_text
is guaranteed to be
+ the empty string.
+
+
+
+ Note that the message does not include the first `error: ' prefix,
+ so that it may easily be passed to the error
function without
+ additional processing(5).
+
+
+
+ See section The try
Statement and section The unwind_protect
Statement.
+
+
+
+
+
+ - Built-in Variable: beep_on_error
+
-
+ If the value of
beep_on_error
is nonzero, Octave will try
+ to ring your terminal's bell before printing an error message. The
+ default value is 0.
+
+
+
+
+
+ - Built-in Function: warning (msg)
+
-
+ Print a warning message msg prefixed by the string `warning: '.
+ After printing the warning message, Octave will continue to execute
+ commands. You should use this function should when you want to notify
+ the user of an unusual condition, but only when it makes sense for your
+ program to go on.
+
+
+
+
+
+ - Built-in Function: usage (msg)
+
-
+ Print the message msg, prefixed by the string `usage: ', and
+ set Octave's internal error state such that control will return to the
+ top level without evaluating any more commands. This is useful for
+ aborting from functions.
+
+
+
+ After usage
is evaluated, Octave will print a traceback of all
+ the function calls leading to the usage message.
+
+
+
+ You should use this function for reporting problems errors that result
+ from an improper call to a function, such as calling a function with an
+ incorrect number of arguments, or with arguments of the wrong type. For
+ example, most functions distributed with Octave begin with code like
+ this
+
+
+
+
+ if (nargin != 2)
+ usage ("foo (a, b)");
+ endif
+
+
+
+ to check for the proper number of arguments.
+
+
+
+
+ The following pair of functions are of limited usefulness, and may be
+ removed from future versions of Octave.
+
+
+
+
+ - Function File: perror (name, num)
+
-
+ Print the error message for function name corresponding to the
+ error number num. This function is intended to be used to print
+ useful error messages for those functions that return numeric error
+ codes.
+
+
+
+
+
+ - Function File: strerror (name, num)
+
-
+ Return the text of an error message for function name
+ corresponding to the error number num. This function is intended
+ to be used to print useful error messages for those functions that
+ return numeric error codes.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_14.html octave-2.0.14/doc/interpreter/octave_14.html
*** octave-2.0.13/doc/interpreter/octave_14.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_14.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,2065 ----
+
+
+
+
+ GNU Octave - Input and Output
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ There are two distinct classes of input and output functions. The first
+ set are modeled after the functions available in MATLAB. The
+ second set are modeled after the standard I/O library used by the C
+ programming language and offer more flexibility and control over the
+ output.
+
+
+
+ When running interactively, Octave normally sends any output intended
+ for your terminal that is more than one screen long to a paging program,
+ such as less
or more
. This avoids the problem of having a
+ large volume of output stream by before you can read it. With
+ less
(and some versions of more
) you can also scan forward
+ and backward, and search for specific items.
+
+
+
+ Normally, no output is displayed by the pager until just before Octave
+ is ready to print the top level prompt, or read from the standard input
+ (for example, by using the fscanf
or scanf
functions).
+ This means that there may be some delay before any output appears on
+ your screen if you have asked Octave to perform a significant amount of
+ work with a single command statement. The function fflush
may be
+ used to force output to be sent to the pager (or any other stream)
+ immediately.
+
+
+
+ You can select the program to run as the pager by setting the variable
+ PAGER
, and you can turn paging off by setting the value of the
+ variable page_screen_output
to 0.
+
+
+
+
+ - Command: more
+
-
+
- Command: more on
+
-
+
- Command: more off
+
-
+ Turn output pagination on or off. Without an argument,
more
+ toggles the current state.
+
+
+
+
+
+ - Built-in Variable: PAGER
+
-
+ The default value is normally
"less"
, "more"
, or
+ "pg"
, depending on what programs are installed on your system.
+ See section Installing Octave.
+
+
+
+ When running interactively, Octave sends any output intended for your
+ terminal that is more than one screen long to the program named by the
+ value of the variable PAGER
.
+
+
+
+
+
+ - Built-in Variable: page_screen_output
+
-
+ If the value of
page_screen_output
is nonzero, all output
+ intended for the screen that is longer than one page is sent through a
+ pager. This allows you to view one screenful at a time. Some pagers
+ (such as less
---see section Installing Octave) are also capable of moving
+ backward on the output. The default value is 1.
+
+
+
+
+
+ - Built-in Variable: page_output_immediately
+
-
+ If the value of
page_output_immediately
is nonzero, Octave sends
+ output to the pager as soon as it is available. Otherwise, Octave
+ buffers its output and waits until just before the prompt is printed to
+ flush it to the pager. The default value is 0.
+
+
+
+
+ - Built-in Function: fflush (fid)
+
-
+ Flush output to fid. This is useful for ensuring that all
+ pending output makes it to the screen before some other event occurs.
+ For example, it is always a good idea to flush the standard output
+ stream before calling
input
.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Since Octave normally prints the value of an expression as soon as it
+ has been evaluated, the simplest of all I/O functions is a simple
+ expression. For example, the following expression will display the
+ value of pi
+
+
+
+
+ pi
+ -| pi = 3.1416
+
+
+
+ This works well as long as it is acceptable to have the name of the
+ variable (or `ans') printed along with the value. To print the
+ value of a variable without printing its name, use the function
+ disp
.
+
+
+
+ The format
command offers some control over the way Octave prints
+ values with disp
and through the normal echoing mechanism.
+
+
+
+
+ - Built-in Variable: ans
+
-
+ This variable holds the most recently computed result that was not
+ explicitly assigned to a variable. For example, after the expression
+
+
+
+
+ 3^2 + 4^2
+
+
+
+ is evaluated, the value of ans
is 25.
+
+
+
+
+
+ - Built-in Function: disp (x)
+
-
+ Display the value of x. For example,
+
+
+
+
+ disp ("The value of pi is:"), disp (pi)
+
+ -| the value of pi is:
+ -| 3.1416
+
+
+
+ Note that the output from disp
always ends with a newline.
+
+
+
+
+
+ - Command: format options
+
-
+ Control the format of the output produced by
disp
and Octave's
+ normal echoing mechanism. Valid options are listed in the following
+ table.
+
+
+
+
+ short
+ -
+ This is the default format. Octave will try to print numbers with at
+ least 5 significant figures within a field that is a maximum of 10
+ characters wide.
+
+ If Octave is unable to format a matrix so that columns line up on the
+ decimal point and all the numbers fit within the maximum field width,
+ it switches to an `e' format.
+
+
long
+ -
+ Octave will try to print numbers with at least 15 significant figures
+ within a field that is a maximum of 24 characters wide.
+
+ As will the `short' format, Octave will switch to an `e'
+ format if it is unable to format a matrix so that columns line up on the
+ decimal point and all the numbers fit within the maximum field width.
+
+
long e
+ -
+
short e
+ -
+ The same as `format long' or `format short' but always display
+ output with an `e' format. For example, with the `short e'
+ format, pi is displayed as
3.14e+00
.
+
+ long E
+ -
+
short E
+ -
+ The same as `format long e' or `format short e' but always
+ display output with an uppercase `E' format. For example, with
+ the `long E' format, pi is displayed as
+
3.14159265358979E+00
.
+
+ free
+ -
+
none
+ -
+ Print output in free format, without trying to line up columns of
+ matrices on the decimal point. This also causes complex numbers to be
+ formatted like this `(0.604194, 0.607088)' instead of like this
+ `0.60419 + 0.60709i'.
+
+
bank
+ -
+ Print in a fixed format with two places to the right of the decimal
+ point.
+
+
+
+ -
+ Print a `+' symbol for nonzero matrix elements and a space for zero
+ matrix elements. This format can be very useful for examining the
+ structure of a large matrix.
+
+
hex
+ -
+ Print the hexadecimal representation numbers as they are stored in
+ memory. For example, on a workstation which stores 8 byte real values
+ in IEEE format with the least significant byte first, the value of
+
pi
when printed in hex
format is 400921fb54442d18
.
+ This format only works for numeric values.
+
+ bit
+ -
+ Print the bit representation of numbers as stored in memory.
+ For example, the value of
pi
is
+
+
+
+ 01000000000010010010000111111011
+ 01010100010001000010110100011000
+
+
+ (shown here in two 32 bit sections for typesetting purposes) when
+ printed in bit format on a workstation which stores 8 byte real values
+ in IEEE format with the least significant byte first. This format only
+ works for numeric types.
+
+
+
+
+
+ - Built-in Variable: print_answer_id_name
+
-
+ If the value of
print_answer_id_name
is nonzero, variable
+ names are printed along with the result. Otherwise, only the result
+ values are printed. The default value is 1.
+
+
+
+
+
+
+
+
+ Octave has three functions that make it easy to prompt users for
+ input. The input
and menu
functions are normally
+ used for managing an interactive dialog with a user, and the
+ keyboard
function is normally used for doing simple debugging.
+
+
+
+
+ - Built-in Function: input (prompt)
+
-
+
- Built-in Function: input (prompt, "s")
+
-
+ Print a prompt and wait for user input. For example,
+
+
+
+
+ input ("Pick a number, any number! ")
+
+
+
+ prints the prompt
+
+
+
+
+ Pick a number, any number!
+
+
+
+ and waits for the user to enter a value. The string entered by the user
+ is evaluated as an expression, so it may be a literal constant, a
+ variable name, or any other valid expression.
+
+
+
+ Currently, input
only returns one value, regardless of the number
+ of values produced by the evaluation of the expression.
+
+
+
+ If you are only interested in getting a literal string value, you can
+ call input
with the character string "s"
as the second
+ argument. This tells Octave to return the string entered by the user
+ directly, without evaluating it first.
+
+
+
+ Because there may be output waiting to be displayed by the pager, it is
+ a good idea to always call fflush (stdout)
before calling
+ input
. This will ensure that all pending output is written to
+ the screen before your prompt. See section Input and Output.
+
+
+
+
+
+ - Function File: menu (title, opt1, ...)
+
-
+ Print a title string followed by a series of options. Each option will
+ be printed along with a number. The return value is the number of the
+ option selected by the user. This function is useful for interactive
+ programs. There is no limit to the number of options that may be passed
+ in, but it may be confusing to present more than will fit easily on one
+ screen.
+
+
+
+
+
+ - Built-in Function: keyboard (prompt)
+
-
+ This function is normally used for simple debugging. When the
+
keyboard
function is executed, Octave prints a prompt and waits
+ for user input. The input strings are then evaluated and the results
+ are printed. This makes it possible to examine the values of variables
+ within a function, and to assign new values to variables. No value is
+ returned from the keyboard
function, and it continues to prompt
+ for input until the user types `quit', or `exit'.
+
+
+
+ If keyboard
is invoked without any arguments, a default prompt of
+ `debug> ' is used.
+
+
+
+
+ For both input
and keyboard
, the normal command line
+ history and editing functions are available at the prompt.
+
+
+
+ Octave also has a function that makes it possible to get a single
+ character from the keyboard without requiring the user to type a
+ carriage return.
+
+
+
+
+
+ - Built-in Function: kbhit ()
+
-
+ Read a single keystroke from the keyboard. For example,
+
+
+
+
+ x = kbhit ();
+
+
+
+ will set x to the next character typed at the keyboard as soon as
+ it is typed.
+
+
+
+
+
+
+
+
+ The save
and load
commands allow data to be written to and
+ read from disk files in various formats. The default format of files
+ written by the save
command can be controlled using the built-in
+ variables default_save_format
and save_precision
.
+
+
+
+ Note that Octave can not yet save or load structure variables or any
+ user-defined types.
+
+
+
+
+ - Command: save options file v1 v2 ...
+
-
+ Save the named variables v1, v2, ... in the file
+ file. The special filename `-' can be used to write the
+ output to your terminal. If no variable names are listed, Octave saves
+ all the variables in the current scope. Valid options for the
+
save
command are listed in the following table. Options that
+ modify the output format override the format specified by the built-in
+ variable default_save_format
.
+
+
+
+
+ -ascii
+ -
+ Save the data in Octave's text data format.
+
+
-binary
+ -
+ Save the data in Octave's binary data format.
+
+
-float-binary
+ -
+ Save the data in Octave's binary data format but only using single
+ precision. You should use this format only if you know that all the
+ values to be saved can be represented in single precision.
+
+
-mat-binary
+ -
+ Save the data in MATLAB's binary data format.
+
+
-save-builtins
+ -
+ Force Octave to save the values of built-in variables too. By default,
+ Octave does not save built-in variables.
+
+
+
+ The list of variables to save may include wildcard patterns containing
+ the following special characters:
+
+
+ ?
+ -
+ Match any single character.
+
+
*
+ -
+ Match zero or more characters.
+
+
[ list ]
+ -
+ Match the list of characters specified by list. If the first
+ character is
!
or ^
, match all characters except those
+ specified by list. For example, the pattern `[a-zA-Z]' will
+ match all lower and upper case alphabetic characters.
+
+
+
+ Except when using the MATLAB binary data file format, saving global
+ variables also saves the global status of the variable, so that if it is
+ restored at a later time using `load', it will be restored as a
+ global variable.
+
+
+
+ The command
+
+
+
+
+ save -binary data a b*
+
+
+
+ saves the variable `a' and all variables beginning with `b' to
+ the file `data' in Octave's binary format.
+
+
+
+
+ There are two variables that modify the behavior of save
.
+
+
+
+
+ - Built-in Variable: default_save_format
+
-
+ This variable specifies the default format for the
save
command.
+ It should have one of the following values: "ascii"
,
+ "binary"
, float-binary
, or "mat-binary"
. The
+ initial default save format is Octave's text format.
+
+
+
+
+
+ - Built-in Variable: save_precision
+
-
+ This variable specifies the number of digits to keep when saving data in
+ text format. The default value is 17.
+
+
+
+
+
+ - Command: load options file v1 v2 ...
+
-
+ Load the named variables from the file file. As with
save
,
+ you may specify a list of variables and load
will only extract
+ those variables with names that match. For example, to restore the
+ variables saved in the file `data', use the command
+
+
+
+
+ load data
+
+
+
+ Octave will refuse to overwrite existing variables unless you use the
+ option `-force'.
+
+
+
+ If a variable that is not marked as global is loaded from a file when a
+ global symbol with the same name already exists, it is loaded in the
+ global symbol table. Also, if a variable is marked as global in a file
+ and a local symbol exists, the local symbol is moved to the global
+ symbol table and given the value from the file. Since it seems that
+ both of these cases are likely to be the result of some sort of error,
+ they will generate warnings.
+
+
+
+ The load
command can read data stored in Octave's text and
+ binary formats, and MATLAB's binary format. It will automatically
+ detect the type of file and do conversion from different floating point
+ formats (currently only IEEE big and little endian, though other formats
+ may added in the future).
+
+
+
+ Valid options for load
are listed in the following table.
+
+
+
+
+ -force
+ -
+ Force variables currently in memory to be overwritten by variables with
+ the same name found in the file.
+
+
-ascii
+ -
+ Force Octave to assume the file is in Octave's text format.
+
+
-binary
+ -
+ Force Octave to assume the file is in Octave's binary format.
+
+
-mat-binary
+ -
+ Force Octave to assume the file is in MATLAB's binary format.
+
+
+
+
+
+
+
+
+ Octave's C-style input and output functions provide most of the
+ functionality of the C programming language's standard I/O library. The
+ argument lists for some of the input functions are slightly different,
+ however, because Octave has no way of passing arguments by reference.
+
+
+
+ In the following, file refers to a file name and fid
refers
+ to an integer file number, as returned by fopen
.
+
+
+
+ There are three files that are always available. Although these files
+ can be accessed using their corresponding numeric file ids, you should
+ always use the symbolic names given in the table below, since it will
+ make your programs easier to understand.
+
+
+
+
+ - Built-in Variable: stdin
+
-
+ The standard input stream (file id 0). When Octave is used
+ interactively, this is filtered through the command line editing
+ functions.
+
+
+
+
+
+ - Built-in Variable: stdout
+
-
+ The standard output stream (file id 1). Data written to the
+ standard output is normally filtered through the pager.
+
+
+
+
+
+ - Built-in Variable: stderr
+
-
+ The standard error stream (file id 2). Even if paging is turned on,
+ the standard error is not sent to the pager. It is useful for error
+ messages and prompts.
+
+
+
+
+
+
+
+
+
+
+ - Built-in Function: [fid, msg] = fopen (name, mode, arch)
+
-
+
- Built-in Function: fid_list = fopen ("all")
+
-
+
- Built-in Function: file = fopen (fid)
+
-
+ The first form of the
fopen
function opens the named file with
+ the specified mode (read-write, read-only, etc.) and architecture
+ interpretation (IEEE big endian, IEEE little endian, etc.), and returns
+ an integer value that may be used to refer to the file later. If an
+ error occurs, fid is set to -1 and msg contains the
+ corresponding system error message. The mode is a one or two
+ character string that specifies whether the file is to be opened for
+ reading, writing, or both.
+
+
+
+ The second form of the fopen
function returns a vector of file ids
+ corresponding to all the currently open files, excluding the
+ stdin
, stdout
, and stderr
streams.
+
+
+
+ The third form of the fopen
function returns the name of a
+ currently open file given its file id.
+
+
+
+ For example,
+
+
+
+
+ myfile = fopen ("splat.dat", "r", "ieee-le");
+
+
+
+ opens the file `splat.dat' for reading. If necessary, binary
+ numeric values will be read assuming they are stored in IEEE format with
+ the least significant bit first, and then converted to the native
+ representation.
+
+
+
+ Opening a file that is already open simply opens it again and returns a
+ separate file id. It is not an error to open a file several times,
+ though writing to the same file through several different file ids may
+ produce unexpected results.
+
+
+
+ The possible values `mode' may have are
+
+
+
+
+ - `r'
+
-
+ Open a file for reading.
+
+
- `w'
+
-
+ Open a file for writing. The previous contents are discared.
+
+
- `a'
+
-
+ Open or create a file for writing at the end of the file.
+
+
- `r+'
+
-
+ Open an existing file for reading and writing.
+
+
- `w+'
+
-
+ Open a file for reading or writing. The previous contents are
+ discarded.
+
+
- `a+'
+
-
+ Open or create a file for reading or writing at the end of the
+ file.
+
+
+
+ The parameter arch is a string specifying the default data format
+ for the file. Valid values for arch are:
+
+
+
+
+ `native'
+ The format of the current machine (this is the default).
+
+ `ieee-le'
+ IEEE big endian format.
+
+ `ieee-be'
+ IEEE little endian format.
+
+ `vaxd'
+ VAX D floating format.
+
+ `vaxg'
+ VAX G floating format.
+
+ `cray'
+ Cray floating format.
+
+
+
+ however, conversions are currently only supported for `native'
+ `ieee-be', and `ieee-le' formats.
+
+
+
+
+
+ - Built-in Function: fclose (fid)
+
-
+ Closes the specified file. If an error is encountered while trying to
+ close the file, an error message is printed and
fclose
returns
+ 0. Otherwise, it returns 1.
+
+
+
+
+
+
+
+
+
+ - Built-in Function: fputs (fid, string)
+
-
+ Write a string to a file with no formatting.
+
+
+
+
+
+ - Built-in Function: puts (string)
+
-
+ Write a string to the standard output with no formatting.
+
+
+
+
+
+
+
+
+
+ - Built-in Function: fgetl (fid, len)
+
-
+ Read characters from a file, stopping at the first newline character
+ that is encountered or after len characters have been read, and
+ returning the characters as a string. The newline is not included in
+ the returned value.
+
+
+
+ If len is omitted, fgetl
reads until the next newline
+ character.
+
+
+
+ If there are no more characters to read, fgetl
returns -1.
+
+
+
+
+
+ - Built-in Function: fgets (fid, len)
+
-
+ Read characters from a file, stopping at the first newline character
+ that is encountered or after len characters have been read, and
+ returning the characters as a string. The newline is included in the
+ returned value.
+
+
+
+ If len is omitted, fgets
reads until the next newline
+ character.
+
+
+
+ If there are no more characters to read, fgets
returns -1.
+
+
+
+
+
+
+
+
+ This section describes how to call printf
and related functions.
+
+
+
+ The following functions are available for formatted output. They are
+ modelled after the C language functions of the same name, but they
+ interpret the format template differently in order to improve the
+ performance of printing vector and matrix values.
+
+
+
+
+ - Function File: printf (template, ...)
+
-
+ The
printf
function prints the optional arguments under the
+ control of the template string template to the stream
+ stdout
.
+
+
+
+
+
+ - Built-in Function: fprintf (fid, template, ...)
+
-
+ This function is just like
printf
, except that the output is
+ written to the stream fid instead of stdout
.
+
+
+
+
+
+ - Built-in Function: sprintf (template, ...)
+
-
+ This is like
printf
, except that the output is returned as a
+ string. Unlike the C library function, which requires you to provide a
+ suitably sized string as an argument, Octave's sprintf
function
+ returns the string, automatically sized to hold all of the items
+ converted.
+
+
+
+
+ The printf
function can be used to print any number of arguments.
+ The template string argument you supply in a call provides
+ information not only about the number of additional arguments, but also
+ about their types and what style should be used for printing them.
+
+
+
+ Ordinary characters in the template string are simply written to the
+ output stream as-is, while conversion specifications introduced by
+ a `%' character in the template cause subsequent arguments to be
+ formatted and written to the output stream. For example,
+
+
+
+
+
+ pct = 37;
+ filename = "foo.txt";
+ printf ("Processing of `%s' is %d%% finished.\nPlease be patient.\n",
+ filename, pct);
+
+
+
+ produces output like
+
+
+
+
+ Processing of `foo.txt' is 37% finished.
+ Please be patient.
+
+
+
+ This example shows the use of the `%d' conversion to specify that a
+ scalar argument should be printed in decimal notation, the `%s'
+ conversion to specify printing of a string argument, and the `%%'
+ conversion to print a literal `%' character.
+
+
+
+ There are also conversions for printing an integer argument as an
+ unsigned value in octal, decimal, or hexadecimal radix (`%o',
+ `%u', or `%x', respectively); or as a character value
+ (`%c').
+
+
+
+ Floating-point numbers can be printed in normal, fixed-point notation
+ using the `%f' conversion or in exponential notation using the
+ `%e' conversion. The `%g' conversion uses either `%e'
+ or `%f' format, depending on what is more appropriate for the
+ magnitude of the particular number.
+
+
+
+ You can control formatting more precisely by writing modifiers
+ between the `%' and the character that indicates which conversion
+ to apply. These slightly alter the ordinary behavior of the conversion.
+ For example, most conversion specifications permit you to specify a
+ minimum field width and a flag indicating whether you want the result
+ left- or right-justified within the field.
+
+
+
+ The specific flags and modifiers that are permitted and their
+ interpretation vary depending on the particular conversion. They're all
+ described in more detail in the following sections.
+
+
+
+
+
+
+
+ When given a matrix value, Octave's formatted output functions cycle
+ through the format template until all the values in the matrix have been
+ printed. For example,
+
+
+
+
+ printf ("%4.2f %10.2e %8.4g\n", hilb (3));
+
+ -| 1.00 5.00e-01 0.3333
+ -| 0.50 3.33e-01 0.25
+ -| 0.33 2.50e-01 0.2
+
+
+
+ If more than one value is to be printed in a single call, the output
+ functions do not return to the beginning of the format template when
+ moving on from one value to the next. This can lead to confusing output
+ if the number of elements in the matrices are not exact multiples of the
+ number of conversions in the format template. For example,
+
+
+
+
+ printf ("%4.2f %10.2e %8.4g\n", [1, 2], [3, 4]);
+
+ -| 1.00 2.00e+00 3
+ -| 4.00
+
+
+
+ If this is not what you want, use a series of calls instead of just one.
+
+
+
+
+
+
+
+ This section provides details about the precise syntax of conversion
+ specifications that can appear in a printf
template
+ string.
+
+
+
+ Characters in the template string that are not part of a
+ conversion specification are printed as-is to the output stream.
+
+
+
+ The conversion specifications in a printf
template string have
+ the general form:
+
+
+
+
+ % flags width [ . precision ] type conversion
+
+
+
+ For example, in the conversion specifier `%-10.8ld', the `-'
+ is a flag, `10' specifies the field width, the precision is
+ `8', the letter `l' is a type modifier, and `d' specifies
+ the conversion style. (This particular type specifier says to print a
+ numeric argument in decimal notation, with a minimum of 8 digits
+ left-justified in a field at least 10 characters wide.)
+
+
+
+ In more detail, output conversion specifications consist of an
+ initial `%' character followed in sequence by:
+
+
+
+
+ -
+
+ Zero or more flag characters that modify the normal behavior of
+ the conversion specification.
+
+
+
-
+
+ An optional decimal integer specifying the minimum field width.
+ If the normal conversion produces fewer characters than this, the field
+ is padded with spaces to the specified width. This is a minimum
+ value; if the normal conversion produces more characters than this, the
+ field is not truncated. Normally, the output is right-justified
+ within the field.
+
+
+ You can also specify a field width of `*'. This means that the
+ next argument in the argument list (before the actual value to be
+ printed) is used as the field width. The value is rounded to the
+ nearest integer. If the value is negative, this means to set the
+ `-' flag (see below) and to use the absolute value as the field
+ width.
+
+
-
+
+ An optional precision to specify the number of digits to be
+ written for the numeric conversions. If the precision is specified, it
+ consists of a period (`.') followed optionally by a decimal integer
+ (which defaults to zero if omitted).
+
+
+ You can also specify a precision of `*'. This means that the next
+ argument in the argument list (before the actual value to be printed) is
+ used as the precision. The value must be an integer, and is ignored
+ if it is negative.
+
+
-
+
+ An optional type modifier character. This character is ignored by
+ Octave's
printf
function, but is recognized to provide
+ compatibility with the C language printf
.
+
+ -
+
+ A character that specifies the conversion to be applied.
+
+
+
+ The exact options that are permitted and how they are interpreted vary
+ between the different conversion specifiers. See the descriptions of the
+ individual conversions for information about the particular options that
+ they use.
+
+
+
+
+
+
+
+
+
+
+ Here is a table summarizing what all the different conversions do:
+
+
+
+
+ - `%d', `%i'
+
-
+ Print an integer as a signed decimal number. See section Integer Conversions, for details. `%d' and `%i' are synonymous for
+ output, but are different when used with
scanf
for input
+ (see section Table of Input Conversions).
+
+ - `%o'
+
-
+ Print an integer as an unsigned octal number. See section Integer Conversions, for details.
+
+
- `%u'
+
-
+ Print an integer as an unsigned decimal number. See section Integer Conversions, for details.
+
+
- `%x', `%X'
+
-
+ Print an integer as an unsigned hexadecimal number. `%x' uses
+ lower-case letters and `%X' uses upper-case. See section Integer Conversions, for details.
+
+
- `%f'
+
-
+ Print a floating-point number in normal (fixed-point) notation.
+ See section Floating-Point Conversions, for details.
+
+
- `%e', `%E'
+
-
+ Print a floating-point number in exponential notation. `%e' uses
+ lower-case letters and `%E' uses upper-case. See section Floating-Point Conversions, for details.
+
+
- `%g', `%G'
+
-
+ Print a floating-point number in either normal (fixed-point) or
+ exponential notation, whichever is more appropriate for its magnitude.
+ `%g' uses lower-case letters and `%G' uses upper-case.
+ See section Floating-Point Conversions, for details.
+
+
- `%c'
+
-
+ Print a single character. See section Other Output Conversions.
+
+
- `%s'
+
-
+ Print a string. See section Other Output Conversions.
+
+
- `%%'
+
-
+ Print a literal `%' character. See section Other Output Conversions.
+
+
+
+ If the syntax of a conversion specification is invalid, unpredictable
+ things will happen, so don't do this. If there aren't enough function
+ arguments provided to supply values for all the conversion
+ specifications in the template string, or if the arguments are not of
+ the correct types, the results are unpredictable. If you supply more
+ arguments than conversion specifications, the extra argument values are
+ simply ignored; this is sometimes useful.
+
+
+
+
+
+
+
+ This section describes the options for the `%d', `%i',
+ `%o', `%u', `%x', and `%X' conversion
+ specifications. These conversions print integers in various formats.
+
+
+
+ The `%d' and `%i' conversion specifications both print an
+ numeric argument as a signed decimal number; while `%o',
+ `%u', and `%x' print the argument as an unsigned octal,
+ decimal, or hexadecimal number (respectively). The `%X' conversion
+ specification is just like `%x' except that it uses the characters
+ `ABCDEF' as digits instead of `abcdef'.
+
+
+
+ The following flags are meaningful:
+
+
+
+
+ - `-'
+
-
+ Left-justify the result in the field (instead of the normal
+ right-justification).
+
+
- `+'
+
-
+ For the signed `%d' and `%i' conversions, print a
+ plus sign if the value is positive.
+
+
- ` '
+
-
+ For the signed `%d' and `%i' conversions, if the result
+ doesn't start with a plus or minus sign, prefix it with a space
+ character instead. Since the `+' flag ensures that the result
+ includes a sign, this flag is ignored if you supply both of them.
+
+
- `#'
+
-
+ For the `%o' conversion, this forces the leading digit to be
+ `0', as if by increasing the precision. For `%x' or
+ `%X', this prefixes a leading `0x' or `0X' (respectively)
+ to the result. This doesn't do anything useful for the `%d',
+ `%i', or `%u' conversions.
+
+
- `0'
+
-
+ Pad the field with zeros instead of spaces. The zeros are placed after
+ any indication of sign or base. This flag is ignored if the `-'
+ flag is also specified, or if a precision is specified.
+
+
+
+ If a precision is supplied, it specifies the minimum number of digits to
+ appear; leading zeros are produced if necessary. If you don't specify a
+ precision, the number is printed with as many digits as it needs. If
+ you convert a value of zero with an explicit precision of zero, then no
+ characters at all are produced.
+
+
+
+
+
+
+
+ This section discusses the conversion specifications for floating-point
+ numbers: the `%f', `%e', `%E', `%g', and `%G'
+ conversions.
+
+
+
+ The `%f' conversion prints its argument in fixed-point notation,
+ producing output of the form
+ [-
]ddd.
ddd,
+ where the number of digits following the decimal point is controlled
+ by the precision you specify.
+
+
+
+ The `%e' conversion prints its argument in exponential notation,
+ producing output of the form
+ [-
]d.
ddde
[+
|-
]dd.
+ Again, the number of digits following the decimal point is controlled by
+ the precision. The exponent always contains at least two digits. The
+ `%E' conversion is similar but the exponent is marked with the letter
+ `E' instead of `e'.
+
+
+
+ The `%g' and `%G' conversions print the argument in the style
+ of `%e' or `%E' (respectively) if the exponent would be less
+ than -4 or greater than or equal to the precision; otherwise they use the
+ `%f' style. Trailing zeros are removed from the fractional portion
+ of the result and a decimal-point character appears only if it is
+ followed by a digit.
+
+
+
+ The following flags can be used to modify the behavior:
+
+
+
+
+ - `-'
+
-
+ Left-justify the result in the field. Normally the result is
+ right-justified.
+
+
- `+'
+
-
+ Always include a plus or minus sign in the result.
+
+
- ` '
+
-
+ If the result doesn't start with a plus or minus sign, prefix it with a
+ space instead. Since the `+' flag ensures that the result includes
+ a sign, this flag is ignored if you supply both of them.
+
+
- `#'
+
-
+ Specifies that the result should always include a decimal point, even
+ if no digits follow it. For the `%g' and `%G' conversions,
+ this also forces trailing zeros after the decimal point to be left
+ in place where they would otherwise be removed.
+
+
- `0'
+
-
+ Pad the field with zeros instead of spaces; the zeros are placed
+ after any sign. This flag is ignored if the `-' flag is also
+ specified.
+
+
+
+ The precision specifies how many digits follow the decimal-point
+ character for the `%f', `%e', and `%E' conversions. For
+ these conversions, the default precision is 6
. If the precision
+ is explicitly 0
, this suppresses the decimal point character
+ entirely. For the `%g' and `%G' conversions, the precision
+ specifies how many significant digits to print. Significant digits are
+ the first digit before the decimal point, and all the digits after it.
+ If the precision is 0
or not specified for `%g' or
+ `%G', it is treated like a value of 1
. If the value being
+ printed cannot be expressed precisely in the specified number of digits,
+ the value is rounded to the nearest number that fits.
+
+
+
+
+
+
+
+ This section describes miscellaneous conversions for printf
.
+
+
+
+ The `%c' conversion prints a single character. The `-'
+ flag can be used to specify left-justification in the field, but no
+ other flags are defined, and no precision or type modifier can be given.
+ For example:
+
+
+
+
+ printf ("%c%c%c%c%c", "h", "e", "l", "l", "o");
+
+
+
+ prints `hello'.
+
+
+
+ The `%s' conversion prints a string. The corresponding argument
+ must be a string. A precision can be specified to indicate the maximum
+ number of characters to write; otherwise characters in the string up to
+ but not including the terminating null character are written to the
+ output stream. The `-' flag can be used to specify
+ left-justification in the field, but no other flags or type modifiers
+ are defined for this conversion. For example:
+
+
+
+
+ printf ("%3s%-6s", "no", "where");
+
+
+
+ prints ` nowhere ' (note the leading and trailing spaces).
+
+
+
+
+
+
+
+ Octave provides the scanf
, fscanf
, and sscanf
+ functions to read formatted input. There are two forms of each of these
+ functions. One can be used to extract vectors of data from a file, and
+ the other is more `C-like'.
+
+
+
+
+ - Built-in Function: [val, count] = fscanf (fid, template, size)
+
-
+
- Built-in Function: [v1, v2, ...] = fscanf (fid, template, "C")
+
-
+ In the first form, read from fid according to template,
+ returning the result in the matrix val.
+
+
+
+ The optional argument size specifies the amount of data to read
+ and may be one of
+
+
+
+
+ Inf
+ -
+ Read as much as possible, returning a column vector.
+
+
nr
+ -
+
[nr, Inf]
+ -
+ Read as much as possible, returning a matrix with nr rows. If the
+ number of elements read is not an exact multiple of nr, the last
+ column is padded with zeros.
+
+
[nr, nc]
+ -
+ Read up to
nr * nc
elements, returning a matrix with
+ nr rows. If the number of elements read is not an exact multiple
+ of nr, the last column is padded with zeros.
+
+
+
+ If size is omitted, a value of Inf
is assumed.
+
+
+
+ A string is returned if template specifies only character
+ conversions.
+
+
+
+ The number of items successfully read is returned in count.
+
+
+
+ In the second form, read from fid according to template,
+ with each conversion specifier in template corresponding to a
+ single scalar return value. This form is more `C-like', and also
+ compatible with previous versions of Octave.
+
+
+
+
+
+ - Built-in Function: [val, count] = sscanf (string, template, size)
+
-
+
- Built-in Function: [v1, v2, ...] = sscanf (string, template, "C")
+
-
+ This is like
fscanf
, except that the characters are taken from the
+ string string instead of from a stream. Reaching the end of the
+ string is treated as an end-of-file condition.
+
+
+
+
+
+ - Built-in Function: [val, count] = scanf (template, size)
+
-
+
- Built-in Function: [v1, v2, ...] = scanf (template, "C")
+
-
+ This is equivalent to calling
fscanf
with fid = stdin
.
+
+
+
+ It is currently not useful to call scanf
in interactive
+ programs.
+
+
+
+
+ Calls to scanf
are superficially similar to calls to
+ printf
in that arbitrary arguments are read under the control of
+ a template string. While the syntax of the conversion specifications in
+ the template is very similar to that for printf
, the
+ interpretation of the template is oriented more towards free-format
+ input and simple pattern matching, rather than fixed-field formatting.
+ For example, most scanf
conversions skip over any amount of
+ "white space" (including spaces, tabs, and newlines) in the input
+ file, and there is no concept of precision for the numeric input
+ conversions as there is for the corresponding output conversions.
+ Ordinarily, non-whitespace characters in the template are expected to
+ match characters in the input stream exactly.
+
+
+
+
+ When a matching failure occurs, scanf
returns immediately,
+ leaving the first non-matching character as the next character to be
+ read from the stream, and scanf
returns all the items that were
+ successfully converted.
+
+
+
+
+ The formatted input functions are not used as frequently as the
+ formatted output functions. Partly, this is because it takes some care
+ to use them properly. Another reason is that it is difficult to recover
+ from a matching error.
+
+
+
+
+
+
+
+ A scanf
template string is a string that contains ordinary
+ multibyte characters interspersed with conversion specifications that
+ start with `%'.
+
+
+
+ Any whitespace character in the template causes any number of whitespace
+ characters in the input stream to be read and discarded. The whitespace
+ characters that are matched need not be exactly the same whitespace
+ characters that appear in the template string. For example, write
+ ` , ' in the template to recognize a comma with optional whitespace
+ before and after.
+
+
+
+ Other characters in the template string that are not part of conversion
+ specifications must match characters in the input stream exactly; if
+ this is not the case, a matching failure occurs.
+
+
+
+ The conversion specifications in a scanf
template string
+ have the general form:
+
+
+
+
+ % flags width type conversion
+
+
+
+ In more detail, an input conversion specification consists of an initial
+ `%' character followed in sequence by:
+
+
+
+
+ -
+
+ An optional flag character `*', which says to ignore the text
+ read for this specification. When
scanf
finds a conversion
+ specification that uses this flag, it reads input as directed by the
+ rest of the conversion specification, but it discards this input, does
+ not use a pointer argument, and does not increment the count of
+ successful assignments.
+
+
+ -
+
+ An optional decimal integer that specifies the maximum field
+ width. Reading of characters from the input stream stops either when
+ this maximum is reached or when a non-matching character is found,
+ whichever happens first. Most conversions discard initial whitespace
+ characters (those that don't are explicitly documented), and these
+ discarded characters don't count towards the maximum field width.
+
+
+
-
+
+ An optional type modifier character. This character is ignored by
+ Octave's
scanf
function, but is recognized to provide
+ compatibility with the C language scanf
.
+
+ -
+
+ A character that specifies the conversion to be applied.
+
+
+
+ The exact options that are permitted and how they are interpreted vary
+ between the different conversion specifiers. See the descriptions of the
+ individual conversions for information about the particular options that
+ they allow.
+
+
+
+
+
+
+
+
+
+
+ Here is a table that summarizes the various conversion specifications:
+
+
+
+
+ - `%d'
+
-
+ Matches an optionally signed integer written in decimal. See section Numeric Input Conversions.
+
+
- `%i'
+
-
+ Matches an optionally signed integer in any of the formats that the C
+ language defines for specifying an integer constant. See section Numeric Input Conversions.
+
+
- `%o'
+
-
+ Matches an unsigned integer written in octal radix.
+ See section Numeric Input Conversions.
+
+
- `%u'
+
-
+ Matches an unsigned integer written in decimal radix.
+ See section Numeric Input Conversions.
+
+
- `%x', `%X'
+
-
+ Matches an unsigned integer written in hexadecimal radix.
+ See section Numeric Input Conversions.
+
+
- `%e', `%f', `%g', `%E', `%G'
+
-
+ Matches an optionally signed floating-point number. See section Numeric Input Conversions.
+
+
- `%s'
+
-
+ Matches a string containing only non-whitespace characters.
+ See section String Input Conversions.
+
+
- `%c'
+
-
+ Matches a string of one or more characters; the number of characters
+ read is controlled by the maximum field width given for the conversion.
+ See section String Input Conversions.
+
+
- `%%'
+
-
+ This matches a literal `%' character in the input stream. No
+ corresponding argument is used.
+
+
+
+ If the syntax of a conversion specification is invalid, the behavior is
+ undefined. If there aren't enough function arguments provided to supply
+ addresses for all the conversion specifications in the template strings
+ that perform assignments, or if the arguments are not of the correct
+ types, the behavior is also undefined. On the other hand, extra
+ arguments are simply ignored.
+
+
+
+
+
+
+
+ This section describes the scanf
conversions for reading numeric
+ values.
+
+
+
+ The `%d' conversion matches an optionally signed integer in decimal
+ radix.
+
+
+
+ The `%i' conversion matches an optionally signed integer in any of
+ the formats that the C language defines for specifying an integer
+ constant.
+
+
+
+ For example, any of the strings `10', `0xa', or `012'
+ could be read in as integers under the `%i' conversion. Each of
+ these specifies a number with decimal value 10
.
+
+
+
+ The `%o', `%u', and `%x' conversions match unsigned
+ integers in octal, decimal, and hexadecimal radices, respectively.
+
+
+
+ The `%X' conversion is identical to the `%x' conversion. They
+ both permit either uppercase or lowercase letters to be used as digits.
+
+
+
+ Unlike the C language scanf
, Octave ignores the `h',
+ `l', and `L' modifiers.
+
+
+
+
+
+
+
+ This section describes the scanf
input conversions for reading
+ string and character values: `%s' and `%c'.
+
+
+
+ The `%c' conversion is the simplest: it matches a fixed number of
+ characters, always. The maximum field with says how many characters to
+ read; if you don't specify the maximum, the default is 1. This
+ conversion does not skip over initial whitespace characters. It reads
+ precisely the next n characters, and fails if it cannot get that
+ many.
+
+
+
+ The `%s' conversion matches a string of non-whitespace characters.
+ It skips and discards initial whitespace, but stops when it encounters
+ more whitespace after having read something.
+
+
+
+ For example, reading the input:
+
+
+
+
+ hello, world
+
+
+
+ with the conversion `%10c' produces " hello, wo"
, but
+ reading the same input with the conversion `%10s' produces
+ "hello,"
.
+
+
+
+
+
+
+
+ Octave can read and write binary data using the functions fread
+ and fwrite
, which are patterned after the standard C functions
+ with the same names. The are able to automatically swap the byte order
+ of integer data and convert among ths supported floating point formats
+ as the data are read.
+
+
+
+
+ - Built-in Function: [val, count] = fread (fid, size, precision, skip, arch)
+
-
+ Read binary data of type precision from the specified file ID
+ fid.
+
+
+
+ The optional argument size specifies the amount of data to read
+ and may be one of
+
+
+
+
+ Inf
+ -
+ Read as much as possible, returning a column vector.
+
+
nr
+ -
+
[nr, Inf]
+ -
+ Read as much as possible, returning a matrix with nr rows. If the
+ number of elements read is not an exact multiple of nr, the last
+ column is padded with zeros.
+
+
[nr, nc]
+ -
+ Read up to
nr * nc
elements, returning a matrix with
+ nr rows. If the number of elements read is not an exact multiple
+ of nr, the last column is padded with zeros.
+
+
+
+ If size is omitted, a value of Inf
is assumed.
+
+
+
+ The optional argument precision is a string specifying the type of
+ data to read and may be one of
+
+
+
+
+ "char"
+ -
+
"char*1"
+ -
+
"integer*1"
+ -
+
"int8"
+ -
+ Single character.
+
+
"signed char"
+ -
+
"schar"
+ -
+ Signed character.
+
+
"unsigned char"
+ -
+
"uchar"
+ -
+ Unsigned character.
+
+
"short"
+ -
+ Short integer.
+
+
"unsigned short"
+ -
+
"ushort"
+ -
+ Unsigned short integer.
+
+
"int"
+ -
+ Integer.
+
+
"unsigned int"
+ -
+
"uint"
+ -
+ Unsigned integer.
+
+
"long"
+ -
+ Long integer.
+
+
"unsigned long"
+ -
+
"ulong"
+ -
+ Unsigned long integer.
+
+
"float"
+ -
+
"float32"
+ -
+
"real*4"
+ -
+ Single precision float.
+
+
"double"
+ -
+
"float64"
+ -
+
"real*8"
+ -
+ Double precision float.
+
+
"integer*2"
+ -
+
"int16"
+ -
+ Two byte integer.
+
+
"integer*4"
+ -
+
"int32"
+ -
+ Four byte integer.
+
+
+
+ The default precision is "uchar"
.
+
+
+
+ The optional argument skip specifies the number of bytes to skip
+ before each element is read. If it is not specified, a value of 0 is
+ assumed.
+
+
+
+ The optional argument arch is a string specifying the data format
+ for the file. Valid values are
+
+
+
+
+ "native"
+ -
+ The format of the current machine.
+
+
"ieee-le"
+ -
+ IEEE big endian.
+
+
"ieee-be"
+ -
+ IEEE little endian.
+
+
"vaxd"
+ -
+ VAX D floating format.
+
+
"vaxg"
+ -
+ VAX G floating format.
+
+
"cray"
+ -
+ Cray floating format.
+
+
+
+ Conversions are currently only supported for "ieee-be"
and
+ "ieee-le"
formats.
+
+
+
+ The data read from the file is returned in val, and the number of
+ values read is returned in count
+
+
+
+
+
+ - Built-in Function: count = fwrite (fid, data, precision, skip, arch)
+
-
+ Write data in binary form of type precision to the specified file
+ ID fid, returning the number of values successfully written to the
+ file.
+
+
+
+ The argument data is a matrix of values that are to be written to
+ the file. The values are extracted in column-major order.
+
+
+
+ The remaining arguments precision, skip, and arch are
+ optional, and are interpreted as described for fread
.
+
+
+
+ The behavior of fwrite
is undefined if the values in data
+ are too large to fit in the specified precision.
+
+
+
+
+
+
+
+
+
+ - Built-in Function: tmpnam ()
+
-
+ Return a unique temporary file name as a string.
+
+
+
+ Since the named file is not opened, by tmpnam
, it
+ is possible (though relatively unlikely) that it will not be available
+ by the time your program attempts to open it.
+
+
+
+
+
+
+
+
+
+ - Built-in Function: feof (fid)
+
-
+ Return 1 if an end-of-file condition has been encountered for a given
+ file and 0 otherwise. Note that it will only return 1 if the end of the
+ file has already been encountered, not if the next read operation will
+ result in an end-of-file condition.
+
+
+
+
+
+ - Built-in Function: ferror (fid)
+
-
+ Return 1 if an error condition has been encountered for a given file
+ and 0 otherwise. Note that it will only return 1 if an error has
+ already been encountered, not if the next operation will result in an
+ error condition.
+
+
+
+
+
+ - Built-in Function: freport ()
+
-
+ Print a list of which files have been opened, and whether they are open
+ for reading, writing, or both. For example,
+
+
+
+
+ freport ()
+
+ -| number mode name
+ -|
+ -| 0 r stdin
+ -| 1 w stdout
+ -| 2 w stderr
+ -| 3 r myfile
+
+
+
+
+
+
+
+
+
+ Three functions are available for setting and determining the position of
+ the file pointer for a given file.
+
+
+
+
+ - Built-in Function: ftell (fid)
+
-
+ Return the position of the file pointer as the number of characters
+ from the beginning of the file fid.
+
+
+
+
+
+ - Built-in Function: fseek (fid, offset, origin)
+
-
+ Set the file pointer to any location within the file fid. The
+ pointer is positioned offset characters from the origin,
+ which may be one of the predefined variables
SEEK_CUR
(current
+ position), SEEK_SET
(beginning), or SEEK_END
(end of
+ file). If origin is omitted, SEEK_SET
is assumed. The
+ offset must be zero, or a value returned by ftell
(in which case
+ origin must be SEEK_SET
.
+
+
+
+
+
+ - Built-in Variable: SEEK_SET
+
-
+
- Built-in Variable: SEEK_CUR
+
-
+
- Built-in Variable: SEEK_END
+
-
+ These variables may be used as the optional third argument for the
+ function
fseek
.
+
+
+
+
+
+ - Built-in Function: frewind (fid)
+
-
+ Move the file pointer to the beginning of the file fid, returning
+ 1 for success, and 0 if an error was encountered. It is equivalent to
+
fseek (fid, 0, SEEK_SET)
.
+
+
+
+
+ The following example stores the current file position in the variable
+ marker
, moves the pointer to the beginning of the file, reads
+ four characters, and then returns to the original position.
+
+
+
+
+ marker = ftell (myfile);
+ frewind (myfile);
+ fourch = fgets (myfile, 4);
+ fseek (myfile, marker, SEEK_SET);
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_15.html octave-2.0.14/doc/interpreter/octave_15.html
*** octave-2.0.13/doc/interpreter/octave_15.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_15.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,1027 ----
+
+
+
+
+ GNU Octave - Plotting
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ All of Octave's plotting functions use gnuplot
to handle the
+ actual graphics. There are two low-level functions, gplot
and
+ gsplot
, that behave almost exactly like the corresponding
+ gnuplot
functions plot
and splot
. A number of
+ other higher level plotting functions, patterned after the graphics
+ functions found in MATLAB version 3.5, are also available.
+ These higher level functions are all implemented in terms of the two
+ low-level plotting functions.
+
+
+
+
+
+
+
+
+
+ - Command: gplot ranges expression using title style
+
-
+ Generate a 2-dimensional plot.
+
+
+
+ The ranges, using, title, and style arguments
+ are optional, and the using, title and style
+ qualifiers may appear in any order after the expression. You may plot
+ multiple expressions with a single command by separating them with
+ commas. Each expression may have its own set of qualifiers.
+
+
+
+ The optional item ranges has the syntax
+
+
+
+
+ [ x_lo : x_up ] [ y_lo : y_up ]
+
+
+
+ and may be used to specify the ranges for the axes of the plot,
+ independent of the actual range of the data. The range for the y axes
+ and any of the individual limits may be omitted. A range [:]
+ indicates that the default limits should be used. This normally means
+ that a range just large enough to include all the data points will be
+ used.
+
+
+
+ The expression to be plotted must not contain any literal matrices
+ (e.g. [ 1, 2; 3, 4 ]
) since it is nearly impossible to
+ distinguish a plot range from a matrix of data.
+
+
+
+ See the help for gnuplot
for a description of the syntax for the
+ optional items.
+
+
+
+ By default, the gplot
command plots the second column of a matrix
+ versus the first. If the matrix only has one column, it is taken as a
+ vector of y-coordinates and the x-coordinate is taken as the element
+ index, starting with zero. For example,
+
+
+
+
+ gplot rand (100,1) with linespoints
+
+
+
+ will plot 100 random values and connect them with lines. When
+ gplot
is used to plot a column vector, the indices of the
+ elements are taken as x values.
+
+
+
+ If there are more than two columns, you can
+ choose which columns to plot with the using qualifier. For
+ example, given the data
+
+
+
+
+ x = (-10:0.1:10)';
+ data = [x, sin(x), cos(x)];
+
+
+
+ the command
+
+
+
+
+ gplot [-11:11] [-1.1:1.1] \
+ data with lines, data using 1:3 with impulses
+
+
+
+ will plot two lines. The first line is generated by the command
+ data with lines
, and is a graph of the sine function over the
+ range -10 to 10. The data is taken from the first two columns of
+ the matrix because columns to plot were not specified with the
+ using qualifier.
+
+
+
+ The clause using 1:3
in the second part of this plot command
+ specifies that the first and third columns of the matrix data
+ should be taken as the values to plot.
+
+
+
+ In this example, the ranges have been explicitly specified to be a bit
+ larger than the actual range of the data so that the curves do not touch
+ the border of the plot.
+
+
+
+
+
+ - Command: gset options
+
-
+
- Command: gshow options
+
-
+
- Command: replot options
+
-
+ In addition to the basic plotting commands, the whole range of
+
gset
and gshow
commands from gnuplot
are available,
+ as is replot
.
+
+
+
+
+
+ Note that in Octave 2.0, the set
and show
commands were
+ renamed to gset
and gshow
in order to allow for
+ compatibility with the MATLAB graphics and GUI commands in a future
+ version of Octave. (For now, the old set
and show
+ commands do work, but they print an annoying warning message to try to
+ get people to switch to using gset
and gshow
.)
+
+
+
+ The gset
and gshow
commands allow you to set and show
+ gnuplot
parameters. For more information about the gset
+ and gshow
commands, see the documentation for set
and
+ show
in the gnuplot
user's guide (also available on line
+ if you run gnuplot
directly, instead of running it from Octave).
+
+
+
+ The replot
command allows you to force the plot to be
+ redisplayed. This is useful if you have changed something about the
+ plot, such as the title or axis labels. The replot
command also
+ accepts the same arguments as gplot
or gsplot
(except for
+ data ranges) so you can add additional lines to existing plots.
+
+
+
+ For example,
+
+
+
+
+ gset term tek40
+ gset output "/dev/plotter"
+ gset title "sine with lines and cosine with impulses"
+ replot "sin (x) w l"
+
+
+
+ will change the terminal type for plotting, add a title to the current
+ plot, add a graph of
+ to the plot, and force the new plot to be
+ sent to the plot device. This last step is normally required in order
+ to update the plot. This default is reasonable for slow terminals or
+ hardcopy output devices because even when you are adding additional
+ lines with a replot command, gnuplot always redraws the entire plot, and
+ you probably don't want to have a completely new plot generated every
+ time something as minor as an axis label changes.
+
+
+
+
+ The command shg
is equivalent to executing replot
without
+ any arguments.
+
+
+
+
+
+ - Built-in Variable: automatic_replot
+
-
+ You can tell Octave to redisplay the plot each time anything about it
+ changes by setting the value of the builtin variable
+
automatic_replot
to a nonzero value. Since this is fairly
+ inefficient, the default value is 0.
+
+
+
+
+ Note that NaN values in the plot data are automatically omitted, and
+ Inf values are converted to a very large value before calling gnuplot.
+
+
+
+
+ The MATLAB-style two-dimensional plotting commands are:
+
+
+
+
+
+
+
+
+
+ - Function File: plot (args)
+
-
+ This function produces two-dimensional plots. Many different
+ combinations of arguments are possible. The simplest form is
+
+
+
+
+ plot (y)
+
+
+
+ where the argument is taken as the set of y coordinates and the
+ x coordinates are taken to be the indices of the elements,
+ starting with 1.
+
+
+
+ If more than one argument is given, they are interpreted as
+
+
+
+
+ plot (x, y, fmt ...)
+
+
+
+ where y and fmt are optional, and any number of argument
+ sets may appear. The x and y values are
+ interpreted as follows:
+
+
+
+
+ -
+
+ If a single data argument is supplied, it is taken as the set of y
+ coordinates and the x coordinates are taken to be the indices of
+ the elements, starting with 1.
+
+
-
+
+ If the first argument is a vector and the second is a matrix, the
+ the vector is plotted versus the columns (or rows) of the matrix.
+ (using whichever combination matches, with columns tried first.)
+
+
-
+
+ If the first argument is a matrix and the second is a vector, the
+ the columns (or rows) of the matrix are plotted versus the vector.
+ (using whichever combination matches, with columns tried first.)
+
+
-
+
+ If both arguments are vectors, the elements of y are plotted versus
+ the elements of x.
+
+
-
+
+ If both arguments are matrices, the columns of y are plotted
+ versus the columns of x. In this case, both matrices must have
+ the same number of rows and columns and no attempt is made to transpose
+ the arguments to make the number of rows match.
+
+ If both arguments are scalars, a single point is plotted.
+
+
+
+ The fmt argument, if present is interpreted as follows. If
+ fmt is missing, the default gnuplot line style is assumed.
+
+
+
+
+ - `-'
+
-
+ Set lines plot style (default).
+
+
- `.'
+
-
+ Set dots plot style.
+
+
- `@'
+
-
+ Set points plot style.
+
+
- `-@'
+
-
+ Set linespoints plot style.
+
+
- `^'
+
-
+ Set impulses plot style.
+
+
- `L'
+
-
+ Set steps plot style.
+
+
- `#'
+
-
+ Set boxes plot style.
+
+
- `~'
+
-
+ Set errorbars plot style.
+
+
- `#~'
+
-
+ Set boxerrorbars plot style.
+
+
- `n'
+
-
+ Interpreted as the plot color if n is an integer in the range 1 to
+ 6.
+
+
- `nm'
+
-
+ If nm is a two digit integer and m is an integer in the
+ range 1 to 6, m is interpreted as the point style. This is only
+ valid in combination with the
@
or -@
specifiers.
+
+ - `c'
+
-
+ If c is one of
"r"
, "g"
, "b"
, "m"
,
+ "c"
, or "w"
, it is interpreted as the plot color (red,
+ green, blue, magenta, cyan, or white).
+
+ - `+'
+
-
+
- `*'
+
-
+
- `o'
+
-
+
- `x'
+
-
+ Used in combination with the points or linespoints styles, set the point
+ style.
+
+
+
+ The color line styles have the following meanings on terminals that
+ support color.
+
+
+
+
+ Number Gnuplot colors (lines)points style
+ 1 red *
+ 2 green +
+ 3 blue o
+ 4 magenta x
+ 5 cyan house
+ 6 brown there exists
+
+
+
+ Here are some plot examples:
+
+
+
+
+ plot (x, y, "@12", x, y2, x, y3, "4", x, y4, "+")
+
+
+
+ This command will plot y
with points of type 2 (displayed as
+ `+') and color 1 (red), y2
with lines, y3
with lines of
+ color 4 (magenta) and y4
with points displayed as `+'.
+
+
+
+
+ plot (b, "*")
+
+
+
+ This command will plot the data in the variable b
will be plotted
+ with points displayed as `*'.
+
+
+
+
+
+ - Function File: hold args
+
-
+ Tell Octave to `hold' the current data on the plot when executing
+ subsequent plotting commands. This allows you to execute a series of
+ plot commands and have all the lines end up on the same figure. The
+ default is for each new plot command to clear the plot device first.
+ For example, the command
+
+
+
+
+ hold on
+
+
+
+ turns the hold state on. An argument of off
turns the hold state
+ off, and hold
with no arguments toggles the current hold state.
+
+
+
+
+
+ - Function File: ishold
+
-
+ Return 1 if the next line will be added to the current plot, or 0 if
+ the plot device will be cleared before drawing the next line.
+
+
+
+
+
+ - Function File: clearplot
+
-
+
- Function File: clg
+
-
+ Clear the plot window and any titles or axis labels. The name
+
clg
is aliased to clearplot
for compatibility with MATLAB.
+
+
+
+ The commands gplot clear, gsplot clear, and replot
+ clear are equivalent to clearplot
. (Previously, commands like
+ gplot clear would evaluate clear
as an ordinary expression
+ and clear all the visible variables.)
+
+
+
+
+
+ - Function File: closeplot
+
-
+ Close stream to the
gnuplot
subprocess. If you are using X11,
+ this will close the plot window.
+
+
+
+
+
+ - Function File: purge_tmp_files
+
-
+ Delete the temporary files created by the plotting commands.
+
+
+
+ Octave creates temporary data files for gnuplot
and then sends
+ commands to gnuplot
through a pipe. Octave will delete the
+ temporary files on exit, but if you are doing a lot of plotting you may
+ want to clean up in the middle of a session.
+
+
+
+ A future version of Octave will eliminate the need to use temporary
+ files to hold the plot data.
+
+
+
+
+
+ - Function File: axis (limits)
+
-
+ Sets the axis limits for plots.
+
+
+
+ The argument limits should be a 2, 4, or 6 element vector. The
+ first and second elements specify the lower and upper limits for the x
+ axis. The third and fourth specify the limits for the y axis, and the
+ fifth and sixth specify the limits for the z axis.
+
+
+
+ With no arguments, axis
turns autoscaling on.
+
+
+
+ If your plot is already drawn, then you need to use replot
before
+ the new axis limits will take effect. You can get this to happen
+ automatically by setting the built-in variable automatic_replot
+ to a nonzero value.
+
+
+
+
+
+
+
+
+
+ - Function File: bar (x, y)
+
-
+ Given two vectors of x-y data,
bar
produces a bar graph.
+
+
+
+ If only one argument is given, it is taken as a vector of y-values
+ and the x coordinates are taken to be the indices of the elements.
+
+
+
+ If two output arguments are specified, the data are generated but
+ not plotted. For example,
+
+
+
+
+ bar (x, y);
+
+
+
+ and
+
+
+
+
+ [xb, yb] = bar (x, y);
+ plot (xb, yb);
+
+
+
+ are equivalent.
+
+
+
+
+
+ - Function File: contour (z, n, x, y)
+
-
+ Make a contour plot of the three-dimensional surface described by
+ z. Someone needs to improve
gnuplot
's contour routines
+ before this will be very useful.
+
+
+
+
+
+ - Function File: hist (y, x)
+
-
+ Produce histogram counts or plots.
+
+
+
+ With one vector input argument, plot a histogram of the values with
+ 10 bins. The range of the histogram bins is determined by the range
+ of the data.
+
+
+
+ Given a second scalar argument, use that as the number of bins.
+
+
+
+ Given a second vector argument, use that as the centers of the bins,
+ with the width of the bins determined from the adjacent values in
+ the vector.
+
+
+
+ Extreme values are lumped in the first and last bins.
+
+
+
+ With two output arguments, produce the values nn and xx such
+ that bar (xx, nn)
will plot the histogram.
+
+
+
+
+
+ - Function File: loglog (args)
+
-
+ Make a two-dimensional plot using log scales for both axes. See the
+ description of
plot
above for a description of the arguments that
+ loglog
will accept.
+
+
+
+
+
+ - Function File: polar (theta, rho)
+
-
+ Make a two-dimensional plot given polar the coordinates theta and
+ rho.
+
+
+
+
+
+ - Function File: semilogx (args)
+
-
+ Make a two-dimensional plot using a log scale for the x axis. See
+ the description of
plot
above for a description of the arguments
+ that semilogx
will accept.
+
+
+
+
+
+ - Function File: semilogy (args)
+
-
+ Make a two-dimensional plot using a log scale for the y axis. See
+ the description of
plot
above for a description of the arguments
+ that semilogy
will accept.
+
+
+
+
+
+ - Function File: stairs (x, y)
+
-
+ Given two vectors of x-y data, bar produces a `stairstep' plot.
+
+
+
+ If only one argument is given, it is taken as a vector of y-values
+ and the x coordinates are taken to be the indices of the elements.
+
+
+
+ If two output arguments are specified, the data are generated but
+ not plotted. For example,
+
+
+
+
+ stairs (x, y);
+
+
+
+ and
+
+
+
+
+ [xs, ys] = stairs (x, y);
+ plot (xs, ys);
+
+
+
+ are equivalent.
+
+
+
+
+
+
+
+
+
+ - Command: gsplot ranges expression using title style
+
-
+ Generate a 3-dimensional plot.
+
+
+
+ The ranges, using, title, and style arguments
+ are optional, and the using, title and style
+ qualifiers may appear in any order after the expression. You may plot
+ multiple expressions with a single command by separating them with
+ commas. Each expression may have its own set of qualifiers.
+
+
+
+ The optional item ranges has the syntax
+
+
+
+
+ [ x_lo : x_up ] [ y_lo : y_up ] [ z_lo : z_up ]
+
+
+
+ and may be used to specify the ranges for the axes of the plot,
+ independent of the actual range of the data. The range for the y and z
+ axes and any of the individual limits may be omitted. A range
+ [:]
indicates that the default limits should be used. This
+ normally means that a range just large enough to include all the data
+ points will be used.
+
+
+
+ The expression to be plotted must not contain any literal matrices (e.g.
+ [ 1, 2; 3, 4 ]
) since it is nearly impossible to distinguish a
+ plot range from a matrix of data.
+
+
+
+ See the help for gnuplot
for a description of the syntax for the
+ optional items.
+
+
+
+ By default, the gsplot
command plots each column of the
+ expression as the z value, using the row index as the x value, and the
+ column index as the y value. The indices are counted from zero, not
+ one. For example,
+
+
+
+
+ gsplot rand (5, 2)
+
+
+
+ will plot a random surface, with the x and y values taken from the row
+ and column indices of the matrix.
+
+
+
+ If parametric plotting mode is set (using the command
+ gset parametric, then gsplot
takes the columns of the
+ matrix three at a time as the x, y and z values that define a line in
+ three space. Any extra columns are ignored, and the x and y values are
+ expected to be sorted. For example, with parametric
set, it
+ makes sense to plot a matrix like
+
+
+
+ but not rand (5, 30)
.
+
+
+
+
+ The MATLAB-style three-dimensional plotting commands are:
+
+
+
+
+ - Function File: mesh (x, y, z)
+
-
+ Plot a mesh given matrices
x
, and y from meshdom
and
+ a matrix z corresponding to the x and y coordinates of
+ the mesh.
+
+
+
+
+
+ - Function File: meshdom (x, y)
+
-
+ Given vectors of x and y coordinates, return two matrices
+ corresponding to the x and y coordinates of the mesh.
+
+
+
+ See the file `sombrero.m' for an example of using mesh
and
+ meshdom
.
+
+
+
+
+
+ - Built-in Variable: gnuplot_binary
+
-
+ The name of the program invoked by the plot command. The default value
+ is
"gnuplot"
. See section Installing Octave.
+
+
+
+
+
+ - Built-in Variable: gnuplot_has_frames
+
-
+ If the value of this variable is nonzero, Octave assumes that your copy
+ of gnuplot has support for multiple frames that is included in recent
+ 3.6beta releases. It's initial value is determined by configure, but it
+ can be changed in your startup script or at the command line in case
+ configure got it wrong, or if you upgrade your gnuplot installation.
+
+
+
+
+
+ - Function File: figure (n)
+
-
+ Set the current plot window to plot window n. This function
+ currently requires X11 and a version of gnuplot that supports multiple
+ frames.
+
+
+
+
+
+ - Built-in Variable: gnuplot_has_multiplot
+
-
+ If the value of this variable is nonzero, Octave assumes that your copy
+ of gnuplot has the multiplot support that is included in recent
+ 3.6beta releases. It's initial value is determined by configure, but it
+ can be changed in your startup script or at the command line in case
+ configure got it wrong, or if you upgrade your gnuplot installation.
+
+
+
+
+
+
+
+
+
+ - Function File: grid
+
-
+ For two-dimensional plotting, force the display of a grid on the plot.
+
+
+
+
+
+ - Function File: title (string)
+
-
+ Specify a title for the plot. If you already have a plot displayed, use
+ the command
replot
to redisplay it with the new title.
+
+
+
+
+
+ - Function File: xlabel (string)
+
-
+
- Function File: ylabel (string)
+
-
+
- Function File: zlabel (string)
+
-
+ Specify x, y, and z axis labels for the plot. If you already have a plot
+ displayed, use the command
replot
to redisplay it with the new
+ labels.
+
+
+
+
+
+
+
+
+ The following functions all require a version of gnuplot
that
+ supports the multiplot feature.
+
+
+
+
+ - Function File: mplot (x, y)
+
-
+
- Function File: mplot (x, y, fmt)
+
-
+
- Function File: mplot (x1, y1, x2, y2)
+
-
+ This is a modified version of the
plot
function that works with
+ the multiplot version of gnuplot
to plot multiple plots per page.
+ This plot version automatically advances to the next subplot position
+ after each set of arguments are processed.
+
+
+
+ See the description of the plot function for the various options.
+
+
+
+
+
+ - Function File: multiplot (xn, yn)
+
-
+ Sets and resets multiplot mode.
+
+
+
+ If the arguments are non-zero, multiplot
will set up multiplot
+ mode with xn, yn subplots along the x and y
+ axes. If both arguments are zero, multiplot
closes multiplot
+ mode.
+
+
+
+
+
+ - Function File: oneplot ()
+
-
+ If in multiplot mode, switches to single plot mode.
+
+
+
+
+
+ - Function File: plot_border (...)
+
-
+ Multiple arguments allowed to specify the sides on which the border
+ is shown. Allowed arguments include:
+
+
+
+
+ "blank"
+ -
+ No borders displayed.
+
+
"all"
+ -
+ All borders displayed
+
+
"north"
+ -
+ North Border
+
+
"south"
+ -
+ South Border
+
+
"east"
+ -
+ East Border
+
+
"west"
+ -
+ West Border
+
+
+
+ The arguments may be abbreviated to single characters. Without any
+ arguments, plot_border
turns borders off.
+
+
+
+
+
+ - Function File: subplot (rows, cols, index)
+
-
+
- Function File: subplot (rcn)
+
-
+ Sets
gnuplot
in multiplot mode and plots in location
+ given by index (there are cols by rows subwindows).
+
+
+
+ Input:
+
+
+
+
+ - rows
+
-
+ Number of rows in subplot grid.
+
+
- columns
+
-
+ Number of columns in subplot grid.
+
+
- index
+
-
+ Index of subplot where to make the next plot.
+
+
+
+ If only one argument is supplied, then it must be a three digit value
+ specifying the location in digits 1 (rows) and 2 (columns) and the plot
+ index in digit 3.
+
+
+
+ The plot index runs row-wise. First all the columns in a row are filled
+ and then the next row is filled.
+
+
+
+ For example, a plot with 4 by 2 grid will have plot indices running as
+ follows:
+
+
+
+
+
+ - Function File: subwindow (xn, yn)
+
-
+ Sets the subwindow position in multiplot mode for the next plot. The
+ multiplot mode has to be previously initialized using the
+
multiplot
function, otherwise this command just becomes an alias
+ to multiplot
+
+
+
+
+
+ - Function File: top_title (string)
+
-
+
- Function File: bottom_title (string)
+
-
+ Makes a title with text string at the top (bottom) of the plot.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_16.html octave-2.0.14/doc/interpreter/octave_16.html
*** octave-2.0.13/doc/interpreter/octave_16.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_16.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,862 ----
+
+
+
+
+ GNU Octave - Matrix Manipulation
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ There are a number of functions available for checking to see if the
+ elements of a matrix meet some condition, and for rearranging the
+ elements of a matrix. For example, Octave can easily tell you if all
+ the elements of a matrix are finite, or are less than some specified
+ value. Octave can also rotate the elements, extract the upper- or
+ lower-triangular parts, or sort the columns of a matrix.
+
+
+
+
+
+
+
+
+ The functions any
and all
are useful for determining
+ whether any or all of the elements of a matrix satisfy some condition.
+ The find
function is also useful in determining which elements of
+ a matrix meet a specified condition.
+
+
+
+
+ - Built-in Function: any (x)
+
-
+ For a vector argument, return 1 if any element of the vector is
+ nonzero.
+
+
+
+ For a matrix argument, return a row vector of ones and
+ zeros with each element indicating whether any of the elements of the
+ corresponding column of the matrix are nonzero. For example,
+
+
+
+
+ any (eye (2, 4))
+ => [ 1, 1, 0, 0 ]
+
+
+
+ To see if any of the elements of a matrix are nonzero, you can use a
+ statement like
+
+
+
+
+ any (any (a))
+
+
+
+
+
+
+ - Built-in Function: all (x)
+
-
+ The function
all
behaves like the function any
, except
+ that it returns true only if all the elements of a vector, or all the
+ elements in a column of a matrix, are nonzero.
+
+
+
+
+ Since the comparison operators (see section Comparison Operators) return matrices
+ of ones and zeros, it is easy to test a matrix for many things, not just
+ whether the elements are nonzero. For example,
+
+
+
+
+ all (all (rand (5) < 0.9))
+ => 0
+
+
+
+ tests a random 5 by 5 matrix to see if all of it's elements are less
+ than 0.9.
+
+
+
+ Note that in conditional contexts (like the test clause of if
and
+ while
statements) Octave treats the test as if you had typed
+ all (all (condition))
.
+
+
+
+
+ - Function File: [err, y1, ...] = common_size (x1, ...)
+
-
+ Determine if all input arguments are either scalar or of common
+ size. If so, err is zero, and yi is a matrix of the
+ common size with all entries equal to xi if this is a scalar or
+ xi otherwise. If the inputs cannot be brought to a common size,
+ errorcode is 1, and yi is xi. For example,
+
+
+
+
+ [errorcode, a, b] = common_size ([1 2; 3 4], 5)
+ => errorcode = 0
+ => a = [ 1, 2; 3, 4 ]
+ => b = [ 5, 5; 5, 5 ]
+
+
+
+ This is useful for implementing functions where arguments can either
+ be scalars or of common size.
+
+
+
+
+
+ - Function File: diff (x, k)
+
-
+ If x is a vector of length n,
diff (x)
is the
+ vector of first differences
+
+
+
+ If x is a matrix, diff (x)
is the matrix of column
+ differences.
+
+
+
+ The second argument is optional. If supplied, diff (x,
+ k)
, where k is a nonnegative integer, returns the
+ k-th differences.
+
+
+
+
+
+ - Mapping Function: isinf (x)
+
-
+ Return 1 for elements of x that are infinite and zero
+ otherwise. For example,
+
+
+
+
+ isinf ([13, Inf, NaN])
+ => [ 0, 1, 0 ]
+
+
+
+
+
+
+ - Mapping Function: isnan (x)
+
-
+ Return 1 for elements of x that are NaN values and zero
+ otherwise. For example,
+
+
+
+
+ isnan ([13, Inf, NaN])
+ => [ 0, 0, 1 ]
+
+
+
+
+
+
+ - Mapping Function: finite (x)
+
-
+ Return 1 for elements of x that are NaN values and zero
+ otherwise. For example,
+
+
+
+
+ finite ([13, Inf, NaN])
+ => [ 1, 0, 0 ]
+
+
+
+
+
+
+ - Loadable Function: find (x)
+
-
+ Return a vector of indices of nonzero elements of a matrix. To obtain a
+ single index for each matrix element, Octave pretends that the columns
+ of a matrix form one long vector (like Fortran arrays are stored). For
+ example,
+
+
+
+
+ find (eye (2))
+ => [ 1; 4 ]
+
+
+
+ If two outputs are requested, find
returns the row and column
+ indices of nonzero elements of a matrix. For example,
+
+
+
+
+ [i, j] = find (2 * eye (2))
+ => i = [ 1; 2 ]
+ => j = [ 1; 2 ]
+
+
+
+ If three outputs are requested, find
also returns a vector
+ containing the nonzero values. For example,
+
+
+
+
+ [i, j, v] = find (3 * eye (2))
+ => i = [ 1; 2 ]
+ => j = [ 1; 2 ]
+ => v = [ 3; 3 ]
+
+
+
+
+
+
+
+
+
+
+
+ - Function File: fliplr (x)
+
-
+ Return a copy of x with the order of the columns reversed. For
+ example,
+
+
+
+
+ fliplr ([1, 2; 3, 4])
+ => 2 1
+ 4 3
+
+
+
+
+
+
+ - Function File: flipud (x)
+
-
+ Return a copy of x with the order of the rows reversed. For
+ example,
+
+
+
+
+ flipud ([1, 2; 3, 4])
+ => 3 4
+ 1 2
+
+
+
+
+
+
+ - Function File: rot90 (x, n)
+
-
+ Return a copy of x with the elements rotated counterclockwise in
+ 90-degree increments. The second argument is optional, and specifies
+ how many 90-degree rotations are to be applied (the default value is 1).
+ Negative values of n rotate the matrix in a clockwise direction.
+ For example,
+
+
+
+
+ rot90 ([1, 2; 3, 4], -1)
+ => 3 1
+ 4 2
+
+
+
+ rotates the given matrix clockwise by 90 degrees. The following are all
+ equivalent statements:
+
+
+
+
+ rot90 ([1, 2; 3, 4], -1)
+ ==
+ rot90 ([1, 2; 3, 4], 3)
+ ==
+ rot90 ([1, 2; 3, 4], 7)
+
+
+
+
+
+
+ - Function File: reshape (a, m, n)
+
-
+ Return a matrix with m rows and n columns whose elements are
+ taken from the matrix a. To decide how to order the elements,
+ Octave pretends that the elements of a matrix are stored in column-major
+ order (like Fortran arrays are stored).
+
+
+
+ For example,
+
+
+
+
+ reshape ([1, 2, 3, 4], 2, 2)
+ => 1 3
+ 2 4
+
+
+
+ If the variable do_fortran_indexing
is nonzero, the
+ reshape
function is equivalent to
+
+
+
+
+ retval = zeros (m, n);
+ retval (:) = a;
+
+
+
+ but it is somewhat less cryptic to use reshape
instead of the
+ colon operator. Note that the total number of elements in the original
+ matrix must match the total number of elements in the new matrix.
+
+
+
+
+
+ - Function File: shift (x, b)
+
-
+ If x is a vector, perform a circular shift of length b of
+ the elements of x.
+
+
+
+ If x is a matrix, do the same for each column of x.
+
+
+
+
+
+ - Loadable Function: [s, i] = sort (x)
+
-
+ Return a copy of x with the elements elements arranged in
+ increasing order. For matrices,
sort
orders the elements in each
+ column.
+
+
+
+ For example,
+
+
+
+
+ sort ([1, 2; 2, 3; 3, 1])
+ => 1 1
+ 2 2
+ 3 3
+
+
+
+ The sort
function may also be used to produce a matrix
+ containing the original row indices of the elements in the sorted
+ matrix. For example,
+
+
+
+
+ [s, i] = sort ([1, 2; 2, 3; 3, 1])
+ => s = 1 1
+ 2 2
+ 3 3
+ => i = 1 3
+ 2 1
+ 3 2
+
+
+
+
+
+ Since the sort
function does not allow sort keys to be specified,
+ it can't be used to order the rows of a matrix according to the values
+ of the elements in various columns(6)
+ in a single call. Using the second output, however, it is possible to
+ sort all rows based on the values in a given column. Here's an example
+ that sorts the rows of a matrix based on the values in the second
+ column.
+
+
+
+
+ a = [1, 2; 2, 3; 3, 1];
+ [s, i] = sort (a (:, 2));
+ a (i, :)
+ => 3 1
+ 1 2
+ 2 3
+
+
+
+
+ - Function File: tril (a, k)
+
-
+
- Function File: triu (a, k)
+
-
+ Return a new matrix formed by extracting extract the lower (
tril
)
+ or upper (triu
) triangular part of the matrix a, and
+ setting all other elements to zero. The second argument is optional,
+ and specifies how many diagonals above or below the main diagonal should
+ also be set to zero.
+
+
+
+ The default value of k is zero, so that triu
and
+ tril
normally include the main diagonal as part of the result
+ matrix.
+
+
+
+ If the value of k is negative, additional elements above (for
+ tril
) or below (for triu
) the main diagonal are also
+ selected.
+
+
+
+ The absolute value of k must not be greater than the number of
+ sub- or super-diagonals.
+
+
+
+ For example,
+
+
+
+
+ tril (ones (3), -1)
+ => 0 0 0
+ 1 0 0
+ 1 1 0
+
+
+
+ and
+
+
+
+
+ tril (ones (3), 1)
+ => 1 1 0
+ 1 1 1
+ 1 1 1
+
+
+
+
+
+
+ - Function File: vec (x)
+
-
+ Return the vector obtained by stacking the columns of the matrix x
+ one above the other.
+
+
+
+
+
+ - Function File: vech (x)
+
-
+ Return the vector obtained by eliminating all supradiagonal elements of
+ the square matrix x and stacking the result one column above the
+ other.
+
+
+
+
+
+
+
+
+
+ - Built-in Function: eye (x)
+
-
+
- Built-in Function: eye (n, m)
+
-
+ Return an identity matrix. If invoked with a single scalar argument,
+
eye
returns a square matrix with the dimension specified. If you
+ supply two scalar arguments, eye
takes them to be the number of
+ rows and columns. If given a vector with two elements, eye
uses
+ the values of the elements as the number of rows and columns,
+ respectively. For example,
+
+
+
+
+ eye (3)
+ => 1 0 0
+ 0 1 0
+ 0 0 1
+
+
+
+ The following expressions all produce the same result:
+
+
+
+
+ eye (2)
+ ==
+ eye (2, 2)
+ ==
+ eye (size ([1, 2; 3, 4])
+
+
+
+ For compatibility with MATLAB, calling eye
with no arguments
+ is equivalent to calling it with an argument of 1.
+
+
+
+
+
+ - Built-in Function: ones (x)
+
-
+
- Built-in Function: ones (n, m)
+
-
+ Return a matrix whose elements are all 1. The arguments are handled
+ the same as the arguments for
eye
.
+
+
+
+ If you need to create a matrix whose values are all the same, you should
+ use an expression like
+
+
+
+
+ val_matrix = val * ones (n, m)
+
+
+
+
+
+
+ - Built-in Function: zeros (x)
+
-
+
- Built-in Function: zeros (n, m)
+
-
+ Return a matrix whose elements are all 0. The arguments are handled
+ the same as the arguments for
eye
.
+
+
+
+
+
+ - Loadable Function: rand (x)
+
-
+
- Loadable Function: rand (n, m)
+
-
+
- Loadable Function: rand (
"seed"
, x)
+ -
+ Return a matrix with random elements uniformly distributed on the
+ interval (0, 1). The arguments are handled the same as the arguments
+ for
eye
. In
+ addition, you can set the seed for the random number generator using the
+ form
+
+
+
+
+ rand ("seed", x)
+
+
+
+ where x is a scalar value. If called as
+
+
+
+
+ rand ("seed")
+
+
+
+ rand
returns the current value of the seed.
+
+
+
+
+
+ - Loadable Function: randn (x)
+
-
+
- Loadable Function: randn (n, m)
+
-
+
- Loadable Function: randn (
"seed"
, x)
+ -
+ Return a matrix with normally distributed random elements. The
+ arguments are handled the same as the arguments for
eye
. In
+ addition, you can set the seed for the random number generator using the
+ form
+
+
+
+
+ randn ("seed", x)
+
+
+
+ where x is a scalar value. If called as
+
+
+
+
+ randn ("seed")
+
+
+
+ randn
returns the current value of the seed.
+
+
+
+
+ The rand
and randn
functions use separate generators.
+ This ensures that
+
+
+
+
+ rand ("seed", 13);
+ randn ("seed", 13);
+ u = rand (100, 1);
+ n = randn (100, 1);
+
+
+
+ and
+
+
+
+
+ rand ("seed", 13);
+ randn ("seed", 13);
+ u = zeros (100, 1);
+ n = zeros (100, 1);
+ for i = 1:100
+ u(i) = rand ();
+ n(i) = randn ();
+ end
+
+
+
+ produce equivalent results.
+
+
+
+ Normally, rand
and randn
obtain their initial
+ seeds from the system clock, so that the sequence of random numbers is
+ not the same each time you run Octave. If you really do need for to
+ reproduce a sequence of numbers exactly, you can set the seed to a
+ specific value.
+
+
+
+ If it is invoked without arguments, rand
and randn
return a
+ single element of a random sequence.
+
+
+
+ The rand
and randn
functions use Fortran code from
+ RANLIB, a library of fortran routines for random number generation,
+ compiled by Barry W. Brown and James Lovato of the Department of
+ Biomathematics at The University of Texas, M.D. Anderson Cancer Center,
+ Houston, TX 77030.
+
+
+
+
+ - Built-in Function: diag (v, k)
+
-
+ Return a diagonal matrix with vector v on diagonal k. The
+ second argument is optional. If it is positive, the vector is placed on
+ the k-th super-diagonal. If it is negative, it is placed on the
+ -k-th sub-diagonal. The default value of k is 0, and the
+ vector is placed on the main diagonal. For example,
+
+
+
+
+ diag ([1, 2, 3], 1)
+ => 0 1 0 0
+ 0 0 2 0
+ 0 0 0 3
+ 0 0 0 0
+
+
+
+
+
+ The functions linspace
and logspace
make it very easy to
+ create vectors with evenly or logarithmically spaced elements.
+ See section Ranges.
+
+
+
+
+ - Function File: linspace (base, limit, n)
+
-
+ Return a row vector with n linearly spaced elements between
+ base and limit. The number of elements, n, must be
+ greater than 1. The base and limit are always included in
+ the range. If base is greater than limit, the elements are
+ stored in decreasing order. If the number of points is not specified, a
+ value of 100 is used.
+
+
+
+ The linspace
function always returns a row vector, regardless of
+ the value of prefer_column_vectors
.
+
+
+
+
+
+ - Function File: logspace (base, limit, n)
+
-
+ Similar to
linspace
except that the values are logarithmically
+ spaced from
+
+
+
+ If limit is equal to
+ the points are between
+ not
+ in order to be compatible with the corresponding MATLAB function.
+
+
+
+
+
+ - Built-in Variable: treat_neg_dim_as_zero
+
-
+ If the value of
treat_neg_dim_as_zero
is nonzero, expressions
+ like
+
+
+
+
+ eye (-1)
+
+
+
+ produce an empty matrix (i.e., row and column dimensions are zero).
+ Otherwise, an error message is printed and control is returned to the
+ top level. The default value is 0.
+
+
+
+
+
+
+
+
+ The following functions return famous matrix forms.
+
+
+
+
+ - Function File: hankel (c, r)
+
-
+ Return the Hankel matrix constructed given the first column c, and
+ (optionally) the last row r. If the last element of c is
+ not the same as the first element of r, the last element of
+ c is used. If the second argument is omitted, the last row is
+ taken to be the same as the first column.
+
+
+
+ A Hankel matrix formed from an m-vector c, and an n-vector
+ r, has the elements
+
+
+
+
+
+ - Function File: hilb (n)
+
-
+ Return the Hilbert matrix of order n. The
+ element of a Hilbert matrix is defined as
+
+
+
+
+
+ - Function File: invhilb (n)
+
-
+ Return the inverse of a Hilbert matrix of order n. This is exact.
+ Compare with the numerical calculation of
inverse (hilb (n))
,
+ which suffers from the ill-conditioning of the Hilbert matrix, and the
+ finite precision of your computer's floating point arithmetic.
+
+
+
+
+
+ - Function File: sylvester_matrix (k)
+
-
+ Return the Sylvester matrix of order
+
+
+
+
+
+ - Function File: toeplitz (c, r)
+
-
+ Return the Toeplitz matrix constructed given the first column c,
+ and (optionally) the first row r. If the first element of c
+ is not the same as the first element of r, the first element of
+ c is used. If the second argument is omitted, the first row is
+ taken to be the same as the first column.
+
+
+
+ A square Toeplitz matrix has the form
+
+
+
+
+
+ - Function File: vander (c)
+
-
+ Return the Vandermonde matrix whose next to last column is c.
+
+
+
+ A Vandermonde matrix has the form
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_17.html octave-2.0.14/doc/interpreter/octave_17.html
*** octave-2.0.13/doc/interpreter/octave_17.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_17.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,833 ----
+
+
+
+
+ GNU Octave - Arithmetic
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ Unless otherwise noted, all of the functions described in this chapter
+ will work for real and complex scalar or matrix arguments.
+
+
+
+
+
+
+
+
+ The following functions are available for working with complex numbers.
+ Each expects a single argument. They are called mapping functions
+ because when given a matrix argument, they apply the given function to
+ each element of the matrix.
+
+
+
+
+ - Mapping Function: ceil (x)
+
-
+ Return the smallest integer not less than x. If x is
+ complex, return
ceil (real (x)) + ceil (imag (x)) * I
.
+
+
+
+
+
+ - Mapping Function: exp (x)
+
-
+ Compute the exponential of x. To compute the matrix exponential,
+ see section Linear Algebra.
+
+
+
+
+
+ - Mapping Function: fix (x)
+
-
+ Truncate x toward zero. If x is complex, return
+
fix (real (x)) + fix (imag (x)) * I
.
+
+
+
+
+
+ - Mapping Function: floor (x)
+
-
+ Return the largest integer not greater than x. If x is
+ complex, return
floor (real (x)) + floor (imag (x)) * I
.
+
+
+
+
+
+ - Mapping Function: gcd (x,
...
)
+ -
+ Compute the greatest common divisor of the elements of x, or the
+ list of all the arguments. For example,
+
+
+
+
+ gcd (a1, ..., ak)
+
+
+
+ is the same as
+
+
+
+
+ gcd ([a1, ..., ak])
+
+
+
+ An optional second return value, v
+ contains an integer vector such that
+
+
+
+
+ g = v(1) * a(k) + ... + v(k) * a(k)
+
+
+
+
+
+
+ - Mapping Function: lcm (x,
...
)
+ -
+ Compute the least common multiple of the elements elements of x, or
+ the list of all the arguments. For example,
+
+
+
+
+ lcm (a1, ..., ak)
+
+
+
+ is the same as
+
+
+
+
+ lcm ([a1, ..., ak]).
+
+
+
+
+
+
+ - Mapping Function: log (x)
+
-
+ Compute the natural logarithm of x. To compute the matrix logarithm,
+ see section Linear Algebra.
+
+
+
+
+
+ - Mapping Function: log10 (x)
+
-
+ Compute the base-10 logarithm of x.
+
+
+
+
+
+ - Mapping Function: y = log2 (x)
+
-
+
- Mapping Function: [f, e] log2 (x)
+
-
+ Compute the base-2 logarithm of x. With two outputs, returns
+ f and e such that
+
+
+
+
+
+ - Loadable Function: max (x)
+
-
+ For a vector argument, return the maximum value. For a matrix argument,
+ return the maximum value from each column, as a row vector. Thus,
+
+
+
+
+ max (max (x))
+
+
+
+ returns the largest element of x.
+
+
+
+ For complex arguments, the magnitude of the elements are used for
+ comparison.
+
+
+
+
+
+ - Loadable Function: min (x)
+
-
+ Like
max
, but return the minimum value.
+
+
+
+
+
+ - Function File: nextpow2 (x)
+
-
+ If x is a scalar, returns the first integer n such that
+
+
+
+ If x is a vector, return nextpow2 (length (x))
.
+
+
+
+
+
+ - Mapping Function: pow2 (x)
+
-
+
- Mapping Function: pow2 (f, e)
+
-
+ With one argument, computes
+ for each element of x. With two arguments, returns
+
+
+
+
+
+ - Mapping Function: rem (x, y)
+
-
+ Return the remainder of
x / y
, computed using the
+ expression
+
+
+
+
+ x - y .* fix (x ./ y)
+
+
+
+ An error message is printed if the dimensions of the arguments do not
+ agree, or if either of the arguments is complex.
+
+
+
+
+
+ - Mapping Function: round (x)
+
-
+ Return the integer nearest to x. If x is complex, return
+
round (real (x)) + round (imag (x)) * I
.
+
+
+
+
+
+ - Mapping Function: sign (x)
+
-
+ Compute the signum function, which is defined as
+
+
+
+ For complex arguments, sign
returns x ./ abs (x)
.
+
+
+
+
+
+ - Mapping Function: sqrt (x)
+
-
+ Compute the square root of x. If x is negative, a complex
+ result is returned. To compute the matrix square root, see
+ section Linear Algebra.
+
+
+
+
+
+ - Mapping Function: xor (x, y)
+
-
+ Return the `exclusive or' of the entries of x and y.
+ For boolean expressions x and y,
+
xor (x, y)
is true if and only if x or y
+ is true, but not if both x and y are true.
+
+
+
+
+
+
+
+
+ The following functions are available for working with complex
+ numbers. Each expects a single argument. Given a matrix they work on
+ an element by element basis. In the descriptions of the following
+ functions,
+
+
+
+
+ - Mapping Function: abs (z)
+
-
+ Compute the magnitude of z, defined as
+
+
+
+ For example,
+
+
+
+
+ abs (3 + 4i)
+ => 5
+
+
+
+
+
+
+ - Mapping Function: arg (z)
+
-
+
- Mapping Function: angle (z)
+
-
+ Compute the argument of z, defined as
+
+
+
+ in radians.
+
+
+
+ For example,
+
+
+
+
+ arg (3 + 4i)
+ => 0.92730
+
+
+
+
+
+
+ - Mapping Function: conj (z)
+
-
+ Return the complex conjugate of z, defined as
+
+
+
+
+
+ - Mapping Function: imag (z)
+
-
+ Return the imaginary part of z as a real number.
+
+
+
+
+
+ - Mapping Function: real (z)
+
-
+ Return the real part of z.
+
+
+
+
+
+
+
+
+ Octave provides the following trigonometric functions:
+
+
+
+
+ - Mapping Function: sin (z)
+
-
+
- Mapping Function: cos (z)
+
-
+
- Mapping Function: tan (z)
+
-
+
- Mapping Function: sec (z)
+
-
+
- Mapping Function: csc (z)
+
-
+
- Mapping Function: cot (z)
+
-
+ The ordinary trigonometric functions.
+
+
+
+
+
+ - Mapping Function: asin (z)
+
-
+
- Mapping Function: acos (z)
+
-
+
- Mapping Function: atan (z)
+
-
+
- Mapping Function: asec (z)
+
-
+
- Mapping Function: acsc (z)
+
-
+
- Mapping Function: acot (z)
+
-
+ The ordinary inverse trigonometric functions.
+
+
+
+
+
+ - Mapping Function: sinh (z)
+
-
+
- Mapping Function: cosh (z)
+
-
+
- Mapping Function: tanh (z)
+
-
+
- Mapping Function: sech (z)
+
-
+
- Mapping Function: csch (z)
+
-
+
- Mapping Function: coth (z)
+
-
+ Hyperbolic trigonometric functions.
+
+
+
+
+
+ - Mapping Function: asinh (z)
+
-
+
- Mapping Function: acosh (z)
+
-
+
- Mapping Function: atanh (z)
+
-
+
- Mapping Function: asech (z)
+
-
+
- Mapping Function: acsch (z)
+
-
+
- Mapping Function: acoth (z)
+
-
+ Inverse hyperbolic trigonometric functions.
+
+
+
+
+ Each of these functions expect a single argument. For matrix arguments,
+ they work on an element by element basis. For example,
+
+
+
+
+ sin ([1, 2; 3, 4])
+ => 0.84147 0.90930
+ 0.14112 -0.75680
+
+
+
+
+ - Mapping Function: atan2 (y, x)
+
-
+ Return the arctangent of y/x. The signs of the arguments
+ are used to determine the quadrant of the result, which is in the range
+
+
+
+
+
+
+
+
+
+ - Built-in Function: sum (x)
+
-
+ For a vector argument, return the sum of all the elements. For a matrix
+ argument, return the sum of the elements in each column, as a row
+ vector. The sum of an empty matrix is 0 if it has no columns, or a
+ vector of zeros if it has no rows (see section Empty Matrices).
+
+
+
+
+
+ - Built-in Function: prod (x)
+
-
+ For a vector argument, return the product of all the elements. For a
+ matrix argument, return the product of the elements in each column, as a
+ row vector. The product of an empty matrix is 1 if it has no columns,
+ or a vector of ones if it has no rows (see section Empty Matrices).
+
+
+
+
+
+ - Built-in Function: cumsum (x)
+
-
+ Return the cumulative sum of each column of x. For example,
+
+
+
+
+ cumsum ([1, 2; 3, 4])
+ => 1 2
+ 4 6
+
+
+
+
+
+
+ - Built-in Function: cumprod (x)
+
-
+ Return the cumulative product of each column of x. For example,
+
+
+
+
+ cumprod ([1, 2; 3, 4])
+ => 1 2
+ 3 8
+
+
+
+
+
+
+ - Built-in Function: sumsq (x)
+
-
+ For a vector argument, return the sum of the squares of all the
+ elements. For a matrix argument, return the sum of the squares of the
+ elements in each column, as a row vector.
+
+
+
+
+
+
+
+
+
+ - Mapping Function: besseli (alpha, x)
+
-
+
- Mapping Function: besselj (alpha, x)
+
-
+
- Mapping Function: besselk (alpha, x)
+
-
+
- Mapping Function: bessely (alpha, x)
+
-
+ Compute Bessel functions of the following types:
+
+
+
+
+ besselj
+ -
+ Bessel functions of the first kind.
+
+
bessely
+ -
+ Bessel functions of the second kind.
+
+
besseli
+ -
+ Modified Bessel functions of the first kind.
+
+
besselk
+ -
+ Modified Bessel functions of the second kind.
+
+
+
+ The second argument, x, must be a real matrix, vector, or scalar.
+
+
+
+ The first argument, alpha, must be greater than or equal to zero.
+ If alpha is a range, it must have an increment equal to one.
+
+
+
+ If alpha is a scalar, the result is the same size as x.
+
+
+
+ If alpha is a range, x must be a vector or scalar, and the
+ result is a matrix with length(x)
rows and
+ length(alpha)
columns.
+
+
+
+
+
+ - Mapping Function: beta (a, b)
+
-
+ Return the Beta function,
+
+
+
+
+
+ - Mapping Function: betai (a, b, x)
+
-
+ Return the incomplete Beta function,
+
+
+
+ If x has more than one component, both a and b must be
+ scalars. If x is a scalar, a and b must be of
+ compatible dimensions.
+
+
+
+
+
+ - Mapping Function: bincoeff (n, k)
+
-
+ Return the binomial coefficient of n and k, defined as
+
+
+
+ For example,
+
+
+
+
+ bincoeff (5, 2)
+ => 10
+
+
+
+
+
+
+ - Mapping Function: erf (z)
+
-
+ Computes the error function,
+
+
+
+
+
+ - Mapping Function: erfc (z)
+
-
+ Computes the complementary error function,
+
+
+
+
+
+ - Mapping Function: erfinv (z)
+
-
+ Computes the inverse of the error function,
+
+
+
+
+
+ - Mapping Function: gamma (z)
+
-
+ Computes the Gamma function,
+
+
+
+
+
+ - Mapping Function: gammai (a, x)
+
-
+ Computes the incomplete gamma function,
+
+
+
+ If a is scalar, then gammai (a, x)
is returned
+ for each element of x and vice versa.
+
+
+
+ If neither a nor x is scalar, the sizes of a and
+ x must agree, and gammai is applied element-by-element.
+
+
+
+
+
+ - Mapping Function: lgamma (a, x)
+
-
+
- Mapping Function: gammaln (a, x)
+
-
+ Return the natural logarithm of the gamma function.
+
+
+
+
+
+ - Function File: cross (x, y)
+
-
+ Computes the vector cross product of the two 3-dimensional vectors
+ x and y. For example,
+
+
+
+
+ cross ([1,1,0], [0,1,1])
+ => [ 1; -1; 1 ]
+
+
+
+
+
+
+ - Function File: commutation_matrix (m, n)
+
-
+ Return the commutation matrix
+ which is the unique
+ matrix such that
+ for all
+ matrices
+
+
+
+ If only one argument m is given,
+ is returned.
+
+
+
+ See Magnus and Neudecker (1988), Matrix differential calculus with
+ applications in statistics and econometrics.
+
+
+
+
+
+ - Function File: duplication_matrix (n)
+
-
+ Return the duplication matrix
+ which is the unique
+ matrix such that
+ for all symmetric
+ matrices
+
+
+
+ See Magnus and Neudecker (1988), Matrix differential calculus with
+ applications in statistics and econometrics.
+
+
+
+
+
+
+
+
+
+ - Built-in Variable: I
+
-
+
- Built-in Variable: J
+
-
+
- Built-in Variable: i
+
-
+
- Built-in Variable: j
+
-
+ A pure imaginary number, defined as
+ The
I
and J
forms are true constants, and cannot be
+ modified. The i
and j
forms are like ordinary variables,
+ and may be used for other purposes. However, unlike other variables,
+ they once again assume their special predefined values if they are
+ cleared See section Status of Variables.
+
+
+
+
+
+ - Built-in Variable: Inf
+
-
+
- Built-in Variable: inf
+
-
+ Infinity. This is the result of an operation like 1/0, or an operation
+ that results in a floating point overflow.
+
+
+
+
+
+ - Built-in Variable: NaN
+
-
+
- Built-in Variable: nan
+
-
+ Not a number. This is the result of an operation like
+ or any operation with a NaN.
+
+
+
+ Note that NaN always compares not equal to NaN. This behavior is
+ specified by the IEEE standard for floating point arithmetic. To
+ find NaN values, you must use the isnan
function.
+
+
+
+
+
+ - Built-in Variable: pi
+
-
+ The ratio of the circumference of a circle to its diameter.
+ Internally,
pi
is computed as `4.0 * atan (1.0)'.
+
+
+
+
+
+ - Built-in Variable: e
+
-
+ The base of natural logarithms. The constant
+ satisfies the equation
+
+
+
+
+
+ - Built-in Variable: eps
+
-
+ The machine precision. More precisely,
eps
is the largest
+ relative spacing between any two adjacent numbers in the machine's
+ floating point system. This number is obviously system-dependent. On
+ machines that support 64 bit IEEE floating point arithmetic, eps
+ is approximately
+
+
+
+
+
+ - Built-in Variable: realmax
+
-
+ The largest floating point number that is representable. The actual
+ value is system-dependent. On machines that support 64 bit IEEE
+ floating point arithmetic,
realmax
is approximately
+
+
+
+
+
+ - Built-in Variable: realmin
+
-
+ The smallest floating point number that is representable. The actual
+ value is system-dependent. On machines that support 64 bit IEEE
+ floating point arithmetic,
realmin
is approximately
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_18.html octave-2.0.14/doc/interpreter/octave_18.html
*** octave-2.0.13/doc/interpreter/octave_18.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_18.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,700 ----
+
+
+
+
+ GNU Octave - Linear Algebra
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ This chapter documents the linear algebra functions of Octave.
+ Reference material for many of these functions may be found in
+ Golub and Van Loan, Matrix Computations, 2nd Ed., Johns Hopkins,
+ 1989, and in LAPACK Users' Guide, SIAM, 1992.
+
+
+
+
+
+
+
+
+
+ - Loadable Function: aa = balance (a, opt)
+
-
+
- Loadable Function: [dd, aa] = balance (a, opt)
+
-
+
- Loadable Function: [cc, dd, aa, bb] = balance (a, b, opt)
+
-
+
+
+
+ [dd, aa] = balance (a)
returns aa = dd \ a * dd
.
+ aa
is a matrix whose row and column norms are roughly equal in
+ magnitude, and dd
= p * d
, where p
is a permutation
+ matrix and d
is a diagonal matrix of powers of two. This allows
+ the equilibration to be computed without roundoff. Results of
+ eigenvalue calculation are typically improved by balancing first.
+
+
+
+ [cc, dd, aa, bb] = balance (a, b)
returns aa = cc*a*dd
and
+ bb = cc*b*dd)
, where aa
and bb
have non-zero
+ elements of approximately the same magnitude and cc
and dd
+ are permuted diagonal matrices as in dd
for the algebraic
+ eigenvalue problem.
+
+
+
+ The eigenvalue balancing option opt
is selected as follows:
+
+
+
+
+ "N"
, "n"
+ -
+ No balancing; arguments copied, transformation(s) set to identity.
+
+
"P"
, "p"
+ -
+ Permute argument(s) to isolate eigenvalues where possible.
+
+
"S"
, "s"
+ -
+ Scale to improve accuracy of computed eigenvalues.
+
+
"B"
, "b"
+ -
+ Permute and scale, in that order. Rows/columns of a (and b)
+ that are isolated by permutation are not scaled. This is the default
+ behavior.
+
+
+
+ Algebraic eigenvalue balancing uses standard LAPACK routines.
+
+
+
+ Generalized eigenvalue problem balancing uses Ward's algorithm
+ (SIAM Journal on Scientific and Statistical Computing, 1981).
+
+
+
+
+
+ - : cond (a)
+
-
+ Compute the (two-norm) condition number of a matrix.
cond (a)
is
+ defined as norm (a) * norm (inv (a))
, and is computed via a
+ singular value decomposition.
+
+
+
+
+
+ - Loadable Function: det (a)
+
-
+ Compute the determinant of a using LINPACK.
+
+
+
+
+
+ - Loadable Function: lambda = eig (a)
+
-
+
- Loadable Function: [v, lambda] = eig (a)
+
-
+ The eigenvalues (and eigenvectors) of a matrix are computed in a several
+ step process which begins with a Hessenberg decomposition, followed by a
+ Schur decomposition, from which the eigenvalues are apparent. The
+ eigenvectors, when desired, are computed by further manipulations of the
+ Schur decomposition.
+
+
+
+
+
+ - Loadable Function: G = givens (x, y)
+
-
+
- Loadable Function: [c, s] = givens (x, y)
+
-
+
+
+
+ For example,
+
+
+
+
+ givens (1, 1)
+ => 0.70711 0.70711
+ -0.70711 0.70711
+
+
+
+
+
+
+ - Loadable Function: inv (a)
+
-
+
- Loadable Function: inverse (a)
+
-
+ Compute the inverse of the square matrix a.
+
+
+
+
+
+ - Function File: norm (a, p)
+
-
+ Compute the p-norm of the matrix a. If the second argument is
+ missing,
p = 2
is assumed.
+
+
+
+ If a is a matrix:
+
+
+
+
+ - p =
1
+ -
+ 1-norm, the largest column sum of a.
+
+
- p =
2
+ -
+ Largest singular value of a.
+
+
- p =
Inf
+ -
+
+ Infinity norm, the largest row sum of a.
+
+
- p =
"fro"
+ -
+
+ Frobenius norm of a,
sqrt (sum (diag (a' * a)))
.
+
+
+
+ If a is a vector or a scalar:
+
+
+
+
+ - p =
Inf
+ -
+
max (abs (a))
.
+
+ - p =
-Inf
+ -
+
min (abs (a))
.
+
+ - other
+
-
+ p-norm of a,
(sum (abs (a) .^ p)) ^ (1/p)
.
+
+
+
+
+
+ - Function File: null (a, tol)
+
-
+ Return an orthonormal basis of the null space of a.
+
+
+
+ The dimension of the null space is taken as the number of singular
+ values of a not greater than tol. If the argument tol
+ is missing, it is computed as
+
+
+
+
+ max (size (a)) * max (svd (a)) * eps
+
+
+
+
+
+
+ - Function File: orth (a, tol)
+
-
+ Return an orthonormal basis of the range space of a.
+
+
+
+ The dimension of the range space is taken as the number of singular
+ values of a greater than tol. If the argument tol is
+ missing, it is computed as
+
+
+
+
+ max (size (a)) * max (svd (a)) * eps
+
+
+
+
+
+
+ - Function File: pinv (x, tol)
+
-
+ Return the pseudoinverse of x. Singular values less than
+ tol are ignored.
+
+
+
+ If the second argument is omitted, it is assumed that
+
+
+
+
+ tol = max (size (x)) * sigma_max (x) * eps,
+
+
+
+ where sigma_max (x)
is the maximal singular value of x.
+
+
+
+
+
+ - Function File: rank (a, tol)
+
-
+ Compute the rank of a, using the singular value decomposition.
+ The rank is taken to be the number of singular values of a that
+ are greater than the specified tolerance tol. If the second
+ argument is omitted, it is taken to be
+
+
+
+
+ tol = max (size (a)) * sigma (1) * eps;
+
+
+
+ where eps
is machine precision and sigma
is the largest
+ singular value of a.
+
+
+
+
+
+ - Function File: trace (a)
+
-
+ Compute the trace of a,
sum (diag (a))
.
+
+
+
+
+
+
+
+
+
+ - Loadable Function: chol (a)
+
-
+
+ Compute the Cholesky factor, r, of the symmetric positive definite
+ matrix a, where
+
+
+
+
+
+ - Loadable Function: h = hess (a)
+
-
+
- Loadable Function: [p, h] = hess (a)
+
-
+
+ Compute the Hessenberg decomposition of the matrix a.
+
+
+
+ The Hessenberg decomposition is usually used as the first step in an
+ eigenvalue computation, but has other applications as well (see Golub,
+ Nash, and Van Loan, IEEE Transactions on Automatic Control, 1979. The
+ Hessenberg decomposition is
+
+
+
+
+
+ - Loadable Function: [l, u, p] = lu (a)
+
-
+
+ Compute the LU decomposition of a, using subroutines from
+ LAPACK. The result is returned in a permuted form, according to
+ the optional return value p. For example, given the matrix
+
a = [1, 2; 3, 4]
,
+
+
+
+
+ [l, u, p] = lu (a)
+
+
+
+ returns
+
+
+
+
+ l =
+
+ 1.00000 0.00000
+ 0.33333 1.00000
+
+ u =
+
+ 3.00000 4.00000
+ 0.00000 0.66667
+
+ p =
+
+ 0 1
+ 1 0
+
+
+
+
+
+
+ - Loadable Function: [q, r, p] = qr (a)
+
-
+
+ Compute the QR factorization of a, using standard LAPACK
+ subroutines. For example, given the matrix
a = [1, 2; 3, 4]
,
+
+
+
+
+ [q, r] = qr (a)
+
+
+
+ returns
+
+
+
+
+ q =
+
+ -0.31623 -0.94868
+ -0.94868 0.31623
+
+ r =
+
+ -3.16228 -4.42719
+ 0.00000 -0.63246
+
+
+
+ The qr
factorization has applications in the solution of least
+ squares problems
+ for overdetermined systems of equations (i.e.,
+ is a tall, thin matrix). The QR factorization is
+
+
+
+ The permuted QR factorization [q, r, p] =
+ qr (a)
forms the QR factorization such that the diagonal
+ entries of r
are decreasing in magnitude order. For example,
+ given the matrix a = [1, 2; 3, 4]
,
+
+
+
+
+ [q, r, pi] = qr(a)
+
+
+
+ returns
+
+
+
+
+ q =
+
+ -0.44721 -0.89443
+ -0.89443 0.44721
+
+ r =
+
+ -4.47214 -3.13050
+ 0.00000 0.44721
+
+ p =
+
+ 0 1
+ 1 0
+
+
+
+ The permuted qr
factorization [q, r, p] = qr (a)
+ factorization allows the construction of an orthogonal basis of
+ span (a)
.
+
+
+
+
+
+ - Loadable Function: s = schur (a)
+
-
+
- Loadable Function: [u, s] = schur (a, opt)
+
-
+
+ The Schur decomposition is used to compute eigenvalues of a
+ square matrix, and has applications in the solution of algebraic
+ Riccati equations in control (see
are
and dare
).
+ schur
always returns
+ where
+ is a unitary matrix
+ and
+ is upper triangular. The eigenvalues of
+ are the diagonal elements of
+ If the matrix
+ is real, then the real Schur decomposition is computed, in which the
+ matrix
+ is orthogonal and
+ is block upper triangular
+ with blocks of size at most
+ blocks along the diagonal. The diagonal elements of
+ (or the eigenvalues of the
+ blocks, when
+ appropriate) are the eigenvalues of
+ and
+
+
+
+ The eigenvalues are optionally ordered along the diagonal according to
+ the value of opt
. opt = "a"
indicates that all
+ eigenvalues with negative real parts should be moved to the leading
+ block of
+ (used in are
), opt = "d"
indicates that all eigenvalues
+ with magnitude less than one should be moved to the leading block of
+ (used in dare
), and opt = "u"
, the default, indicates that
+ no ordering of eigenvalues should occur. The leading
+ columns of
+ always span the
+ subspace corresponding to the
+ leading eigenvalues of
+
+
+
+
+
+ - Loadable Function: s = svd (a)
+
-
+
- Loadable Function: [u, s, v] = svd (a)
+
-
+
+ Compute the singular value decomposition of a
+
+
+
+ The function svd
normally returns the vector of singular values.
+ If asked for three return values, it computes
+ For example,
+
+
+
+
+ svd (hilb (3))
+
+
+
+ returns
+
+
+
+
+ ans =
+
+ 1.4083189
+ 0.1223271
+ 0.0026873
+
+
+
+ and
+
+
+
+
+ [u, s, v] = svd (hilb (3))
+
+
+
+ returns
+
+
+
+
+ u =
+
+ -0.82704 0.54745 0.12766
+ -0.45986 -0.52829 -0.71375
+ -0.32330 -0.64901 0.68867
+
+ s =
+
+ 1.40832 0.00000 0.00000
+ 0.00000 0.12233 0.00000
+ 0.00000 0.00000 0.00269
+
+ v =
+
+ -0.82704 0.54745 0.12766
+ -0.45986 -0.52829 -0.71375
+ -0.32330 -0.64901 0.68867
+
+
+
+ If given a second argument, svd
returns an economy-sized
+ decomposition, eliminating the unnecessary rows or columns of u or
+ v.
+
+
+
+
+
+
+
+
+
+ - Loadable Function: expm (a)
+
-
+ Return the exponential of a matrix, defined as the infinite Taylor
+ series
+ The Taylor series is not the way to compute the matrix
+ exponential; see Moler and Van Loan, Nineteen Dubious Ways to
+ Compute the Exponential of a Matrix, SIAM Review, 1978. This routine
+ uses Ward's diagonal
+ approximation method with three step preconditioning (SIAM Journal on
+ Numerical Analysis, 1977). Diagonal
+ approximations are rational polynomials of matrices
+ whose Taylor series matches the first
+ terms of the Taylor series above; direct evaluation of the Taylor series
+ (with the same preconditioning steps) may be desirable in lieu of the
+ approximation when
+ is ill-conditioned.
+
+
+
+
+
+ - Loadable Function: logm (a)
+
-
+ Compute the matrix logarithm of the square matrix a. Note that
+ this is currently implemented in terms of an eigenvalue expansion and
+ needs to be improved to be more robust.
+
+
+
+
+
+ - Loadable Function: sqrtm (a)
+
-
+ Compute the matrix square root of the square matrix a. Note that
+ this is currently implemented in terms of an eigenvalue expansion and
+ needs to be improved to be more robust.
+
+
+
+
+
+ - Function File: kron (a, b)
+
-
+ Form the kronecker product of two matrices, defined block by block as
+
+
+
+
+ x = [a(i, j) b]
+
+
+
+ For example,
+
+
+
+
+ kron (1:4, ones (3, 1))
+ => 1 2 3 4
+ 1 2 3 4
+ 1 2 3 4
+
+
+
+
+
+
+ - Function File: [aa, bb, q, z] = qzhess (a, b)
+
-
+ Compute the Hessenberg-triangular decomposition of the matrix pencil
+
(a, b)
, returning
+ aa = q * a * z
,
+ bb = q * b * z
, with q and z
+ orthogonal. For example,
+
+
+
+
+ [aa, bb, q, z] = qzhess ([1, 2; 3, 4], [5, 6; 7, 8])
+ => aa = [ -3.02244, -4.41741; 0.92998, 0.69749 ]
+ => bb = [ -8.60233, -9.99730; 0.00000, -0.23250 ]
+ => q = [ -0.58124, -0.81373; -0.81373, 0.58124 ]
+ => z = [ 1, 0; 0, 1 ]
+
+
+
+ The Hessenberg-triangular decomposition is the first step in
+ Moler and Stewart's QZ decomposition algorithm.
+
+
+
+ Algorithm taken from Golub and Van Loan, Matrix Computations, 2nd
+ edition.
+
+
+
+
+
+ - Loadable Function: qzval (a, b)
+
-
+ Compute generalized eigenvalues of the matrix pencil
+
+
+
+ The arguments a and b must be real matrices.
+
+
+
+
+
+ - Loadable Function: x = syl (a, b, c)
+
-
+ Solve the Sylvester equation
+ using standard LAPACK subroutines. For example,
+
+
+
+
+ syl ([1, 2; 3, 4], [5, 6; 7, 8], [9, 10; 11, 12])
+ => [ -0.50000, -0.66667; -0.66667, -0.50000 ]
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_19.html octave-2.0.14/doc/interpreter/octave_19.html
*** octave-2.0.13/doc/interpreter/octave_19.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_19.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,110 ----
+
+
+
+
+ GNU Octave - Nonlinear Equations
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ Octave can solve sets of nonlinear equations of the form
+
+
+
+ using the function fsolve
, which is based on the MINPACK
+ subroutine hybrd
.
+
+
+
+
+ - Loadable Function: [x, info] = fsolve (fcn, x0)
+
-
+ Given fcn, the name of a function of the form
f (x)
+ and an initial starting point x0, fsolve
solves the set of
+ equations such that f(x) == 0
.
+
+
+
+
+
+ - Loadable Function: fsolve_options (opt, val)
+
-
+ When called with two arguments, this function allows you set options
+ parameters for the function
fsolve
. Given one argument,
+ fsolve_options
returns the value of the corresponding option. If
+ no arguments are supplied, the names of all the available options and
+ their current values are displayed.
+
+
+
+
+ Here is a complete example. To solve the set of equations
+
+
+
+ you first need to write a function to compute the value of the given
+ function. For example:
+
+
+
+
+ function y = f (x)
+ y(1) = -2*x(1)^2 + 3*x(1)*x(2) + 4*sin(x(2)) - 6;
+ y(2) = 3*x(1)^2 - 2*x(1)*x(2)^2 + 3*cos(x(1)) + 4;
+ endfunction
+
+
+
+ Then, call fsolve
with a specified initial condition to find the
+ roots of the system of equations. For example, given the function
+ f
defined above,
+
+
+
+
+ [x, info] = fsolve ("f", [1; 2])
+
+
+
+ results in the solution
+
+
+
+
+ x =
+
+ 0.57983
+ 2.54621
+
+ info = 1
+
+
+
+ A value of info = 1
indicates that the solution has converged.
+
+
+
+ The function perror
may be used to print English messages
+ corresponding to the numeric error codes. For example,
+
+
+
+
+ perror ("fsolve", 1)
+ -| solution converged to requested tolerance
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_2.html octave-2.0.14/doc/interpreter/octave_2.html
*** octave-2.0.13/doc/interpreter/octave_2.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_2.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,703 ----
+
+
+
+
+ GNU Octave - A Brief Introduction to Octave
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+ This manual documents how to run, install and port GNU Octave, and how
+ to report bugs.
+
+
+
+ GNU Octave is a high-level language, primarily intended for numerical
+ computations. It provides a convenient command line interface for
+ solving linear and nonlinear problems numerically, and for performing
+ other numerical experiments. It may also be used as a batch-oriented
+ language.
+
+
+
+ GNU Octave is also freely redistributable software. You may
+ redistribute it and/or modify it under the terms of the GNU General
+ Public License as published by the Free Software Foundation. The GPL is
+ included in this manual in section GNU GENERAL PUBLIC LICENSE.
+
+
+
+ This document corresponds to Octave version 2.0.13.
+
+
+
+
+
+
+
+
+ On most systems, the way to invoke Octave is with the shell command
+ `octave'. Octave displays an initial message and then a prompt
+ indicating it is ready to accept input. You can begin typing Octave
+ commands immediately afterward.
+
+
+
+ If you get into trouble, you can usually interrupt Octave by typing
+ Control-C (usually written C-c for short). C-c gets
+ its name from the fact that you type it by holding down CTRL and
+ then pressing c. Doing this will normally return you to Octave's
+ prompt.
+
+
+
+
+
+ To exit Octave, type quit, or exit at the Octave prompt.
+
+
+
+ On systems that support job control, you can suspend Octave by sending
+ it a SIGTSTP
signal, usually by typing C-z.
+
+
+
+
+
+
+
+ The following chapters describe all of Octave's features in detail, but
+ before doing that, it might be helpful to give a sampling of some of its
+ capabilities.
+
+
+
+ If you are new to Octave, I recommend that you try these examples to
+ begin learning Octave by using it. Lines marked with `octave:13>'
+ are lines you type, ending each with a carriage return. Octave will
+ respond with an answer, or by displaying a graph.
+
+
+
+
+
+
+
+ To create a new matrix and store it in a variable so that it you can
+ refer to it later, type the command
+
+
+
+
+ octave:1> a = [ 1, 1, 2; 3, 5, 8; 13, 21, 34 ]
+
+
+
+ Octave will respond by printing the matrix in neatly aligned columns.
+ Ending a command with a semicolon tells Octave to not print the result
+ of a command. For example
+
+
+
+
+ octave:2> b = rand (3, 2);
+
+
+
+ will create a 3 row, 2 column matrix with each element set to a random
+ value between zero and one.
+
+
+
+ To display the value of any variable, simply type the name of the
+ variable. For example, to display the value stored in the matrix
+ b
, type the command
+
+
+
+
+ octave:3> b
+
+
+
+
+
+
+
+ Octave has a convenient operator notation for performing matrix
+ arithmetic. For example, to multiply the matrix a
by a scalar
+ value, type the command
+
+
+
+
+ octave:4> 2 * a
+
+
+
+ To multiply the two matrices a
and b
, type the command
+
+
+
+
+ octave:5> a * b
+
+
+
+ To form the matrix product
+ type the command
+
+
+
+
+ octave:6> a' * a
+
+
+
+
+
+
+
+ To solve the set of linear equations ax = b
,
+ use the left division operator, `\':
+
+
+
+
+ octave:7> a \ b
+
+
+
+ This is conceptually equivalent to
+ but avoids computing the inverse of a matrix directly.
+
+
+
+ If the coefficient matrix is singular, Octave will print a warning
+ message and compute a minimum norm solution.
+
+
+
+
+
+
+
+ Octave has built-in functions for solving nonlinear differential
+ equations of the form
+
+
+
+ For Octave to integrate equations of this form, you must first provide a
+ definition of the function
+ This is straightforward, and may be accomplished by entering the
+ function body directly on the command line. For example, the following
+ commands define the right hand side function for an interesting pair of
+ nonlinear differential equations. Note that while you are entering a
+ function, Octave responds with a different prompt, to indicate that it
+ is waiting for you to complete your input.
+
+
+
+
+ octave:8> function xdot = f (x, t)
+ >
+ > r = 0.25;
+ > k = 1.4;
+ > a = 1.5;
+ > b = 0.16;
+ > c = 0.9;
+ > d = 0.8;
+ >
+ > xdot(1) = r*x(1)*(1 - x(1)/k) - a*x(1)*x(2)/(1 + b*x(1));
+ > xdot(2) = c*a*x(1)*x(2)/(1 + b*x(1)) - d*x(2);
+ >
+ > endfunction
+
+
+
+ Given the initial condition
+
+
+
+
+ x0 = [1; 2];
+
+
+
+ and the set of output times as a column vector (note that the first
+ output time corresponds to the initial condition given above)
+
+
+
+
+ t = linspace (0, 50, 200)';
+
+
+
+ it is easy to integrate the set of differential equations:
+
+
+
+
+ x = lsode ("f", x0, t);
+
+
+
+ The function lsode
uses the Livermore Solver for Ordinary
+ Differential Equations, described in A. C. Hindmarsh, ODEPACK, a
+ Systematized Collection of ODE Solvers, in: Scientific Computing, R. S.
+ Stepleman et al. (Eds.), North-Holland, Amsterdam, 1983, pages 55--64.
+
+
+
+
+
+
+
+ To display the solution of the previous example graphically, use the
+ command
+
+
+
+
+ plot (t, x)
+
+
+
+ If you are using the X Window System, Octave will automatically create
+ a separate window to display the plot. If you are using a terminal that
+ supports some other graphics commands, you will need to tell Octave what
+ kind of terminal you have. Type the command
+
+
+
+
+ gset term
+
+
+
+ to see a list of the supported terminal types. Octave uses
+ gnuplot
to display graphics, and can display graphics on any
+ terminal that is supported by gnuplot
.
+
+
+
+ To capture the output of the plot command in a file rather than sending
+ the output directly to your terminal, you can use a set of commands like
+ this
+
+
+
+
+ gset term postscript
+ gset output "foo.ps"
+ replot
+
+
+
+ This will work for other types of output devices as well. Octave's
+ gset
command is really just piped to the gnuplot
+ subprocess, so that once you have a plot on the screen that you like,
+ you should be able to do something like this to create an output file
+ suitable for your graphics printer.
+
+
+
+ Or, you can eliminate the intermediate file by using commands like this
+
+
+
+
+ gset term postscript
+ gset output "|lpr -Pname_of_your_graphics_printer"
+ replot
+
+
+
+
+
+
+
+ At the Octave prompt, you can recall, edit, and reissue previous
+ commands using Emacs- or vi-style editing commands. The default
+ keybindings use Emacs-style commands. For example, to recall the
+ previous command, type Control-p (usually written C-p for
+ short). C-p gets its name from the fact that you type it by
+ holding down CTRL and then pressing p. Doing this will
+ normally bring back the previous line of input. C-n will bring up
+ the next line of input, C-b will move the cursor backward on the
+ line, C-f will move the cursor forward on the line, etc.
+
+
+
+ A complete description of the command line editing capability is given
+ in this manual in section Command Line Editing.
+
+
+
+
+
+
+
+ Octave has an extensive help facility. The same documentation that is
+ available in printed form is also available from the Octave prompt,
+ because both forms of the documentation are created from the same input
+ file.
+
+
+
+ In order to get good help you first need to know the name of the command
+ that you want to use. This name of the function may not always be
+ obvious, but a good place to start is to just type help
.
+ This will show you all the operators, reserved words, functions,
+ built-in variables, and function files. You can then get more
+ help on anything that is listed by simply including the name as an
+ argument to help. For example,
+
+
+
+
+ help plot
+
+
+
+ will display the help text for the plot
function.
+
+
+
+ Octave sends output that is too long to fit on one screen through a
+ pager like less
or more
. Type a RET to advance one
+ line, a SPC to advance one page, and q to exit the pager.
+
+
+
+ The part of Octave's help facility that allows you to read the complete
+ text of the printed manual from within Octave normally uses a separate
+ program called Info. When you invoke Info you will be put into a menu
+ driven program that contains the entire Octave manual. Help for using
+ Info is provided in this manual in section Commands for Getting Help.
+
+
+
+
+
+
+
+ This section explains the notational conventions that are used in this
+ manual. You may want to skip this section and refer back to it later.
+
+
+
+
+
+
+
+
+
+
+
+ Examples of Octave code appear in this font or form: svd (a)
.
+ Names that represent arguments or metasyntactic variables appear
+ in this font or form: first-number. Commands that you type at the
+ shell prompt sometimes appear in this font or form:
+ `octave --no-init-file'. Commands that you type at the Octave
+ prompt sometimes appear in this font or form: foo --bar --baz.
+ Specific keys on your keyboard appear in this font or form: ANY.
+
+
+
+
+
+
+
+
+
+
+
+
+ In the examples in this manual, results from expressions that you
+ evaluate are indicated with `=>'. For example,
+
+
+
+
+ sqrt (2)
+ => 1.4142
+
+
+
+ You can read this as "sqrt (2)
evaluates to 1.4142".
+
+
+
+ In some cases, matrix values that are returned by expressions are
+ displayed like this
+
+
+
+
+ [1, 2; 3, 4] == [1, 3; 2, 4]
+ => [ 1, 0; 0, 1 ]
+
+
+
+ and in other cases, they are displayed like this
+
+
+
+
+ eye (3)
+ => 1 0 0
+ 0 1 0
+ 0 0 1
+
+
+
+ in order to clearly show the structure of the result.
+
+
+
+ Sometimes to help describe one expression, another expression is
+ shown that produces identical results. The exact equivalence of
+ expressions is indicated with `=='. For example,
+
+
+
+
+ rot90 ([1, 2; 3, 4], -1)
+ ==
+ rot90 ([1, 2; 3, 4], 3)
+ ==
+ rot90 ([1, 2; 3, 4], 7)
+
+
+
+
+
+
+
+
+
+
+ Many of the examples in this manual print text when they are
+ evaluated. Examples in this manual indicate printed text with
+ `-|'. The value that is returned by evaluating the
+ expression (here 1
) is displayed with `=>' and
+ follows on a separate line.
+
+
+
+
+ printf ("foo %s\n", "bar")
+ -| foo bar
+ => 1
+
+
+
+
+
+
+
+
+
+
+ Some examples signal errors. This normally displays an error message
+ on your terminal. Error messages are shown on a line starting with
+ error:
.
+
+
+
+
+ struct_elements ([1, 2; 3, 4])
+ error: struct_elements: wrong type argument `matrix'
+
+
+
+
+
+
+
+
+
+
+ Functions, commands, and variables are described in this manual in a
+ uniform format. The first line of a description contains the name of
+ the item followed by its arguments, if any.
+ The category--function, variable, or whatever--is printed next to the
+ right margin.
+ The description follows on succeeding lines, sometimes with examples.
+
+
+
+
+
+
+
+
+
+
+
+ In a function description, the name of the function being described
+ appears first. It is followed on the same line by a list of parameters.
+ The names used for the parameters are also used in the body of the
+ description.
+
+
+
+ Here is a description of an imaginary function foo
:
+
+
+
+
+ - Function: foo (x, y, ...)
+
-
+ The function
foo
subtracts x from y, then adds the
+ remaining arguments to the result. If y is not supplied, then the
+ number 19 is used by default.
+
+
+
+
+ foo (1, [3, 5], 3, 9)
+ => [ 14, 16 ]
+ foo (5)
+ => 14
+
+
+
+ More generally,
+
+
+
+
+ foo (w, x, y, ...)
+ ==
+ x - w + y + ...
+
+
+
+
+
+ Any parameter whose name contains the name of a type (e.g.,
+ integer, integer1 or matrix) is expected to be of that
+ type. Parameters named object may be of any type. Parameters
+ with other sorts of names (e.g., new_file) are discussed
+ specifically in the description of the function. In some sections,
+ features common to parameters of several functions are described at the
+ beginning.
+
+
+
+ Functions in Octave may be defined in several different ways. The
+ catagory name for functions may include another name that indicates the
+ way that the function is defined. These additional tags include
+
+
+
+
+ - Built-in Function
+
-
+
+ The function described is written in a language like C++, C, or Fortran,
+ and is part of the compiled Octave binary.
+
+
- Loadable Function
+
-
+
+ The function described is written in a language like C++, C, or Fortran.
+ On systems that support dynamic linking of user-supplied functions, it
+ may be automatically linked while Octave is running, but only if it is
+ needed. See section Dynamically Linked Functions.
+
+
- Function File
+
-
+
+ The function described is defined using Octave commands stored in a text
+ file. See section Function Files.
+
+
- Mapping Function
+
-
+
+ The function described works element-by-element for matrix and vector
+ arguments.
+
+
+
+
+
+
+
+
+
+
+ Command descriptions have a format similar to function descriptions,
+ except that the word `Function' is replaced by `Command. Commands are
+ functions that may called without surrounding their arguments in
+ parentheses. For example, here is the description for Octave's
+ cd
command:
+
+
+
+
+ - Command: cd dir
+
-
+
- Command: chdir dir
+
-
+ Change the current working directory to dir. For example,
+ cd ~/octave changes the current working directory to
+ `~/octave'. If the directory does not exist, an error message is
+ printed and the working directory is not changed.
+
+
+
+
+
+
+
+
+
+
+
+ A variable is a name that can hold a value. Although any variable
+ can be set by the user, built-in variables typically exist
+ specifically so that users can change them to alter the way Octave
+ behaves (built-in variables are also sometimes called user
+ options). Ordinary variables and built-in variables are described
+ using a format like that for functions except that there are no
+ arguments.
+
+
+
+ Here is a description of the imaginary variable
+ do_what_i_mean_not_what_i_say
.
+
+
+
+
+ - Built-in Variable: do_what_i_mean_not_what_i_say
+
-
+ If the value of this variable is nonzero, Octave will do what you
+ actually wanted, even if you have typed a completely different and
+ meaningless list of commands.
+
+
+
+
+ Other variable descriptions have the same format, but `Built-in
+ Variable' is replaced by `Variable', for ordinary variables, or
+ `Constant' for symbolic constants whose values cannot be changed.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_20.html octave-2.0.14/doc/interpreter/octave_20.html
*** octave-2.0.13/doc/interpreter/octave_20.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_20.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,172 ----
+
+
+
+
+ GNU Octave - Quadrature
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+ - Loadable Function: [v, ier, nfun, err] = quad (f, a, b, tol, sing)
+
-
+ Integrate a nonlinear function of one variable using Quadpack.
+ The first argument is the name of the function to call to compute the
+ value of the integrand. It must have the form
+
+
+
+
+ y = f (x)
+
+
+
+ where y and x are scalars.
+
+
+
+ The second and third arguments are limits of integration. Either or
+ both may be infinite.
+
+
+
+ The optional argument tol is a vector that specifies the desired
+ accuracy of the result. The first element of the vector is the desired
+ absolute tolerance, and the second element is the desired relative
+ tolerance. To choose a relative test only, set the absolute
+ tolerance to zero. To choose an absolute test only, set the relative
+ tolerance to zero.
+
+
+
+ The optional argument sing is a vector of values at which the
+ integrand is known to be singular.
+
+
+
+ The result of the integration is returned in v and ier
+ contains an integer error code (0 indicates a successful integration).
+ The value of nfun indicates how many function evaluations were
+ required, and err contains an estimate of the error in the
+ solution.
+
+
+
+
+
+ - Loadable Function: quad_options (opt, val)
+
-
+ When called with two arguments, this function allows you set options
+ parameters for the function
quad
. Given one argument,
+ quad_options
returns the value of the corresponding option. If
+ no arguments are supplied, the names of all the available options and
+ their current values are displayed.
+
+
+
+
+ Here is an example of using quad
to integrate the function
+
+
+
+ This is a fairly difficult integration (plot the function over the range
+ of integration to see why).
+
+
+
+ The first step is to define the function:
+
+
+
+
+ function y = f (x)
+ y = x .* sin (1 ./ x) .* sqrt (abs (1 - x));
+ endfunction
+
+
+
+ Note the use of the `dot' forms of the operators. This is not necessary
+ for the call to quad
, but it makes it much easier to generate a
+ set of points for plotting (because it makes it possible to call the
+ function with a vector argument to produce a vector result).
+
+
+
+ Then we simply call quad:
+
+
+
+
+ [v, ier, nfun, err] = quad ("f", 0, 3)
+ => 1.9819
+ => 1
+ => 5061
+ => 1.1522e-07
+
+
+
+ Although quad
returns a nonzero value for ier, the result
+ is reasonably accurate (to see why, examine what happens to the result
+ if you move the lower bound to 0.1, then 0.01, then 0.001, etc.).
+
+
+
+
+
+
+
+
+ - Loadable Function: [r, A, B, q] = colloc (n, "left", "right")
+
-
+ Compute derivative and integral weight matrices for orthogonal
+ collocation using the subroutines given in J. Villadsen and
+ M. L. Michelsen, Solution of Differential Equation Models by
+ Polynomial Approximation.
+
+
+
+
+ Here is an example of using colloc
to generate weight matrices
+ for solving the second order differential equation
+
+
+
+ First, we can generate the weight matrices for n points (including
+ the endpoints of the interval), and incorporate the boundary conditions
+ in the right hand side (for a specific value of
+
+
+
+
+ n = 7;
+ alpha = 0.1;
+ [r, a, b] = colloc (n-2, "left", "right");
+ at = a(2:n-1,2:n-1);
+ bt = b(2:n-1,2:n-1);
+ rhs = alpha * b(2:n-1,n) - a(2:n-1,n);
+
+
+
+ Then the solution at the roots r is
+
+
+
+
+ u = [ 0; (at - alpha * bt) \ rhs; 1]
+ => [ 0.00; 0.004; 0.01 0.00; 0.12; 0.62; 1.00 ]
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_21.html octave-2.0.14/doc/interpreter/octave_21.html
*** octave-2.0.13/doc/interpreter/octave_21.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_21.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,221 ----
+
+
+
+
+ GNU Octave - Differential Equations
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ Octave has two built-in functions for solving differential equations.
+ Both are based on reliable ODE solvers written in Fortran.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The function lsode
can be used Solve ODEs of the form
+
+
+
+ using Hindmarsh's ODE solver LSODE.
+
+
+
+
+ - Loadable Function: lsode (fcn, x0, t, t_crit)
+
-
+ Return a matrix of x as a function of t, given the initial
+ state of the system x0. Each row in the result matrix corresponds
+ to one of the elements in the vector t. The first element of
+ t corresponds to the initial state x0, so that the first row
+ of the output is x0.
+
+
+
+ The first argument, fcn, is a string that names the function to
+ call to compute the vector of right hand sides for the set of equations.
+ It must have the form
+
+
+
+
+ xdot = f (x, t)
+
+
+
+ where xdot and x are vectors and t is a scalar.
+
+
+
+ The fourth argument is optional, and may be used to specify a set of
+ times that the ODE solver should not integrate past. It is useful for
+ avoiding difficulties with singularities and points where there is a
+ discontinuity in the derivative.
+
+
+
+
+ Here is an example of solving a set of three differential equations using
+ lsode
. Given the function
+
+
+
+
+
+
+
+
+ function xdot = f (x, t)
+
+ xdot = zeros (3,1);
+
+ xdot(1) = 77.27 * (x(2) - x(1)*x(2) + x(1) \
+ - 8.375e-06*x(1)^2);
+ xdot(2) = (x(3) - x(1)*x(2) - x(2)) / 77.27;
+ xdot(3) = 0.161*(x(1) - x(3));
+
+ endfunction
+
+
+
+ and the initial condition x0 = [ 4; 1.1; 4 ]
, the set of
+ equations can be integrated using the command
+
+
+
+
+ t = linspace (0, 500, 1000);
+
+ y = lsode ("f", x0, t);
+
+
+
+ If you try this, you will see that the value of the result changes
+ dramatically between t = 0 and 5, and again around t = 305.
+ A more efficient set of output points might be
+
+
+
+
+ t = [0, logspace (-1, log10(303), 150), \
+ logspace (log10(304), log10(500), 150)];
+
+
+
+
+ - Loadable Function: lsode_options (opt, val)
+
-
+ When called with two arguments, this function allows you set options
+ parameters for the function
lsode
. Given one argument,
+ lsode_options
returns the value of the corresponding option. If
+ no arguments are supplied, the names of all the available options and
+ their current values are displayed.
+
+
+
+
+ See Alan C. Hindmarsh, ODEPACK, A Systematized Collection of ODE
+ Solvers, in Scientific Computing, R. S. Stepleman, editor, (1983) for
+ more information about the inner workings of lsode
.
+
+
+
+
+
+
+
+ The function dassl
can be used Solve DAEs of the form
+
+
+
+ using Petzold's DAE solver DASSL.
+
+
+
+
+ - Loadable Function: [x, xdot] = dassl (fcn, x0, xdot0, t, t_crit)
+
-
+ Return a matrix of states and their first derivatives with respect to
+ t. Each row in the result matrices correspond to one of the
+ elements in the vector t. The first element of t
+ corresponds to the initial state x0 and derivative xdot0, so
+ that the first row of the output x is x0 and the first row
+ of the output xdot is xdot0.
+
+
+
+ The first argument, fcn, is a string that names the function to
+ call to compute the vector of residuals for the set of equations.
+ It must have the form
+
+
+
+
+ res = f (x, xdot, t)
+
+
+
+ where x, xdot, and res are vectors, and t is a
+ scalar.
+
+
+
+ The second and third arguments to dassl
specify the initial
+ condition of the states and their derivatives, and the fourth argument
+ specifies a vector of output times at which the solution is desired,
+ including the time corresponding to the initial condition.
+
+
+
+ The set of initial states and derivatives are not strictly required to
+ be consistent. In practice, however, DASSL is not very good at
+ determining a consistent set for you, so it is best if you ensure that
+ the initial values result in the function evaluating to zero.
+
+
+
+ The fifth argument is optional, and may be used to specify a set of
+ times that the DAE solver should not integrate past. It is useful for
+ avoiding difficulties with singularities and points where there is a
+ discontinuity in the derivative.
+
+
+
+
+
+ - Loadable Function: dassl_options (opt, val)
+
-
+ When called with two arguments, this function allows you set options
+ parameters for the function
lsode
. Given one argument,
+ dassl_options
returns the value of the corresponding option. If
+ no arguments are supplied, the names of all the available options and
+ their current values are displayed.
+
+
+
+
+ See K. E. Brenan, et al., Numerical Solution of Initial-Value
+ Problems in Differential-Algebraic Equations, North-Holland (1989) for
+ more information about the implementation of DASSL.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_22.html octave-2.0.14/doc/interpreter/octave_22.html
*** octave-2.0.13/doc/interpreter/octave_22.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_22.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,114 ----
+
+
+
+
+ GNU Octave - Optimization
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Function File: [beta, v, r] = gls (y, x, o)
+
-
+ Generalized least squares estimation for the multivariate model
+ where
+
+
+
+ Each row of Y and X is an observation and each column a variable.
+
+
+
+ The return values beta, v, and r are defined as
+ follows.
+
+
+
+
+ - beta
+
-
+ The GLS estimator for b.
+
+
- v
+
-
+ The GLS estimator for
s^2
.
+
+ - r
+
-
+ The matrix of GLS residuals,
r = y - x *
+ beta
.
+
+
+
+
+
+ - Function File: [beta, sigma, r] = ols (y, x)
+
-
+ Ordinary least squares estimation for the multivariate model
+ where
+
+
+
+ Each row of y and x is an observation and each column a
+ variable.
+
+
+
+ The return values beta, sigma, and r are defined as
+ follows.
+
+
+
+
+ - beta
+
-
+ The OLS estimator for b,
beta = pinv (x) *
+ y
, where pinv (x)
denotes the pseudoinverse of
+ x.
+
+ - sigma
+
-
+ The OLS estimator for the matrix s,
+
+
+
+ sigma = (y-x*beta)' * (y-x*beta) / (t-rank(x))
+
+
+ - r
+
-
+ The matrix of OLS residuals,
r = y - x * beta
.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_23.html octave-2.0.14/doc/interpreter/octave_23.html
*** octave-2.0.13/doc/interpreter/octave_23.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_23.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,117 ----
+
+
+
+
+ GNU Octave - Statistics
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ I hope that someday Octave will include more statistics functions. If
+ you would like to help improve Octave in this area, please contact
+ @email{bug-octave@bevo.che.wisc.edu}.
+
+
+
+
+ - Function File: mean (x)
+
-
+ If x is a vector, compute the mean of the elements of x
+ If x is a matrix, compute the mean for each column and return them
+ in a row vector.
+
+
+
+
+
+ - Function File: median (x)
+
-
+ If x is a vector, compute the median value of the elements of
+ x.
+ If x is a matrix, compute the median value for each
+ column and return them in a row vector.
+
+
+
+
+
+ - Function File: std (x)
+
-
+ If x is a vector, compute the standard deviation of the elements
+ of x.
+ If x is a matrix, compute the standard deviation for
+ each column and return them in a row vector.
+
+
+
+
+
+ - Function File: cov (x, y)
+
-
+ If each row of x and y is an observation and each column is
+ a variable, the (i,j)-th entry of
+
cov (x, y)
is the covariance between the i-th
+ variable in x and the j-th variable in y. If called
+ with one argument, compute cov (x, x)
.
+
+
+
+
+
+ - Function File: corrcoef (x, y)
+
-
+ If each row of x and y is an observation and each column is
+ a variable, the (i,j)-th entry of
+
corrcoef (x, y)
is the correlation between the
+ i-th variable in x and the j-th variable in y.
+ If called with one argument, compute corrcoef (x, x)
.
+
+
+
+
+
+ - Function File: kurtosis (x)
+
-
+ If x is a vector of length N, return the kurtosis
+
+
+
+ of x. If x is a matrix, return the row vector containing
+ the kurtosis of each column.
+
+
+
+
+
+ - Function File: mahalanobis (x, y)
+
-
+ Return the Mahalanobis' D-square distance between the multivariate
+ samples x and y, which must have the same number of
+ components (columns), but may have a different number of observations
+ (rows).
+
+
+
+
+
+ - Function File: skewness (x)
+
-
+ If x is a vector of length N, return the skewness
+
+
+
+ of x. If x is a matrix, return the row vector containing
+ the skewness of each column.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_24.html octave-2.0.14/doc/interpreter/octave_24.html
*** octave-2.0.13/doc/interpreter/octave_24.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_24.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,87 ----
+
+
+
+
+ GNU Octave - Sets
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ Octave has a limited set of functions for managing sets of data, where a
+ set is defined as a collection unique elements.
+
+
+
+
+ - Function File: create_set (x)
+
-
+ Return a row vector containing the unique values in x, sorted in
+ ascending order. For example,
+
+
+
+
+ create_set ([ 1, 2; 3, 4; 4, 2 ])
+ => [ 1, 2, 3, 4 ]
+
+
+
+
+
+
+ - Function File: union (x, y)
+
-
+ Return the set of elements that are in either of the sets x and
+ y. For example,
+
+
+
+
+ union ([ 1, 2, 4 ], [ 2, 3, 5 ])
+ => [ 1, 2, 3, 4, 5 ]
+
+
+
+
+
+
+ - Function File: intersection (x, y)
+
-
+ Return the set of elements that are in both sets x and y.
+ For example,
+
+
+
+
+ intersection ([ 1, 2, 3 ], [ 2, 3, 5 ])
+ => [ 2, 3 ]
+
+
+
+
+
+
+ - Function File: complement (x, y)
+
-
+ Return the elements of set y that are not in set x. For
+ example,
+
+
+
+
+ complement ([ 1, 2, 3 ], [ 2, 3, 5 ])
+ => 5
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_25.html octave-2.0.14/doc/interpreter/octave_25.html
*** octave-2.0.13/doc/interpreter/octave_25.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_25.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,238 ----
+
+
+
+
+ GNU Octave - Polynomial Manipulations
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ In Octave, a polynomial is represented by its coefficients (arranged
+ in descending order). For example, a vector
+ of length
+ corresponds to the following polynomial of order
+
+
+
+
+ - Function File: compan (c)
+
-
+ Compute the companion matrix corresponding to polynomial coefficient
+ vector c.
+
+
+
+ The companion matrix is
+
+
+
+ The eigenvalues of the companion matrix are equal to the roots of the
+ polynomial.
+
+
+
+
+
+ - Function File: conv (a, b)
+
-
+ Convolve two vectors.
+
+
+
+ y = conv (a, b)
returns a vector of length equal to
+ length (a) + length (b) - 1
.
+ If a and b are polynomial coefficient vectors, conv
+ returns the coefficients of the product polynomial.
+
+
+
+
+
+ - Function File: deconv (y, a)
+
-
+ Deconvolve two vectors.
+
+
+
+ [b, r] = deconv (y, a)
solves for b and r such that
+ y = conv (a, b) + r
.
+
+
+
+ If y and a are polynomial coefficient vectors, b will
+ contain the coefficients of the polynomial quotient and r will be
+ a remander polynomial of lowest order.
+
+
+
+
+
+ - Function File: poly (a)
+
-
+ If a is a square N-by-N matrix,
poly (a)
+ is the row vector of the coefficients of det (z * eye (N) - a)
,
+ the characteristic polynomial of a. If x is a vector,
+ poly (x)
is a vector of coefficients of the polynomial
+ whose roots are the elements of x.
+
+
+
+
+
+ - Function File: polyderiv (c)
+
-
+ Return the coefficients of the derivative of the polynomial whose
+ coefficients are given by vector c.
+
+
+
+
+
+ - Function File: [p, yf] = polyfit (x, y, n)
+
-
+ Return the coefficients of a polynomial p(x) of degree
+ n that minimizes
+ to best fit the data in the least squares sense.
+
+
+
+
+ If two output arguments are requested, the second contains the values of
+ the polynomial for each value of x.
+
+
+
+
+ - Function File: polyinteg (c)
+
-
+ Return the coefficients of the integral of the polynomial whose
+ coefficients are represented by the vector c.
+
+
+
+ The constant of integration is set to zero.
+
+
+
+
+
+ - Function File: polyreduce (c)
+
-
+ Reduces a polynomial coefficient vector to a minimum number of terms by
+ stripping off any leading zeros.
+
+
+
+
+
+ - Function File: polyval (c, x)
+
-
+ Evaluate a polynomial.
+
+
+
+ polyval (c, x)
will evaluate the polynomial at the
+ specified value of x.
+
+
+
+ If x is a vector or matrix, the polynomial is evaluated at each of
+ the elements of x.
+
+
+
+
+
+ - Function File: polyvalm (c, x)
+
-
+ Evaluate a polynomial in the matrix sense.
+
+
+
+ polyvalm (c, x)
will evaluate the polynomial in the
+ matrix sense, i.e. matrix multiplication is used instead of element by
+ element multiplication as is used in polyval.
+
+
+
+ The argument x must be a square matrix.
+
+
+
+
+
+ - Function File: residue (b, a, tol)
+
-
+ If b and a are vectors of polynomial coefficients, then
+ residue calculates the partial fraction expansion corresponding to the
+ ratio of the two polynomials.
+
+
+
+
+ The function residue
returns r, p, k, and
+ e, where the vector r contains the residue terms, p
+ contains the pole values, k contains the coefficients of a direct
+ polynomial term (if it exists) and e is a vector containing the
+ powers of the denominators in the partial fraction terms.
+
+
+
+ Assuming b and a represent polynomials
+ we have:
+
+
+
+ where M is the number of poles (the length of the r,
+ p, and e vectors) and N is the length of the k
+ vector.
+
+
+
+ The argument tol is optional, and if not specified, a default
+ value of 0.001 is assumed. The tolerance value is used to determine
+ whether poles with small imaginary components are declared real. It is
+ also used to determine if two poles are distinct. If the ratio of the
+ imaginary part of a pole to the real part is less than tol, the
+ imaginary part is discarded. If two poles are farther apart than
+ tol they are distinct. For example,
+
+
+
+
+ b = [1, 1, 1];
+ a = [1, -5, 8, -4];
+ [r, p, k, e] = residue (b, a);
+ => r = [-2, 7, 3]
+ => p = [2, 2, 1]
+ => k = [](0x0)
+ => e = [1, 2, 1]
+
+
+
+ which implies the following partial fraction expansion
+
+
+
+
+
+ - Function File: roots (v)
+
-
+
+
+
+ For a vector v with N components, return
+ the roots of the polynomial
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_26.html octave-2.0.14/doc/interpreter/octave_26.html
*** octave-2.0.13/doc/interpreter/octave_26.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_26.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,435 ----
+
+
+
+
+ GNU Octave - Control Theory
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ Most of the functions described in this chapter were contributed by
+ A. Scottedward Hodel @email{A.S.Hodel@eng.auburn.edu} and R. Bruce Tenison
+ @email{Bruce.Tenison@eng.auburn.edu}. They have also written a larger
+ collection of functions for solving linear control problems. It is
+ currently being updated for Octave version 2, with snapshots of the
+ sources available from @url{ftp://ftp.eng.auburn.edu/pub/hodel}.
+
+
+
+
+ - Function File: [n, m, p] = abcddim (a, b, c, d)
+
-
+ Check for compatibility of the dimensions of the matrices defining
+ the linear system
+ or a similar discrete-time system.
+
+
+
+ If the matrices are compatibly dimensioned, then abcddim
returns
+
+
+
+
+ - n
+
-
+ The number of system states.
+
+
- m
+
-
+ The number of system inputs.
+
+
- p
+
-
+ The number of system outputs.
+
+
+
+ Otherwise abcddim
returns n = m = p = -1.
+
+
+
+
+
+ - Function File: are (a, b, c, opt)
+
-
+
+
+
+ Return the solution, x, of the algebraic Riccati equation
+
+
+
+ for identically dimensioned square matrices a, b, and
+ c. If b is not square, are
attempts to use
+ b*b'
instead. If c is not square, are
+ attempts to use c'*c
) instead.
+
+
+
+ To form the solution, Laub's Schur method (IEEE Transactions on
+ Automatic Control, 1979) is applied to the appropriate Hamiltonian
+ matrix.
+
+
+
+ The optional argument opt is passed to the eigenvalue balancing
+ routine. If it is omitted, a value of "B"
is assumed.
+
+
+
+
+
+ - Function File: c2d (a, b, t)
+
-
+ Convert the continuous time system described by:
+ into a discrete time equivalent model
+
+
+
+ via the matrix exponential assuming a zero-order hold on the input and
+ sample time t.
+
+
+
+
+
+ - Function File: dare (a, b, c, r, opt)
+
-
+
+
+
+ Return the solution, x of the discrete-time algebraic Riccati
+ equation
+
+
+
+ for matrices with dimensions:
+
+
+
+
+ - a
+
-
+ n by n.
+
+
- b
+
-
+ n by m.
+
+
- c
+
-
+ n by n, symmetric positive semidefinite.
+
+
- r
+
-
+ m by m, symmetric positive definite (invertible).
+
+
+
+ If c is not square, then the function attempts to use
+ c'*c
instead.
+
+
+
+ To form the solution, Laub's Schur method (IEEE Transactions on
+ Automatic Control, 1979) is applied to the appropriate symplectic
+ matrix.
+
+
+
+ See also Ran and Rodman, Stable Hermitian Solutions of Discrete
+ Algebraic Riccati Equations, Mathematics of Control, Signals and
+ Systems, Volume 5, Number 2 (1992).
+
+
+
+ The optional argument opt is passed to the eigenvalue balancing
+ routine. If it is omitted, a value of "B"
is assumed.
+
+
+
+
+
+ - Function File: dgram (a, b)
+
-
+ Return the discrete controllability or observability gramian for the
+ discrete time system described by
+
+
+
+ For example, dgram (a, b)
returns the discrete
+ controllability gramian and dgram (a', c')
returns
+ the observability gramian.
+
+
+
+
+
+ - Function File: [l, m, p, e] = dlqe (a, g, c, sigw, sigv, z)
+
-
+ Construct the linear quadratic estimator (Kalman filter) for the
+ discrete time system
+ where w, v are zero-mean gaussian noise processes with
+ respective intensities
sigw = cov (w, w)
and
+ sigv = cov (v, v)
.
+
+
+
+ If specified, z is cov (w, v)
. Otherwise
+ cov (w, v) = 0
.
+
+
+
+ The observer structure is
+
+
+
+ The following values are returned:
+
+
+
+
+ - l
+
-
+ The observer gain,
+ is stable.
+
+
- m
+
-
+ The Riccati equation solution.
+
+
- p
+
-
+ The estimate error covariance after the measurement update.
+
+
- e
+
-
+ The closed loop poles of
+
+
+
+
+
+ - Function File: [k, p, e] = dlqr (a, b, q, r, z)
+
-
+ Construct the linear quadratic regulator for the discrete time system
+ to minimize the cost functional
+
+
+
+ z omitted or
+ z included.
+
+
+
+ The following values are returned:
+
+
+
+
+ - k
+
-
+ The state feedback gain,
+ is stable.
+
+
- p
+
-
+ The solution of algebraic Riccati equation.
+
+
- e
+
-
+ The closed loop poles of
+
+
+
+
+
+ - Function File: dlyap (a, b)
+
-
+ Solve the discrete-time Lyapunov equation
+ for square matrices a, b. If b is not square, then the
+ function attempts to solve either
+ whichever is appropriate.
+
+
+
+ Uses Schur decomposition method as in Kitagawa
+ International Journal of Control, Volume 25, Number 5, pages 745--753
+ (1977); column-by-column solution method as suggested in
+ Hammerling, Numerical Solution of the Stable, Non-Negative
+ Definite Lyapunov Equation, IMA Journal of Numerical Analysis, Volume
+ 2, pages 303--323 (1982).
+
+
+
+
+
+ - Function File: is_controllable (a, b, tol)
+
-
+ Return 1 if the pair (a, b) is controllable. Otherwise,
+ return 0.
+
+
+
+ The optional argument tol is a roundoff parameter. If it is
+ omitted, a value of 2*eps
is used.
+
+
+
+ Currently, is_controllable
just constructs the controllability
+ matrix and checks rank.
+
+
+
+
+
+ - Function File: is_observable (a, c, tol)
+
-
+
+
+
+ Return 1 if the pair (a, c) is observable.
+ Otherwise, return 0.
+
+
+
+ The optional argument tol is a roundoff parameter. If it is
+ omitted, a value of 2*eps
is used.
+
+
+
+
+
+ - Function File: [k, p, e] = lqe (a, g, c, sigw, sigv, z)
+
-
+ Construct the linear quadratic estimator (Kalman filter) for the
+ continuous time system
+ where w and v are zero-mean gaussian noise processes with
+ respective intensities
+
+
+
+
+ sigw = cov (w, w)
+ sigv = cov (v, v)
+
+
+
+ The optional argument z is the cross-covariance
+ cov (w, v)
. If it is omitted,
+ cov (w, v) = 0
is assumed.
+
+
+
+ Observer structure is dz/dt = A z + B u + k (y - C z - D u)
+
+
+
+ The following values are returned:
+
+
+
+
+ - k
+
-
+ The observer gain,
+ is stable.
+
+
- p
+
-
+ The solution of algebraic Riccati equation.
+
+
- e
+
-
+ The vector of closed loop poles of
+
+
+
+
+
+ - Function File: [k, p, e] = lqr (a, b, q, r, z)
+
-
+ construct the linear quadratic regulator for the continuous time system
+ to minimize the cost functional
+
+
+
+ z omitted or
+ z included.
+
+
+
+ The following values are returned:
+
+
+
+
+ - k
+
-
+ The state feedback gain,
+ is stable.
+
+
- p
+
-
+ The stabilizing solution of appropriate algebraic Riccati equation.
+
+
- e
+
-
+ The vector of the closed loop poles of
+
+
+
+
+
+ - Function File: lyap (a, b, c)
+
-
+ Solve the Lyapunov (or Sylvester) equation via the Bartels-Stewart
+ algorithm (Communications of the ACM, 1972).
+
+
+
+ If a, b, and c are specified, then lyap
returns
+ the solution of the Sylvester equation
+
+
+
+ If only (a, b)
are specified, then lyap
returns the
+ solution of the Lyapunov equation
+
+
+
+ If b is not square, then lyap
returns the solution of either
+
+
+
+ or
+
+
+
+ whichever is appropriate.
+
+
+
+
+
+ - Function File: tzero (a, b, c, d, opt)
+
-
+ Compute the transmission zeros of
+
+
+
+ The optional argument opt is passed to the eigenvalue balancing
+ routine. If it is omitted, a value of "B"
is assumed.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_27.html octave-2.0.14/doc/interpreter/octave_27.html
*** octave-2.0.13/doc/interpreter/octave_27.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_27.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,220 ----
+
+
+
+
+ GNU Octave - Signal Processing
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ I hope that someday Octave will include more signal processing
+ functions. If you would like to help improve Octave in this area,
+ please contact @email{bug-octave@bevo.che.wisc.edu}.
+
+
+
+
+ - Function File: detrend (x, p)
+
-
+ If x is a vector,
detrend (x, p)
removes the
+ best fit of a polynomial of order p from the data x.
+
+
+
+ If x is a matrix, detrend (x, p)
does the same
+ for each column in x.
+
+
+
+ The second argument is optional. If it is not specified, a value of 1
+ is assumed. This corresponds to removing a linear trend.
+
+
+
+
+
+ - Function: fft (a, n)
+
-
+ Compute the FFT of a using subroutines from FFTPACK. If a
+ is a matrix,
fft
computes the FFT for each column of a.
+
+
+
+ If called with two arguments, n is expected to be an integer
+ specifying the number of elements of a to use. If a is a
+ matrix, n specifies the number of rows of a to use. If
+ n is larger than the size of a, a is resized and
+ padded with zeros.
+
+
+
+
+
+ - Loadable Function: ifft (a, n)
+
-
+ Compute the inverse FFT of a using subroutines from FFTPACK. If
+ a is a matrix,
fft
computes the inverse FFT for each column
+ of a.
+
+
+
+ If called with two arguments, n is expected to be an integer
+ specifying the number of elements of a to use. If a is a
+ matrix, n specifies the number of rows of a to use. If
+ n is larger than the size of a, a is resized and
+ padded with zeros.
+
+
+
+
+
+ - Loadable Function: fft2 (a, n, m)
+
-
+ Compute the two dimensional FFT of a.
+
+
+
+ The optional arguments n and m may be used specify the
+ number of rows and columns of a to use. If either of these is
+ larger than the size of a, a is resized and padded with
+ zeros.
+
+
+
+
+
+ - Loadable Function: ifft2 (a, n, m)
+
-
+ Compute the two dimensional inverse FFT of a.
+
+
+
+ The optional arguments n and m may be used specify the
+ number of rows and columns of a to use. If either of these is
+ larger than the size of a, a is resized and padded with
+ zeros.
+
+
+
+
+
+ - Built-in Function: fftconv (a, b, n)
+
-
+ Return the convolution of the vectors a and b, as a vector
+ with length equal to the
length (a) + length (b) - 1
. If a
+ and b are the coefficient vectors of two polynomials, the returned
+ value is the coefficient vector of the product polynomial.
+
+
+
+ The computation uses the FFT by calling the function fftfilt
. If
+ the optional argument n is specified, an N-point FFT is used.
+
+
+
+
+
+ - Function File: fftfilt (b, x, n)
+
-
+
+
+
+ With two arguments, fftfilt
filters x with the FIR filter
+ b using the FFT.
+
+
+
+ Given the optional third argument, n, fftfilt
uses the
+ overlap-add method to filter x with b using an N-point FFT.
+
+
+
+
+
+ - Loadable Function: y = filter (b, a, x)
+
-
+ Return the solution to the following linear, time-invariant difference
+ equation:
+
+
+
+ where
+ An equivalent form of this equation is:
+
+
+
+ where
+
+
+
+ In terms of the z-transform, y is the result of passing the discrete-
+ time signal x through a system characterized by the following rational
+ system function:
+
+
+
+
+
+ - Loadable Function: [y, sf] = filter (b, a, x, si)
+
-
+ This is the same as the
filter
function described above, except
+ that si is taken as the initial state of the system and the final
+ state is returned as sf. The state vector is a column vector
+ whose length is equal to the length of the longest coefficient vector
+ minus one. If si is not set, the initial state vector is set to
+ all zeros.
+
+
+
+
+
+ - Function File: [h, w] = freqz (b, a, n, "whole")
+
-
+ Return the complex frequency response h of the rational IIR filter
+ whose numerator and denominator coefficients are b and a,
+ respectively. The response is evaluated at n angular frequencies
+ between 0 and
+
+
+
+ The output value w is a vector of the frequencies.
+
+
+
+ If the fourth argument is omitted, the response is evaluated at
+ frequencies between 0 and
+
+
+
+ If n is omitted, a value of 512 is assumed.
+
+
+
+ If a is omitted, the denominator is assumed to be 1 (this
+ corresponds to a simple FIR filter).
+
+
+
+ For fastest computation, n should factor into a small number of
+ small primes.
+
+
+
+
+
+ - Function File: sinc (x)
+
-
+ Return
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_28.html octave-2.0.14/doc/interpreter/octave_28.html
*** octave-2.0.13/doc/interpreter/octave_28.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_28.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,240 ----
+
+
+
+
+ GNU Octave - Image Processing
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ Octave can display images with the X Window System using the
+ xloadimage
program. You do not need to be running X in order to
+ manipulate images, however, so some of these functions may be useful
+ even if you are not able to view the results.
+
+
+
+ Loading images only works with Octave's image format (a file with a
+ matrix containing the image data, and a matrix containing the
+ colormap). Contributions of robust, well-written functions to read
+ other image formats are welcome. If you can provide them, or would like
+ to improve Octave's image processing capabilities in other ways, please
+ contact @email{bug-octave@bevo.che.wisc.edu}.
+
+
+
+
+ - Function File: colormap (map)
+
-
+
- Function File: colormap ("default")
+
-
+ Set the current colormap.
+
+
+
+ colormap (map)
sets the current colormap to map. The
+ color map should be an n row by 3 column matrix. The columns
+ contain red, green, and blue intensities respectively. All entries
+ should be between 0 and 1 inclusive. The new colormap is returned.
+
+
+
+ colormap ("default")
restores the default colormap (a gray scale
+ colormap with 64 entries). The default colormap is returned.
+
+
+
+ With no arguments, colormap
returns the current color map.
+
+
+
+
+
+ - Function File: gray (n)
+
-
+ Return a gray colormap with n entries corresponding to values from
+ 0 to n. The argument n should be a scalar. If it is
+ omitted, 64 is assumed.
+
+
+
+
+
+ - Function File: [img, map] = gray2ind ()
+
-
+ Convert a gray scale intensity image to an Octave indexed image.
+
+
+
+
+
+ - Function File: image (x, zoom)
+
-
+ Display a matrix as a color image. The elements of x are indices
+ into the current colormap and should have values between 1 and the
+ length of the colormap. If zoom is omitted, a value of 4 is
+ assumed.
+
+
+
+
+
+ - Function File: imagesc (x, zoom)
+
-
+ Display a scaled version of the matrix x as a color image. The
+ matrix is scaled so that its entries are indices into the current
+ colormap. The scaled matrix is returned. If zoom is omitted, a
+ value of 4 is assumed.
+
+
+
+
+
+ - Function File: imshow (x, map)
+
-
+
- Function File: imshow (x, n)
+
-
+
- Function File: imshow (i, n)
+
-
+
- Function File: imshow (r, g, b)
+
-
+ Display images.
+
+
+
+ imshow (x)
displays an indexed image using the current
+ colormap.
+
+
+
+ imshow (x, map)
displays an indexed image using the
+ specified colormap.
+
+
+
+ imshow (i, n)
displays a gray scale intensity image.
+
+
+
+ imshow (r, g, b)
displays an RGB image.
+
+
+
+
+
+ - Function File: ind2gray (x, map)
+
-
+ Convert an Octave indexed image to a gray scale intensity image.
+ If map is omitted, the current colormap is used to determine the
+ intensities.
+
+
+
+
+
+ - Function File: [r, g, b] = ind2rgb (x, map)
+
-
+ Convert an indexed image to red, green, and blue color components.
+ If map is omitted, the current colormap is used for the conversion.
+
+
+
+
+
+ - Function File: [x, map] = loadimage (file)
+
-
+ Load an image file and it's associated color map from the specified
+ file. The image must be stored in Octave's image format.
+
+
+
+
+
+ - Function File: rgb2ntsc (rgb)
+
-
+ Image format conversion.
+
+
+
+
+
+ - Function File: ntsc2rgb (yiq)
+
-
+ Image format conversion.
+
+
+
+
+
+ - Function File: ocean (n)
+
-
+ Create color colormap. The argument n should be a scalar. If it
+ is omitted, 64 is assumed.
+
+
+
+
+
+ - Function File: [x, map] = rgb2ind (r, g, b)
+
-
+ Convert and RGB image to an Octave indexed image.
+
+
+
+
+
+ - Function File: saveimage (file, x, fmt, map)
+
-
+ Save the matrix x to file in image format fmt. Valid
+ values for fmt are
+
+
+
+
+ "img"
+ -
+ Octave's image format. The current colormap is also saved in the file.
+
+
"ppm"
+ -
+ Portable pixmap format.
+
+
"ps"
+ -
+ PostScript format. Note that images saved in PostScript format can not
+ be read back into Octave with loadimage.
+
+
+
+ If the fourth argument is supplied, the specified colormap will also be
+ saved along with the image.
+
+
+
+ Note: if the colormap contains only two entries and these entries are
+ black and white, the bitmap ppm and PostScript formats are used. If the
+ image is a gray scale image (the entries within each row of the colormap
+ are equal) the gray scale ppm and PostScript image formats are used,
+ otherwise the full color formats are used.
+
+
+
+
+
+ - Built-in Variable: IMAGEPATH
+
-
+ A colon separated list of directories in which to search for image
+ files.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_29.html octave-2.0.14/doc/interpreter/octave_29.html
*** octave-2.0.13/doc/interpreter/octave_29.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_29.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,155 ----
+
+
+
+
+ GNU Octave - Audio Processing
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ Octave provides a few functions for dealing with audio data. An audio
+ `sample' is a single output value from an A/D converter, i.e., a small
+ integer number (usually 8 or 16 bits), and audio data is just a series
+ of such samples. It can be characterized by three parameters: the
+ sampling rate (measured in samples per second or Hz, e.g. 8000 or
+ 44100), the number of bits per sample (e.g. 8 or 16), and the number of
+ channels (1 for mono, 2 for stereo, etc.).
+
+
+
+ There are many different formats for representing such data. Currently,
+ only the two most popular, linear encoding and mu-law
+ encoding, are supported by Octave. There is an excellent FAQ on audio
+ formats by Guido van Rossum <guido@cwi.nl> which can be found at any
+ FAQ ftp site, in particular in the directory
+ `/pub/usenet/news.answers/audio-fmts' of the archive site
+ rtfm.mit.edu
.
+
+
+
+ Octave simply treats audio data as vectors of samples (non-mono data are
+ not supported yet). It is assumed that audio files using linear
+ encoding have one of the extensions `lin' or `raw', and that
+ files holding data in mu-law encoding end in `au', `mu', or
+ `snd'.
+
+
+
+
+ - Function File: lin2mu (x)
+
-
+ If the vector x represents mono audio data in 8- or 16-bit
+ linear encoding,
lin2mu (x)
is the corresponding mu-law
+ encoding.
+
+
+
+
+
+ - Function File: mu2lin (x, bps)
+
-
+ If the vector x represents mono audio data in mu-law encoding,
+
mu2lin
converts it to linear encoding. The optional argument
+ bps specifies whether the input data uses 8 bit per sample
+ (default) or 16 bit.
+
+
+
+
+
+ - Function File: loadaudio (name, ext, bps)
+
-
+ Loads audio data from the file `name.ext' into the
+ vector x.
+
+
+
+ The extension ext determines how the data in the audio file is
+ interpreted; the extensions `lin' (default) and `raw'
+ correspond to linear, the extensions `au', `mu', or `snd'
+ to mu-law encoding.
+
+
+
+ The argument bps can be either 8 (default) or 16, and specifies
+ the number of bits per sample used in the audio file.
+
+
+
+
+
+ - Function File: saveaudio (name, x, ext, bps)
+
-
+ Saves a vector x of audio data to the file
+ `name.ext'. The optional parameters ext and
+ bps determine the encoding and the number of bits per sample used
+ in the audio file (see
loadaudio
); defaults are `lin' and
+ 8, respectively.
+
+
+
+
+ The following functions for audio I/O require special A/D hardware and
+ operating system support. It is assumed that audio data in linear
+ encoding can be played and recorded by reading from and writing to
+ `/dev/dsp', and that similarly `/dev/audio' is used for mu-law
+ encoding. These file names are system-dependent. Improvements so that
+ these functions will work without modification on a wide variety of
+ hardware are welcome.
+
+
+
+
+ - Function File: playaudio (name, ext)
+
-
+
- Function File: playaudio (x)
+
-
+ Plays the audio file `name.ext' or the audio data
+ stored in the vector x.
+
+
+
+
+
+ - Function File: record (sec, sampling_rate)
+
-
+ Records sec seconds of audio input into the vector x. The
+ default value for sampling_rate is 8000 samples per second, or
+ 8kHz. The program waits until the user types RET and then
+ immediately starts to record.
+
+
+
+
+
+ - Function File: setaudio (type)
+
-
+
- Function File: setaudio (type, value)
+
-
+ Set or display various properties of your mixer hardware.
+
+
+
+ For example, if vol
corresponds to the volume property, you can
+ set it to 50 (percent) by setaudio ("vol", 50)
.
+
+
+
+ This is an simple experimental program to control the audio hardware
+ settings. It assumes that there is a mixer
program which can be
+ used as mixer type value
, and simply executes
+ system ("mixer type value")
. Future releases might
+ get rid of this assumption by using the fcntl
interface.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_3.html octave-2.0.14/doc/interpreter/octave_3.html
*** octave-2.0.13/doc/interpreter/octave_3.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_3.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,1507 ----
+
+
+
+
+ GNU Octave - Getting Started
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ This chapter explains some of Octave's basic features, including how to
+ start an Octave session, get help at the command prompt, edit the
+ command line, and write Octave programs that can be executed as commands
+ from your shell.
+
+
+
+
+
+
+
+
+ Normally, Octave is used interactively by running the program
+ `octave' without any arguments. Once started, Octave reads
+ commands from the terminal until you tell it to exit.
+
+
+
+ You can also specify the name of a file on the command line, and Octave
+ will read and execute the commands from the named file and then exit
+ when it is finished.
+
+
+
+ You can further control how Octave starts by using the command-line
+ options described in the next section, and Octave itself can remind you
+ of the options available. Type `octave --help' to display all
+ available options and briefly describe their use (`octave -h' is a
+ shorter equivalent).
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Here is a complete list of all the command line options that Octave
+ accepts.
+
+
+
+
+ --debug
+ -
+
-d
+ -
+
+
+ Enter parser debugging mode. Using this option will cause Octave's
+ parser to print a lot of information about the commands it reads, and is
+ probably only useful if you are actually trying to debug the parser.
+
+
--echo-commands
+ -
+
-x
+ -
+
+
+ Echo commands as they are executed.
+
+
--exec-path path
+ -
+
+ Specify the path to search for programs to run. The value of path
+ specified on the command line will override any value of
+
OCTAVE_EXEC_PATH
found in the environment, but not any commands
+ in the system or user startup files that set the built-in variable
+ EXEC_PATH
.
+
+ --help
+ -
+
-h
+ -
+
-?
+ -
+
+
+
+ Print short help message and exit.
+
+
--info-file filename
+ -
+
+ Specify the name of the info file to use. The value of filename
+ specified on the command line will override any value of
+
OCTAVE_INFO_FILE
found in the environment, but not any commands
+ in the system or user startup files that set the built-in variable
+ INFO_FILE
.
+
+ --info-program program
+ -
+
+ Specify the name of the info program to use. The value of program
+ specified on the command line will override any value of
+
OCTAVE_INFO_PROGRAM
found in the environment, but not any
+ commands in the system or user startup files that set the built-in
+ variable INFO_PROGRAM
.
+
+ --interactive
+ -
+
-i
+ -
+
+
+ Force interactive behavior. This can be useful for running Octave via a
+ remote shell command or inside an Emacs shell buffer. For another way
+ to run Octave within Emacs, see section Emacs Octave Support.
+
+
--no-init-file
+ -
+
+ Don't read the `~/.octaverc' or `.octaverc' files.
+
+
--no-line-editing
+ -
+
+ Disable command-line editing.
+
+
--no-site-file
+ -
+
+ Don't read the site-wide `octaverc' file.
+
+
--norc
+ -
+
-f
+ -
+
+
+ Don't read any of the system or user initialization files at startup.
+ This is equivalent to using both of the options
--no-init-file
+ and --no-site-file
.
+
+ --path path
+ -
+
-p path
+ -
+
+
+ Specify the path to search for function files. The value of path
+ specified on the command line will override any value of
+
OCTAVE_PATH
found in the environment, but not any commands in the
+ system or user startup files that set the built-in variable LOADPATH
.
+
+ --silent
+ -
+
--quiet
+ -
+
-q
+ -
+
+
+
+ Don't print the usual greeting and version message at startup.
+
+
--traditional
+ -
+
--braindead
+ -
+
+
+ Set initial values for user-preference variables to the following
+ values for compatibility with MATLAB.
+
+
+
+ PS1 = ">> "
+ PS2 = ""
+ beep_on_error = 1
+ default_save_format = "mat-binary"
+ define_all_return_values = 1
+ do_fortran_indexing = 1
+ empty_list_elements_ok = 1
+ implicit_str_to_num_ok = 1
+ ok_to_lose_imaginary_part = 1
+ page_screen_output = 0
+ prefer_column_vectors = 0
+ print_empty_dimensions = 0
+ treat_neg_dim_as_zero = 1
+ warn_function_name_clash = 0
+ whitespace_in_literal_matrix = "traditional"
+
+
+ --verbose
+ -
+
-V
+ -
+
+
+ Turn on verbose output.
+
+
--version
+ -
+
-v
+ -
+
+
+ Print the program version number and exit.
+
+
file
+ -
+ Execute commands from file.
+
+
+
+ Octave also includes several built-in variables that contain information
+ about the command line, including the number of arguments and all of the
+ options.
+
+
+
+
+ - Built-in Variable: argv
+
-
+ The command line arguments passed to Octave are available in this
+ variable. For example, if you invoked Octave using the command
+
+
+
+
+ octave --no-line-editing --silent
+
+
+
+ argv
would be a string vector with the elements
+ --no-line-editing
and --silent
.
+
+
+
+ If you write an executable Octave script, argv
will contain the
+ list of arguments passed to the script. see section Executable Octave Programs.
+
+
+
+
+
+ - Built-in Variable: program_invocation_name
+
-
+
- Built-in Variable: program_name
+
-
+ When Octave starts, the value of the built-in variable
+
program_invocation_name
is automatically set to the name that was
+ typed at the shell prompt to run Octave, and the value of
+ program_name
is automatically set to the final component of
+ program_invocation_name
. For example, if you typed
+ `/usr/local/bin/octave' to start Octave,
+ program_invocation_name
would have the value
+ "/usr/local/bin/octave"
, and program_name
would
+ have the value "octave"
.
+
+
+
+ If executing a script from the command line (e.g., octave foo.m
+ or using an executable Octave script, the program name is set to the
+ name of the script. See section Executable Octave Programs for an example of
+ how to create an executable Octave script.
+
+
+
+
+ Here is an example of using these variables to reproduce Octave's
+ command line.
+
+
+
+
+ printf ("%s", program_name);
+ for i = 1:nargin
+ printf (" %s", argv(i,:));
+ endfor
+ printf ("\n");
+
+
+
+ See section Index Expressions for an explanation of how to properly index
+ arrays of strings and substrings in Octave, and See section Defining Functions
+ for information about the variable nargin
.
+
+
+
+
+
+
+
+
+
+
+
+ When Octave starts, it looks for commands to execute from the following
+ files:
+
+
+
+
+
+
+
+
+ octave-home/share/octave/site/m/startup/octaverc
+ -
+ Where octave-home is the directory in which all of Octave is
+ installed (the default is `/usr/local'). This file is
+ provided so that changes to the default Octave environment can be made
+ globally for all users at your site for all versions of Octave you have
+ installed. Some care should be taken when making changes to this file,
+ since all users of Octave at your site will be affected.
+
+
octave-home/share/octave/version/m/startup/octaverc
+ -
+ Where octave-home is the directory in which all of Octave is
+ installed (the default is `/usr/local'), and version
+ is the version number of Octave. This file is provided so that changes
+ to the default Octave environment can be made globally for all users for
+ a particular version of Octave. Some care should be taken when making
+ changes to this file, since all users of Octave at your site will be
+ affected.
+
+
~/.octaverc
+ -
+
+ This file is normally used to make personal changes to the default
+ Octave environment.
+
+
.octaverc
+ -
+
+ This file can be used to make changes to the default Octave environment
+ for a particular project. Octave searches for this file in the current
+ directory after it reads `~/.octaverc'. Any use of the
cd
+ command in the `~/.octaverc' file will affect the directory that
+ Octave searches for the file `.octaverc'.
+
+ If you start Octave in your home directory, commands from from the file
+ `~/.octaverc' will only be executed once.
+
+
+
+ A message will be displayed as each of the startup files is read if you
+ invoke Octave with the --verbose
option but without the
+ --silent
option.
+
+
+
+ Startup files may contain any valid Octave commands, including function
+ definitions.
+
+
+
+
+
+
+
+
+
+
+
+
+ - Built-in Function: exit (status)
+
-
+
- Built-in Function: quit (status)
+
-
+ Exit the current Octave session. If the optional integer value
+ status is supplied, pass that value to the operating system as the
+ Octave's exit status.
+
+
+
+
+
+ - Built-in Function: atexit (fcn)
+
-
+ Register function to be called when Octave exits. For example,
+
+
+
+
+ function print_flops_at_exit ()
+ printf ("\n%s\n", system ("fortune"));
+ fflush (stdout);
+ endfunction
+ atexit ("print_flops_at_exit");
+
+
+
+ will print a message when Octave exits.
+
+
+
+
+
+
+
+
+
+
+
+
+ The entire text of this manual is available from the Octave prompt
+ via the command help -i. In addition, the documentation for
+ individual user-written functions and variables is also available via
+ the help command. This section describes the commands used for
+ reading the manual and the documentation strings for user-supplied
+ functions and variables. See section Function Files, for more information
+ about how to document the functions you write.
+
+
+
+
+ - Command: help
+
-
+ Octave's
help
command can be used to print brief usage-style
+ messages, or to display information directly from an on-line version of
+ the printed manual, using the GNU Info browser. If invoked without any
+ arguments, help
prints a list of all the available operators,
+ functions, and built-in variables. If the first argument is -i
,
+ the help
command searches the index of the on-line version of
+ this manual for the given topics.
+
+
+
+ For example, the command help help prints a short message
+ describing the help
command, and help -i help starts the
+ GNU Info browser at this node in the on-line version of the manual.
+
+
+
+ Once the GNU Info browser is running, help for using it is available
+ using the command C-h.
+
+
+
+
+ The help command can give you information about operators, but not the
+ comma and semicolons that are used as command separators. To get help
+ for those, you must type help comma or help semicolon.
+
+
+
+
+ - Built-in Variable: INFO_FILE
+
-
+ The variable
INFO_FILE
names the location of the Octave info file.
+ The default value is "octave-home/info/octave.info"
, where
+ octave-home is the directory where all of Octave is installed.
+
+
+
+
+
+ - Built-in Variable: INFO_PROGRAM
+
-
+ The variable
INFO_PROGRAM
names the info program to run. Its
+ initial value is
+ "octave-home/libexec/octave/version/exec/arch/info"
,
+ where octave-home is the directory where all of Octave is
+ installed, version is the Octave version number, and arch is
+ the machine type. The value of INFO_PROGRAM
can be overridden by
+ the environment variable OCTAVE_INFO_PROGRAM
, or the command line
+ argument --info-program NAME
, or by setting the value of the
+ built-in variable INFO_PROGRAM
in a startup script.
+
+
+
+
+
+ - Built-in Variable: suppress_verbose_help_message
+
-
+ If the value of
suppress_verbose_help_message
is nonzero, Octave
+ will not add additional help information to the end of the output from
+ the help
command and usage messages for built-in commands.
+
+
+
+
+
+
+
+
+
+
+
+
+ Octave uses the GNU readline library to provide an extensive set of
+ command-line editing and history features. Only the most common
+ features are described in this manual. Please see The GNU Readline
+ Library manual for more information.
+
+
+
+ To insert printing characters (letters, digits, symbols, etc.), simply
+ type the character. Octave will insert the character at the cursor and
+ advance the cursor forward.
+
+
+
+ Many of the command-line editing functions operate using control
+ characters. For example, the character Control-a moves the cursor
+ to the beginning of the line. To type C-a, hold down CTRL
+ and then press a. In the following sections, control characters
+ such as Control-a are written as C-a.
+
+
+
+ Another set of command-line editing functions use Meta characters. On
+ some terminals, you type M-u by holding down META and
+ pressing u. If your terminal does not have a META key, you
+ can still type Meta charcters using two-character sequences starting
+ with ESC. Thus, to enter M-u, you could type
+ ESCu. The ESC character sequences are also allowed on
+ terminals with real Meta keys. In the following sections, Meta
+ characters such as Meta-u are written as M-u.
+
+
+
+
+
+
+
+
+ The following commands allow you to position the cursor.
+
+
+
+
+ - C-b
+
-
+ Move back one character.
+
+
- C-f
+
-
+ Move forward one character.
+
+
- DEL
+
-
+ Delete the character to the left of the cursor.
+
+
- C-d
+
-
+ Delete the character underneath the cursor.
+
+
- M-f
+
-
+ Move forward a word.
+
+
- M-b
+
-
+ Move backward a word.
+
+
- C-a
+
-
+ Move to the start of the line.
+
+
- C-e
+
-
+ Move to the end of the line.
+
+
- C-l
+
-
+ Clear the screen, reprinting the current line at the top.
+
+
- C-_
+
-
+
- C-/
+
-
+ Undo the last thing that you did. You can undo all the way back to an
+ empty line.
+
+
- M-r
+
-
+ Undo all changes made to this line. This is like typing the `undo'
+ command enough times to get back to the beginning.
+
+
+
+ The above table describes the most basic possible keystrokes that you need
+ in order to do editing of the input line. On most terminals, you can
+ also use the arrow keys in place of C-f and C-b to move
+ forward and backward.
+
+
+
+ Notice how C-f moves forward a character, while M-f moves
+ forward a word. It is a loose convention that control keystrokes
+ operate on characters while meta keystrokes operate on words.
+
+
+
+ There is also a function available so that you can clear the screen from
+ within Octave programs.
+
+
+
+
+
+
+
+
+ - Built-in Function: clc ()
+
-
+
- Built-in Function: home ()
+
-
+ Clear the terminal screen and move the cursor to the upper left corner.
+
+
+
+
+
+
+
+
+ Killing text means to delete the text from the line, but to save
+ it away for later use, usually by yanking it back into the line.
+ If the description for a command says that it `kills' text, then you can
+ be sure that you can get the text back in a different (or the same)
+ place later.
+
+
+
+ Here is the list of commands for killing text.
+
+
+
+
+ - C-k
+
-
+ Kill the text from the current cursor position to the end of the line.
+
+
- M-d
+
-
+ Kill from the cursor to the end of the current word, or if between
+ words, to the end of the next word.
+
+
- M-DEL
+
-
+ Kill from the cursor to the start of the previous word, or if between
+ words, to the start of the previous word.
+
+
- C-w
+
-
+ Kill from the cursor to the previous whitespace. This is different than
+ M-DEL because the word boundaries differ.
+
+
+
+ And, here is how to yank the text back into the line. Yanking
+ means to copy the most-recently-killed text from the kill buffer.
+
+
+
+
+ - C-y
+
-
+ Yank the most recently killed text back into the buffer at the cursor.
+
+
- M-y
+
-
+ Rotate the kill-ring, and yank the new top. You can only do this if
+ the prior command is C-y or M-y.
+
+
+
+ When you use a kill command, the text is saved in a kill-ring.
+ Any number of consecutive kills save all of the killed text together, so
+ that when you yank it back, you get it in one clean sweep. The kill
+ ring is not line specific; the text that you killed on a previously
+ typed line is available to be yanked back later, when you are typing
+ another line.
+
+
+
+
+
+
+
+ The following commands can be used for entering characters that would
+ otherwise have a special meaning (e.g., TAB, C-q, etc.), or
+ for quickly correcting typing mistakes.
+
+
+
+
+ - C-q
+
-
+
- C-v
+
-
+ Add the next character that you type to the line verbatim. This is
+ how to insert things like C-q for example.
+
+
- M-TAB
+
-
+ Insert a tab character.
+
+
- C-t
+
-
+ Drag the character before the cursor forward over the character at the
+ cursor, also moving the cursor forward. If the cursor is at the end of
+ the line, then transpose the two characters before it.
+
+
- M-t
+
-
+ Drag the word behind the cursor past the word in front of the cursor
+ moving the cursor over that word as well.
+
+
- M-u
+
-
+ Uppercase the characters following the cursor to the end of the current
+ (or following) word, moving the cursor to the end of the word.
+
+
- M-l
+
-
+ Lowecase the characters following the cursor to the end of the current
+ (or following) word, moving the cursor to the end of the word.
+
+
- M-c
+
-
+ Uppercase the character following the cursor (or the beginning of the
+ next word if the cursor is between words), moving the cursor to the end
+ of the word.
+
+
+
+
+
+
+
+
+
+
+ The following commands allow Octave to complete command and variable
+ names for you.
+
+
+
+
+ - TAB
+
-
+ Attempt to do completion on the text before the cursor. Octave can
+ complete the names of commands and variables.
+
+
- M-?
+
-
+ List the possible completions of the text before the cursor.
+
+
+
+
+ - Built-in Variable: completion_append_char
+
-
+ The value of
completion_append_char
is used as the character to
+ append to successful command-line completion attempts. The default
+ value is " "
(a single space).
+
+
+
+
+
+ - Built-in Function: completion_matches (hint)
+
-
+ Generate possible completions given hint.
+
+
+
+ This function is provided for the benefit of programs like Emacs which
+ might be controlling Octave and handling user input. The current
+ command number is not incremented when this function is called. This is
+ a feature, not a bug.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Octave normally keeps track of the commands you type so that you can
+ recall previous commands to edit or execute them again. When you exit
+ Octave, the most recent commands you have typed, up to the number
+ specified by the variable history_size
, are saved in a file.
+ When Octave starts, it loads an initial list of commands from the file
+ named by the variable history_file
.
+
+
+
+ Here are the commands for simple browsing and searching the history
+ list.
+
+
+
+
+ - LFD
+
-
+
- RET
+
-
+ Accept the line regardless of where the cursor is. If this line is
+ non-empty, add it to the history list. If this line was a history
+ line, then restore the history line to its original state.
+
+
- C-p
+
-
+ Move `up' through the history list.
+
+
- C-n
+
-
+ Move `down' through the history list.
+
+
- M-<
+
-
+ Move to the first line in the history.
+
+
- M->
+
-
+ Move to the end of the input history, i.e., the line you are entering!
+
+
- C-r
+
-
+ Search backward starting at the current line and moving `up' through
+ the history as necessary. This is an incremental search.
+
+
- C-s
+
-
+ Search forward starting at the current line and moving `down' through
+ the history as necessary.
+
+
+
+ On most terminals, you can also use the arrow keys in place of C-p
+ and C-n to move through the history list.
+
+
+
+ In addition to the keyboard commands for moving through the history
+ list, Octave provides three functions for viewing, editing, and
+ re-running chunks of commands from the history list.
+
+
+
+
+ - Command: history options
+
-
+ If invoked with no arguments,
history
displays a list of commands
+ that you have executed. Valid options are:
+
+
+
+
+ -w file
+ -
+ Write the current history to the file file. If the name is
+ omitted, use the default history file (normally `~/.octave_hist').
+
+
-r file
+ -
+ Read the file file, replacing the current history list with its
+ contents. If the name is omitted, use the default history file
+ (normally `~/.octave_hist').
+
+
N
+ -
+ Only display the most recent N lines of history.
+
+
-q
+ -
+ Don't number the displayed lines of history. This is useful for cutting
+ and pasting commands if you are using the X Window System.
+
+
+
+ For example, to display the five most recent commands that you have
+ typed without displaying line numbers, use the command
+ history -q 5.
+
+
+
+
+
+ - Command: edit_history options
+
-
+ If invoked with no arguments,
edit_history
allows you to edit the
+ history list using the editor named by the variable EDITOR
. The
+ commands to be edited are first copied to a temporary file. When you
+ exit the editor, Octave executes the commands that remain in the file.
+ It is often more convenient to use edit_history
to define functions
+ rather than attempting to enter them directly on the command line.
+ By default, the block of commands is executed as soon as you exit the
+ editor. To avoid executing any commands, simply delete all the lines
+ from the buffer before exiting the editor.
+
+
+
+ The edit_history
command takes two optional arguments specifying
+ the history numbers of first and last commands to edit. For example,
+ the command
+
+
+
+
+ edit_history 13
+
+
+
+ extracts all the commands from the 13th through the last in the history
+ list. The command
+
+
+
+
+ edit_history 13 169
+
+
+
+ only extracts commands 13 through 169. Specifying a larger number for
+ the first command than the last command reverses the list of commands
+ before placing them in the buffer to be edited. If both arguments are
+ omitted, the previous command in the history list is used.
+
+
+
+
+
+ - Command: run_history
+
-
+ Similar to
edit_history
, except that the editor is not invoked,
+ and the commands are simply executed as they appear in the history list.
+
+
+
+
+
+ - Built-in Variable: EDITOR
+
-
+ A string naming the editor to use with the
edit_history
command.
+ If the environment variable EDITOR
is set when Octave starts, its
+ value is used as the default. Otherwise, EDITOR
is set to
+ "emacs"
.
+
+
+
+
+
+ - Built-in Variable: history_file
+
-
+ This variable specifies the name of the file used to store command
+ history. The default value is
"~/.octave_hist"
, but may be
+ overridden by the environment variable OCTAVE_HISTFILE
.
+
+
+
+
+
+ - Built-in Variable: history_size
+
-
+ This variable specifies how many entries to store in the history file.
+ The default value is
1024
, but may be overridden by the
+ environment variable OCTAVE_HISTSIZE
.
+
+
+
+
+
+ - Built-in Variable: saving_history
+
-
+ If the value of
saving_history
is nonzero, command entered
+ on the command line are saved in the file specified by the variable
+ history_file
.
+
+
+
+
+
+
+
+
+
+
+
+
+ The following variables are available for customizing the appearance of
+ the command-line prompts. Octave allows the prompt to be customized by
+ inserting a number of backslash-escaped special characters that are
+ decoded as follows:
+
+
+
+
+ - `\t'
+
-
+ The time.
+
+
- `\d'
+
-
+ The date.
+
+
- `\n'
+
-
+ Begins a new line by printing the equivalent of a carriage return
+ followed by a line feed.
+
+
- `\s'
+
-
+ The name of the program (usually just `octave').
+
+
- `\w'
+
-
+ The current working directory.
+
+
- `\W'
+
-
+ The basename of the current working directory.
+
+
- `\u'
+
-
+ The username of the current user.
+
+
- `\h'
+
-
+ The hostname, up to the first `.'.
+
+
- `\H'
+
-
+ The hostname.
+
+
- `\#'
+
-
+ The command number of this command, counting from when Octave starts.
+
+
- `\!'
+
-
+ The history number of this command. This differs from `\#' by the
+ number of commands in the history list when Octave starts.
+
+
- `\$'
+
-
+ If the effective UID is 0, a `#', otherwise a `$'.
+
+
- `\nnn'
+
-
+ The character whose character code in octal is nnn.
+
+
- `\\'
+
-
+ A backslash.
+
+
+
+
+ - Built-in Variable: PS1
+
-
+ The primary prompt string. When executing interactively, Octave
+ displays the primary prompt
PS1
when it is ready to read a
+ command.
+
+
+
+ The default value of PS1
is "\s:\#> "
. To change it, use a
+ command like
+
+
+
+
+ octave:13> PS1 = "\\u@\\H> "
+
+
+
+ which will result in the prompt `boris@kremvax> ' for the user
+ `boris' logged in on the host `kremvax.kgb.su'. Note that two
+ backslashes are required to enter a backslash into a string.
+ See section Strings.
+
+
+
+
+
+ - Built-in Variable: PS2
+
-
+ The secondary prompt string, which is printed when Octave is
+ expecting additional input to complete a command. For example, when
+ defining a function over several lines, Octave will print the value of
+
PS1
at the beginning of each line after the first. The default
+ value of PS2
is "> "
.
+
+
+
+
+
+ - Built-in Variable: PS4
+
-
+ If Octave is invoked with the
--echo-input
option, the value of
+ PS4
is printed before each line of input that is echoed. The
+ default value of PS4
is "+ "
. See section Invoking Octave, for
+ a description of --echo-input
.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Octave's diary feature allows you to keep a log of all or part of an
+ interactive session by recording the input you type and the output that
+ Octave produces in a separate file.
+
+
+
+
+ - Command: diary options
+
-
+ Create a list of all commands and the output they produce, mixed
+ together just as you see them on your terminal. Valid options are:
+
+
+
+
+ on
+ -
+ Start recording your session in a file called `diary' in your
+ current working directory.
+
+
off
+ -
+ Stop recording your session in the diary file.
+
+
file
+ -
+ Record your session in the file named file.
+
+
+
+ Without any arguments, diary
toggles the current diary state.
+
+
+
+
+ Sometimes it is useful to see the commands in a function or script as
+ they are being evaluated. This can be especially helpful for debugging
+ some kinds of problems.
+
+
+
+
+ - Command: echo options
+
-
+ Control whether commands are displayed as they are executed. Valid
+ options are:
+
+
+
+
+ on
+ -
+ Enable echoing of commands as they are executed in script files.
+
+
off
+ -
+ Disable echoing of commands as they are executed in script files.
+
+
on all
+ -
+ Enable echoing of commands as they are executed in script files and
+ functions.
+
+
off all
+ -
+ Disable echoing of commands as they are executed in script files and
+ functions.
+
+
+
+ If invoked without any arguments, echo
toggles the current echo
+ state.
+
+
+
+
+
+ - Built-in Variable: echo_executing_commands
+
-
+ This variable is may also be used to control the echo state. It may be
+ the sum of the following values:
+
+
+
+
+ - 1
+
-
+ Echo commands read from script files.
+
+
- 2
+
-
+ Echo commands from functions.
+
+
- 4
+
-
+ Echo commands read from command line.
+
+
+
+ More than one state can be active at once. For example, a value of 3 is
+ equivalent to the command echo on all.
+
+
+
+ The value of echo_executing_commands
is set by the echo
+ command and the command line option --echo-input
.
+
+
+
+
+
+
+
+
+
+
+
+
+ Octave reports two kinds of errors for invalid programs.
+
+
+
+ A parse error occurs if Octave cannot understand something you
+ have typed. For example, if you misspell a keyword,
+
+
+
+
+ octave:13> functon y = f (x) y = x^2; endfunction
+
+
+
+ Octave will respond immediately with a message like this:
+
+
+
+
+ parse error:
+
+ functon y = f (x) y = x^2; endfunction
+ ^
+
+
+
+ For most parse errors, Octave uses a caret (`^') to mark the point
+ on the line where it was unable to make sense of your input. In this
+ case, Octave generated an error message because the keyword
+ function
was misspelled. Instead of seeing `function f',
+ Octave saw two consecutive variable names, which is invalid in this
+ context. It marked the error at the y
because the first name by
+ itself was accepted as valid input.
+
+
+
+ Another class of error message occurs at evaluation time. These
+ errors are called run-time errors, or sometimes
+ evaluation errors because they occur when your program is being
+ run, or evaluated. For example, if after correcting the
+ mistake in the previous function definition, you type
+
+
+
+
+ octave:13> f ()
+
+
+
+ Octave will respond with
+
+
+
+
+ error: `x' undefined near line 1 column 24
+ error: evaluating expression near line 1, column 24
+ error: evaluating assignment expression near line 1, column 22
+ error: called from `f'
+
+
+
+ This error message has several parts, and gives you quite a bit of
+ information to help you locate the source of the error. The messages
+ are generated from the point of the innermost error, and provide a
+ traceback of enclosing expressions and function calls.
+
+
+
+ In the example above, the first line indicates that a variable named
+ `x' was found to be undefined near line 1 and column 24 of some
+ function or expression. For errors occurring within functions, lines
+ from the beginning of the file containing the function definition. For
+ errors occurring at the top level, the line number indicates the input
+ line number, which is usually displayed in the prompt string.
+
+
+
+ The second and third lines in the example indicate that the error
+ occurred within an assignment expression, and the last line of the error
+ message indicates that the error occurred within the function f
.
+ If the function f
had been called from another function, for
+ example, g
, the list of errors would have ended with one more
+ line:
+
+
+
+
+ error: called from `g'
+
+
+
+ These lists of function calls usually make it fairly easy to trace the
+ path your program took before the error occurred, and to correct the
+ error before trying again.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Once you have learned Octave, you may want to write self-contained
+ Octave scripts, using the `#!' script mechanism. You can do this
+ on GNU systems and on many Unix systems (1)
+
+
+
+ For example, you could create a text file named `hello', containing
+ the following lines:
+
+
+
+
+ #! octave-interpreter-name -qf
+ # a sample Octave program
+ printf ("Hello, world!\n");
+
+
+
+ (where octave-interpreter-name should be replaced with the full
+ file name for your Octave binary). After making this file executable
+ (with the chmod
command), you can simply type:
+
+
+
+
+ hello
+
+
+
+ at the shell, and the system will arrange to run Octave as if you had
+ typed:
+
+
+
+
+ octave hello
+
+
+
+ The line beginning with `#!' lists the full file name of an
+ interpreter to be run, and an optional initial command line argument to
+ pass to that interpreter. The operating system then runs the
+ interpreter with the given argument and the full argument list of the
+ executed program. The first argument in the list is the full file name
+ of the Octave program. The rest of the argument list will either be
+ options to Octave, or data files, or both. The `-qf' option is
+ usually specified in stand-alone Octave programs to prevent them from
+ printing the normal startup message, and to keep them from behaving
+ differently depending on the contents of a particular user's
+ `~/.octaverc' file. See section Invoking Octave. Note that some
+ operating systems may place a limit on the number of characters that are
+ recognized after `#!'.
+
+
+
+ Self-contained Octave scripts are useful when you want to write a
+ program which users can invoke without knowing that the program is
+ written in the Octave language.
+
+
+
+ If you invoke an executable Octave script with command line arguments,
+ the arguments are available in the built-in variable argv
.
+ See section Command Line Options. For example, the following program will
+ reproduce the command line that is used to execute it.
+
+
+
+
+ #! /bin/octave -qf
+ printf ("%s", program_name);
+ for i = 1:nargin
+ printf (" %s", argv(i,:));
+ endfor
+ printf ("\n");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A comment is some text that is included in a program for the sake
+ of human readers, and that is not really part of the program. Comments
+ can explain what the program does, and how it works. Nearly all
+ programming languages have provisions for comments, because programs are
+ typically hard to understand without them.
+
+
+
+ In the Octave language, a comment starts with either the sharp sign
+ character, `#', or the percent symbol `%' and continues to the
+ end of the line. The Octave interpreter ignores the rest of a
+ line following a sharp sign or percent symbol. For example, we could
+ have put the following into the function f
:
+
+
+
+
+ function xdot = f (x, t)
+
+ # usage: f (x, t)
+ #
+ # This function defines the right hand
+ # side functions for a set of nonlinear
+ # differential equations.
+
+ r = 0.25;
+ ...
+ endfunction
+
+
+
+ The help
command (see section Commands for Getting Help) is able to find the first
+ block of comments in a function (even those that are composed directly
+ on the command line). This means that users of Octave can use the same
+ commands to get help for built-in functions, and for functions that you
+ have defined. For example, after defining the function f
above,
+ the command help f produces the output
+
+
+
+
+ usage: f (x, t)
+
+ This function defines the right hand
+ side functions for a set of nonlinear
+ differential equations.
+
+
+
+ Although it is possible to put comment lines into keyboard-composed
+ throw-away Octave programs, it usually isn't very useful, because the
+ purpose of a comment is to help you or another person understand the
+ program at a later time.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_30.html octave-2.0.14/doc/interpreter/octave_30.html
*** octave-2.0.13/doc/interpreter/octave_30.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_30.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,1771 ----
+
+
+
+
+ GNU Octave - System Utilities
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ This chapter describes the functions that are available to allow you to
+ get information about what is happening outside of Octave, while it is
+ still running, and use this information in your program. For example,
+ you can get information about environment variables, the current time,
+ and even start other programs from the Octave prompt.
+
+
+
+
+
+
+
+
+ Octave's core set of functions for manipulating time values are
+ patterned after the corresponding functions from the standard C library.
+ Several of these functions use a data structure for time that includes
+ the following elements:
+
+
+
+
+ usec
+ -
+ Microseconds after the second (0-999999).
+
+
sec
+ -
+ Seconds after the minute (0-61). This number can be 61 to account
+ for leap seconds.
+
+
min
+ -
+ Minutes after the hour (0-59).
+
+
hour
+ -
+ Hours since midnight (0-23).
+
+
mday
+ -
+ Day of the month (1-31).
+
+
mon
+ -
+ Months since January (0-11).
+
+
year
+ -
+ Years since 1900.
+
+
wday
+ -
+ Days since Sunday (0-6).
+
+
yday
+ -
+ Days since January 1 (0-365).
+
+
isdst
+ -
+ Daylight Savings Time flag.
+
+
zone
+ -
+ Time zone.
+
+
+
+ In the descriptions of the following functions, this structure is
+ referred to as a tm_struct.
+
+
+
+
+ - Loadable Function: time ()
+
-
+ Return the current time as the number of seconds since the epoch. The
+ epoch is referenced to 00:00:00 CUT (Coordinated Universal Time) 1 Jan
+ 1970. For example, on Monday February 17, 1997 at 07:15:06 CUT, the
+ value returned by
time
was 856163706.
+
+
+
+
+
+ - Function File: ctime (t)
+
-
+ Convert a value returned from
time
(or any other nonnegative
+ integer), to the local time and return a string of the same form as
+ asctime
. The function ctime (time)
is equivalent to
+ asctime (localtime (time))
. For example,
+
+
+
+
+ ctime (time ())
+ => "Mon Feb 17 01:15:06 1997"
+
+
+
+
+
+
+ - Loadable Function: gmtime (t)
+
-
+ Given a value returned from time (or any nonnegative integer),
+ return a time structure corresponding to CUT. For example,
+
+
+
+
+ gmtime (time ())
+ => {
+ usec = 0
+ year = 97
+ mon = 1
+ mday = 17
+ sec = 6
+ zone = CST
+ min = 15
+ wday = 1
+ hour = 7
+ isdst = 0
+ yday = 47
+ }
+
+
+
+
+
+
+ - Loadable Function: localtime (t)
+
-
+ Given a value returned from time (or any nonnegative integer),
+ return a time structure corresponding to the local time zone.
+
+
+
+
+ localtime (time ())
+ => {
+ usec = 0
+ year = 97
+ mon = 1
+ mday = 17
+ sec = 6
+ zone = CST
+ min = 15
+ wday = 1
+ hour = 1
+ isdst = 0
+ yday = 47
+ }
+
+
+
+
+
+
+ - Loadable Function: mktime (tm_struct)
+
-
+ Convert a time structure corresponding to the local time to the number
+ of seconds since the epoch. For example,
+
+
+
+
+ mktime (localtime (time ())
+ => 856163706
+
+
+
+
+
+
+ - Function File: asctime (tm_struct)
+
-
+ Convert a time structure to a string using the following five-field
+ format: Thu Mar 28 08:40:14 1996. For example,
+
+
+
+
+ asctime (localtime (time ())
+ => "Mon Feb 17 01:15:06 1997\n"
+
+
+
+ This is equivalent to ctime (time ())
.
+
+
+
+
+
+ - Loadable Function: strftime (tm_struct)
+
-
+ Format a time structure in a flexible way using `%' substitutions
+ similar to those in
printf
. Except where noted, substituted
+ fields have a fixed size; numeric fields are padded if necessary.
+ Padding is with zeros by default; for fields that display a single
+ number, padding can be changed or inhibited by following the `%'
+ with one of the modifiers described below. Unknown field specifiers are
+ copied as normal characters. All other characters are copied to the
+ output without change. For example,
+
+
+
+
+ strftime ("%r (%Z) %A %e %B %Y", localtime (time ())
+ => "01:15:06 AM (CST) Monday 17 February 1997"
+
+
+
+ Octave's strftime
function supports a superset of the ANSI C
+ field specifiers.
+
+
+
+ Literal character fields:
+
+
+
+
+ %
+ -
+ % character.
+
+
n
+ -
+ Newline character.
+
+
t
+ -
+ Tab character.
+
+
+
+ Numeric modifiers (a nonstandard extension):
+
+
+
+
+ - (dash)
+ -
+ Do not pad the field.
+
+
_ (underscore)
+ -
+ Pad the field with spaces.
+
+
+
+ Time fields:
+
+
+
+
+ %H
+ -
+ Hour (00-23).
+
+
%I
+ -
+ Hour (01-12).
+
+
%k
+ -
+ Hour (0-23).
+
+
%l
+ -
+ Hour (1-12).
+
+
%M
+ -
+ Minute (00-59).
+
+
%p
+ -
+ Locale's AM or PM.
+
+
%r
+ -
+ Time, 12-hour (hh:mm:ss [AP]M).
+
+
%R
+ -
+ Time, 24-hour (hh:mm).
+
+
%s
+ -
+ Time in seconds since 00:00:00, Jan 1, 1970 (a nonstandard extension).
+
+
%S
+ -
+ Second (00-61).
+
+
%T
+ -
+ Time, 24-hour (hh:mm:ss).
+
+
%X
+ -
+ Locale's time representation (%H:%M:%S).
+
+
%Z
+ -
+ Time zone (EDT), or nothing if no time zone is determinable.
+
+
+
+ Date fields:
+
+
+
+
+ %a
+ -
+ Locale's abbreviated weekday name (Sun-Sat).
+
+
%A
+ -
+ Locale's full weekday name, variable length (Sunday-Saturday).
+
+
%b
+ -
+ Locale's abbreviated month name (Jan-Dec).
+
+
%B
+ -
+ Locale's full month name, variable length (January-December).
+
+
%c
+ -
+ Locale's date and time (Sat Nov 04 12:02:33 EST 1989).
+
+
%C
+ -
+ Century (00-99).
+
+
%d
+ -
+ Day of month (01-31).
+
+
%e
+ -
+ Day of month ( 1-31).
+
+
%D
+ -
+ Date (mm/dd/yy).
+
+
%h
+ -
+ Same as %b.
+
+
%j
+ -
+ Day of year (001-366).
+
+
%m
+ -
+ Month (01-12).
+
+
%U
+ -
+ Week number of year with Sunday as first day of week (00-53).
+
+
%w
+ -
+ Day of week (0-6).
+
+
%W
+ -
+ Week number of year with Monday as first day of week (00-53).
+
+
%x
+ -
+ Locale's date representation (mm/dd/yy).
+
+
%y
+ -
+ Last two digits of year (00-99).
+
+
%Y
+ -
+ Year (1970-).
+
+
+
+
+ Most of the remaining functions described in this section are not
+ patterned after the standard C library. Some are available for
+ compatiblity with MATLAB and others are provided because they are
+ useful.
+
+
+
+
+ - Function File: clock ()
+
-
+ Return a vector containing the current year, month (1-12), day (1-31),
+ hour (0-23), minute (0-59) and second (0-61). For example,
+
+
+
+
+ clock ()
+ => [ 1993, 8, 20, 4, 56, 1 ]
+
+
+
+ The function clock is more accurate on systems that have the
+ gettimeofday
function.
+
+
+
+
+
+ - Function File: date ()
+
-
+ Return the date as a character string in the form DD-MMM-YY. For
+ example,
+
+
+
+
+ date ()
+ => "20-Aug-93"
+
+
+
+
+
+
+ - Function File: etime (t1, t2)
+
-
+ Return the difference (in seconds) between two time values returned from
+
clock
. For example:
+
+
+
+
+ t0 = clock ();
+ # many computations later...
+ elapsed_time = etime (clock (), t0);
+
+
+
+ will set the variable elapsed_time
to the number of seconds since
+ the variable t0
was set.
+
+
+
+
+
+ - Built-in Function: [total, user, system] = cputime ();
+
-
+ Return the CPU time used by your Octave session. The first output is
+ the total time spent executing your process and is equal to the sum of
+ second and third outputs, which are the number of CPU seconds spent
+ executing in user mode and the number of CPU seconds spent executing in
+ system mode, respectively. If your system does not have a way to report
+ CPU time usage,
cputime
returns 0 for each of its output values.
+ Note that because Octave used some CPU time to start, it is reasonable
+ to check to see if cputime
works by checking to see if the total
+ CPU time used is nonzero.
+
+
+
+
+
+ - Function File: is_leap_year (year)
+
-
+ Return 1 if the given year is a leap year and 0 otherwise. If no
+ arguments are provided,
is_leap_year
will use the current year.
+ For example,
+
+
+
+
+ is_leap_year (2000)
+ => 1
+
+
+
+
+
+
+ - Function File: tic ()
+
-
+
- Function File: toc ()
+
-
+ These functions set and check a wall-clock timer. For example,
+
+
+
+
+ tic ();
+ # many computations later...
+ elapsed_time = toc ();
+
+
+
+ will set the variable elapsed_time
to the number of seconds since
+ the most recent call to the function tic
.
+
+
+
+ If you are more interested in the CPU time that your process used, you
+ should use the cputime
function instead. The tic
and
+ toc
functions report the actual wall clock time that elapsed
+ between the calls. This may include time spent processing other jobs or
+ doing nothing at all. For example,
+
+
+
+
+ tic (); sleep (5); toc ()
+ => 5
+ t = cputime (); sleep (5); cputime () - t
+ => 0
+
+
+
+ (This example also illustrates that the CPU timer may have a fairly
+ coarse resolution.)
+
+
+
+
+
+ - Built-in Function: pause (seconds)
+
-
+ Suspend the execution of the program. If invoked without any arguments,
+ Octave waits until you type a character. With a numeric argument, it
+ pauses for the given number of seconds. For example, the following
+ statement prints a message and then waits 5 seconds before clearing the
+ screen.
+
+
+
+
+ fprintf (stderr, "wait please...\n");
+ pause (5);
+ clc;
+
+
+
+
+
+
+ - Built-in Function: sleep (seconds)
+
-
+ Suspend the execution of the program for the given number of seconds.
+
+
+
+
+
+ - Built-in Function: usleep (microseconds)
+
-
+ Suspend the execution of the program for the given number of
+ microseconds. On systems where it is not possible to sleep for periods
+ of time less than one second,
usleep
will pause the execution for
+ round (microseconds / 1e6)
seconds.
+
+
+
+
+
+
+
+
+ Octave includes the following functions for renaming and deleting files,
+ creating, deleting, and reading directories, and for getting information
+ about the status of files.
+
+
+
+
+ - Built-in Function: [err, msg] = rename (old, new)
+
-
+ Change the name of file old to new.
+
+
+
+ If successful, err is 0 and msg is an empty string.
+ Otherwise, err is nonzero and msg contains a
+ system-dependent error message.
+
+
+
+
+
+ - Built-in Function: [err, msg] = unlink (file)
+
-
+ Delete file.
+
+
+
+ If successful, err is 0 and msg is an empty string.
+ Otherwise, err is nonzero and msg contains a
+ system-dependent error message.
+
+
+
+
+
+ - Built-in Function: [files, err, msg] = readdir (dir)
+
-
+ Return names of the files in the directory dir as an array of
+ strings. If an error occurs, return an empty matrix in files.
+
+
+
+ If successful, err is 0 and msg is an empty string.
+ Otherwise, err is nonzero and msg contains a
+ system-dependent error message.
+
+
+
+
+
+ - Built-in Function: [err, msg] = mkdir (dir)
+
-
+ Create a directory named dir.
+
+
+
+ If successful, err is 0 and msg is an empty string.
+ Otherwise, err is nonzero and msg contains a
+ system-dependent error message.
+
+
+
+
+
+ - Built-in Function: [err, msg] = rmdir (dir)
+
-
+ Remove the directory named dir.
+
+
+
+ If successful, err is 0 and msg is an empty string.
+ Otherwise, err is nonzero and msg contains a
+ system-dependent error message.
+
+
+
+
+
+ - Built-in Function: [err, msg] = mkfifo (name)
+
-
+ Create a FIFO special file.
+
+
+
+ If successful, err is 0 and msg is an empty string.
+ Otherwise, err is nonzero and msg contains a
+ system-dependent error message.
+
+
+
+
+
+
+ - Built-in Function: umask (mask)
+
-
+ Set the permission mask for file creation. The parameter mask is
+ interpreted as an octal number.
+
+
+
+
+
+ - Built-in Function: [info, err, msg] = stat (file)
+
-
+
- Built-in Function: [info, err, msg] = lstat (file)
+
-
+ Return a structure s containing the following information about
+ file.
+
+
+
+
+ dev
+ -
+ ID of device containing a directory entry for this file.
+
+
ino
+ -
+ File number of the file.
+
+
modestr
+ -
+ File mode, as a string of ten letters or dashes as would be returned by
+ ls -l.
+
+
nlink
+ -
+ Number of links.
+
+
uid
+ -
+ User ID of file's owner.
+
+
gid
+ -
+ Group ID of file's group.
+
+
rdev
+ -
+ ID of device for block or character special files.
+
+
size
+ -
+ Size in bytes.
+
+
atime
+ -
+ Time of last access in the same form as time values returned from
+
time
. See section Timing Utilities.
+
+ mtime
+ -
+ Time of last modification in the same form as time values returned from
+
time
. See section Timing Utilities.
+
+ ctime
+ -
+ Time of last file status change in the same form as time values returned from
+
time
. See section Timing Utilities.
+
+ blksize
+ -
+ Size of blocks in the file.
+
+
blocks
+ -
+ Number of blocks allocated for file.
+
+
+
+ If the call is successful err is 0 and msg is an empty
+ string. If the file does not exist, or some other error occurs, s
+ is an empty matrix, err is -1, and msg contains the
+ corresponding system error message.
+
+
+
+ If file is a symbolic link, stat
will return information
+ about the actual file the is referenced by the link. Use lstat
+ if you want information about the symbolic link itself.
+
+
+
+ For example,
+
+
+
+
+ [s, err, msg] = stat ("/vmlinuz")
+ => s =
+ {
+ atime = 855399756
+ rdev = 0
+ ctime = 847219094
+ uid = 0
+ size = 389218
+ blksize = 4096
+ mtime = 847219094
+ gid = 6
+ nlink = 1
+ blocks = 768
+ modestr = -rw-r--r--
+ ino = 9316
+ dev = 2049
+ }
+ => err = 0
+ => msg =
+
+
+
+
+
+
+ - Built-in Function: glob (pattern)
+
-
+ Given an array of strings in pattern, return the list of file
+ names that any of them, or an empty string if no patterns match. Tilde
+ expansion is performed on each of the patterns before looking for
+ matching file names. For example,
+
+
+
+
+ glob ("/vm*")
+ => "/vmlinuz"
+
+
+
+ Note that multiple values are returned in a string matrix with the fill
+ character set to ASCII NUL.
+
+
+
+
+
+ - Built-in Function: fnmatch (pattern, string)
+
-
+ Return 1 or zero for each element of string that matches any of
+ the elements of the string array pattern, using the rules of
+ filename pattern matching. For example,
+
+
+
+
+ fnmatch ("a*b", ["ab"; "axyzb"; "xyzab"])
+ => [ 1; 1; 0 ]
+
+
+
+
+
+
+ - Built-in Function: file_in_path (path, file)
+
-
+ Return the absolute name name of file if it can be found in
+ path. The value of path should be a colon-separated list of
+ directories in the format described for the built-in variable
+
LOADPATH
.
+
+
+
+ If the file cannot be found in the path, an empty matrix is returned.
+ For example,
+
+
+
+
+ file_in_path (LOADPATH, "nargchk.m")
+ => "/usr/local/share/octave/2.0/m/general/nargchk.m"
+
+
+
+
+
+
+ - Built-in Function: tilde_expand (string)
+
-
+ Performs tilde expansion on string. If string begins with a
+ tilde character, (`~'), all of the characters preceding the first
+ slash (or all characters, if there is no slash) are treated as a
+ possible user name, and the tilde and the following characters up to the
+ slash are replaced by the home directory of the named user. If the
+ tilde is followed immediately by a slash, the tilde is replaced by the
+ home directory of the user running Octave. For example,
+
+
+
+
+ tilde_expand ("~joeuser/bin")
+ => "/home/joeuser/bin"
+ tilde_expand ("~/bin")
+ => "/home/jwe/bin"
+
+
+
+
+
+
+
+
+
+ Octave includes some high-level commands like system
and
+ popen
for starting subprocesses. If you want to run another
+ program to perform some task and then look at its output, you will
+ probably want to use these functions.
+
+
+
+ Octave also provides several very low-level Unix-like functions which
+ can also be used for starting subprocesses, but you should probably only
+ use them if you can't find any way to do what you need with the
+ higher-level functions.
+
+
+
+
+ - Built-in Function: system (string, return_output, type)
+
-
+ Execute a shell command specified by string. The second argument is optional.
+ If type is
"async"
, the process is started in the
+ background and the process id of the child process is returned
+ immediately. Otherwise, the process is started, and Octave waits until
+ it exits. If type argument is omitted, a value of "sync"
+ is assumed.
+
+
+
+ If two input arguments are given (the actual value of
+ return_output is irrelevant) and the subprocess is started
+ synchronously, or if system is called with one input argument and
+ one or more output arguments, the output from the command is returned.
+ Otherwise, if the subprocess is executed synchronously, it's output is
+ sent to the standard output. To send the output of a command executed
+ with system through the pager, use a command like
+
+
+
+
+ disp (system (cmd, 1));
+
+
+
+ or
+
+
+
+
+ printf ("%s\n", system (cmd, 1));
+
+
+
+ The system
function can return two values. The first is any
+ output from the command that was written to the standard output stream,
+ and the second is the output status of the command. For example,
+
+
+
+
+ [output, status] = system ("echo foo; exit 2");
+
+
+
+ will set the variable output
to the string `foo', and the
+ variable status
to the integer `2'.
+
+
+
+
+
+ - Built-in Function: fid = popen (command, mode)
+
-
+ Start a process and create a pipe. The name of the command to run is
+ given by command. The file identifier corresponding to the input
+ or output stream of the process is returned in fid. The argument
+ mode may be
+
+
+
+
+ "r"
+ -
+ The pipe will be connected to the standard output of the process, and
+ open for reading.
+
+
"w"
+ -
+ The pipe will be connected to the standard input of the process, and
+ open for writing.
+
+
+
+ For example,
+
+
+
+
+ fid = popen ("ls -ltr / | tail -3", "r");
+ while (isstr (s = fgets (fid)))
+ fputs (stdout, s);
+ endwhile
+ -| drwxr-xr-x 33 root root 3072 Feb 15 13:28 etc
+ -| drwxr-xr-x 3 root root 1024 Feb 15 13:28 lib
+ -| drwxrwxrwt 15 root root 2048 Feb 17 14:53 tmp
+
+
+
+
+
+
+ - Built-in Function: pclose (fid)
+
-
+ Close a file identifier that was opened by
popen
. You may also
+ use fclose
for the same purpose.
+
+
+
+
+
+ - Built-in Function: [in, out, pid] = popen2 (command, args)
+
-
+ Start a subprocess with two-way communication. The name of the process
+ is given by command, and args is an array of strings
+ containing options for the command. The file identifiers for the input
+ and output streams of the subprocess are returned in in and
+ out. If execution of the command is successful, pid
+ contains the process ID of the subprocess. Otherwise, pid is
+ -1.
+
+
+
+ For example,
+
+
+
+
+ [in, out, pid] = popen2 ("sort", "-nr");
+ fputs (in, "these\nare\nsome\nstrings\n");
+ fclose (in);
+ while (isstr (s = fgets (out)))
+ fputs (stdout, s);
+ endwhile
+ fclose (out);
+ -| are
+ -| some
+ -| strings
+ -| these
+
+
+
+
+
+
+ - Built-in Variable: EXEC_PATH
+
-
+ The variable
EXEC_PATH
is a colon separated list of directories
+ to search when executing subprograms. Its initial value is taken from
+ the environment variable OCTAVE_EXEC_PATH
(if it exists) or
+ PATH
, but that value can be overridden by the command line
+ argument --exec-path PATH
, or by setting the value of
+ EXEC_PATH
in a startup script. If the value of EXEC_PATH
+ begins (ends) with a colon, the directories
+
+
+
+
+ octave-home/libexec/octave/site/exec/arch
+ octave-home/libexec/octave/version/exec/arch
+
+
+
+ are prepended (appended) to EXEC_PATH
, where octave-home
+ is the top-level directory where all of Octave is installed
+ (the default value is `/usr/local'). If you don't specify
+ a value for EXEC_PATH
explicitly, these special directories are
+ prepended to your shell path.
+
+
+
+
+ In most cases, the following functions simply decode their arguments and
+ make the corresponding Unix system calls. For a complete example of how
+ they can be used, look at the definition of the function popen2
.
+
+
+
+
+ - Built-in Function: [pid, msg] = fork ()
+
-
+ Create a copy of the current process.
+
+
+
+ Fork can return one of the following values:
+
+
+
+
+ - > 0
+
-
+ You are in the parent process. The value returned from
fork
is
+ the process id of the child process. You should probably arrange to
+ wait for any child processes to exit.
+
+ - 0
+
-
+ You are in the child process. You can call
exec
to start another
+ process. If that fails, you should probably call exit
.
+
+ - < 0
+
-
+ The call to
fork
failed for some reason. You must take evasive
+ action. A system dependent error message will be waiting in msg.
+
+
+
+
+
+ - Built-in Function: [err, msg] = exec (file, args)
+
-
+ Replace current process with a new process. Calling
exec
without
+ first calling fork
will terminate your current Octave process and
+ replace it with the program named by file. For example,
+
+
+
+
+ exec ("ls" "-l")
+
+
+
+ will run ls
and return you to your shell prompt.
+
+
+
+ If successful, exec
does not return. If exec
does return,
+ err will be nonzero, and msg will contain a system-dependent
+ error message.
+
+
+
+
+
+ - Built-in Function: [file_ids, err, msg] = pipe ()
+
-
+ Create a pipe and return the vector file_ids, which corresponding
+ to the reading and writing ends of the pipe.
+
+
+
+ If successful, err is 0 and msg is an empty string.
+ Otherwise, err is nonzero and msg contains a
+ system-dependent error message.
+
+
+
+
+
+ - Built-in Function: [fid, msg] = dup2 (old, new)
+
-
+ Duplicate a file descriptor.
+
+
+
+ If successful, fid is greater than zero and contains the new file
+ ID. Otherwise, fid is negative and msg contains a
+ system-dependent error message.
+
+
+
+
+
+ - Built-in Function: [pid, msg] = waitpid (pid, options)
+
-
+ Wait for process pid to terminate. The pid argument can be:
+
+
+
+
+ - -1
+
-
+ Wait for any child process.
+
+
- 0
+
-
+ Wait for any child process whose process group ID is equal to that of
+ the Octave interpreter process.
+
+
- > 0
+
-
+ Wait for termination of the child process with ID pid.
+
+
+
+ The options argument can be:
+
+
+
+
+ - 0
+
-
+ Wait until signal is received or a child process exits (this is the
+ default if the options argument is missing).
+
+
- 1
+
-
+ Do not hang if status is not immediately available.
+
+
- 2
+
-
+ Report the status of any child processes that are stopped, and whose
+ status has not yet been reported since they stopped.
+
+
- 3
+
-
+ Implies both 1 and 2.
+
+
+
+ If the returned value of pid is greater than 0, it is the process
+ ID of the child process that exited. If an error occurs, pid will
+ be less than zero and msg will contain a system-dependent error
+ message.
+
+
+
+
+
+ - Built-in Function: [err, msg] = fcntl (fid, request, arg)
+
-
+ Change the properties of the open file fid. The following values
+ may be passed as request:
+
+
+
+
+ F_DUPFD
+ -
+
+ Return a duplicate file descriptor.
+
+
F_GETFD
+ -
+
+ Return the file descriptor flags for fid.
+
+
F_SETFD
+ -
+
+ Set the file descriptor flags for fid.
+
+
F_GETFL
+ -
+
+ Return the file status flags for fid. The following codes may be
+ returned (some of the flags may be undefined on some systems).
+
+
+
+ O_RDONLY
+ -
+
+ Open for reading only.
+
+
O_WRONLY
+ -
+
+ Open for writing only.
+
+
O_RDWR
+ -
+
+ Open for reading and writing.
+
+
O_APPEND
+ -
+
+ Append on each write.
+
+
O_NONBLOCK
+ -
+
+ Nonblocking mode.
+
+
O_SYNC
+ -
+
+ Wait for writes to complete.
+
+
O_ASYNC
+ -
+
+ Asynchronous I/O.
+
+
+ F_SETFL
+ -
+
+ Set the file status flags for fid to the value specified by
+ arg. The only flags that can be changed are
O_APPEND
and
+ O_NONBLOCK
.
+
+
+
+ If successful, err is 0 and msg is an empty string.
+ Otherwise, err is nonzero and msg contains a
+ system-dependent error message.
+
+
+
+
+
+
+
+
+
+ - Built-in Function: getpgrp ()
+
-
+ Return the process group id of the current process.
+
+
+
+
+
+ - Built-in Function: getpid ()
+
-
+ Return the process id of the current process.
+
+
+
+
+
+ - Built-in Function: getppid ()
+
-
+ Return the process id of the parent process.
+
+
+
+
+
+ - Built-in Function: geteuid ()
+
-
+ Return the effective user id of the current process.
+
+
+
+
+
+ - Built-in Function: getuid ()
+
-
+ Return the real user id of the current process.
+
+
+
+
+
+ - Built-in Function: getegid ()
+
-
+ Return the effective group id of the current process.
+
+
+
+
+
+ - Built-in Function: getgid ()
+
-
+ Return the real group id of the current process.
+
+
+
+
+
+
+
+
+
+ - Built-in Function: getenv (var)
+
-
+ Return the value of the environment variable var. For example,
+
+
+
+
+ getenv ("PATH")
+
+
+
+ returns a string containing the value of your path.
+
+
+
+
+
+ - Built-in Function: putenv (var, value)
+
-
+ Set the value of the environment variable var to value.
+
+
+
+
+
+
+
+
+
+ - Command: cd dir
+
-
+
- Command: chdir dir
+
-
+ Change the current working directory to dir. For example,
+
+
+
+
+ cd ~/octave
+
+
+
+ Changes the current working directory to `~/octave'. If the
+ directory does not exist, an error message is printed and the working
+ directory is not changed.
+
+
+
+
+
+ - Built-in Function: pwd ()
+
-
+ Return the current working directory.
+
+
+
+
+
+ - Built-in Variable: PWD
+
-
+ The current working directory. The value of
PWD
is updated each
+ time the current working directory is changed with the `cd'
+ command.
+
+
+
+
+
+ - Command: ls options
+
-
+
- Command: dir options
+
-
+ List directory contents. For example,
+
+
+
+
+ ls -l
+ -| total 12
+ -| -rw-r--r-- 1 jwe users 4488 Aug 19 04:02 foo.m
+ -| -rw-r--r-- 1 jwe users 1315 Aug 17 23:14 bar.m
+
+
+
+ The dir
and ls
commands are implemented by calling your
+ system's directory listing command, so the available options may vary
+ from system to system.
+
+
+
+
+
+
+
+
+ Octave's password database functions return information in a structure
+ with the following fields.
+
+
+
+
+ name
+ -
+ The user name.
+
+
passwd
+ -
+ The encrypted password, if available.
+
+
uid
+ -
+ The numeric user id.
+
+
gid
+ -
+ The numeric group id.
+
+
gecos
+ -
+ The GECOS field.
+
+
dir
+ -
+ The home directory.
+
+
shell
+ -
+ The initial shell.
+
+
+
+ In the descriptions of the following functions, this data structure is
+ referred to as a pw_struct.
+
+
+
+
+ - Loadable Function: pw_struct = getpwent ()
+
-
+ Return a structure containing an entry from the password database,
+ opening it if necessary. Once the end of the data has been reached,
+
getpwent
returns 0.
+
+
+
+
+
+ - Loadable Function: pw_struct = getpwuid (uid).
+
-
+ Return a structure containing the first entry from the password database
+ with the user ID uid. If the user ID does not exist in the
+ database,
getpwuid
returns 0.
+
+
+
+
+
+ - Loadable Function: pw_struct = getpwnam (name)
+
-
+ Return a structure containing the first entry from the password database
+ with the user name name. If the user name does not exist in the
+ database,
getpwname
returns 0.
+
+
+
+
+
+ - Loadable Function: setpwent ()
+
-
+ Return the internal pointer to the beginning of the password database.
+
+
+
+
+
+ - Loadable Function: endpwent ()
+
-
+ Close the password database.
+
+
+
+
+
+
+
+
+ Octave's group database functions return information in a structure
+ with the following fields.
+
+
+
+
+ name
+ -
+ The user name.
+
+
passwd
+ -
+ The encrypted password, if available.
+
+
gid
+ -
+ The numeric group id.
+
+
mem
+ -
+ The members of the group.
+
+
+
+ In the descriptions of the following functions, this data structure is
+ referred to as a grp_struct.
+
+
+
+
+ - Loadable Function: grp_struct = getgrent ()
+
-
+ Return an entry from the group database, opening it if necessary.
+ Once the end of the data has been reached,
getgrent
returns 0.
+
+
+
+
+
+ - Loadable Function: grp_struct = getgrgid (gid).
+
-
+ Return the first entry from the group database with the group ID
+ gid. If the group ID does not exist in the database,
+
getgrgid
returns 0.
+
+
+
+
+
+ - Loadable Function: grp_struct = getgrnam (name)
+
-
+ Return the first entry from the group database with the group name
+ name. If the group name does not exist in the database,
+
getgrname
returns 0.
+
+
+
+
+
+ - Loadable Function: setgrent ()
+
-
+ Return the internal pointer to the beginning of the group database.
+
+
+
+
+
+ - Loadable Function: endgrent ()
+
-
+ Close the group database.
+
+
+
+
+
+
+
+
+
+ - Built-in Function: computer ()
+
-
+ Print or return a string of the form cpu-vendor-os
+ that identifies the kind of computer Octave is running on. If invoked
+ with an output argument, the value is returned instead of printed. For
+ example,
+
+
+
+
+ computer ()
+ -| i586-pc-linux-gnu
+
+ x = computer ()
+ => x = "i586-pc-linux-gnu"
+
+
+
+
+
+
+ - Built-in Function: isieee ()
+
-
+ Return 1 if your computer claims to conform to the IEEE standard for
+ floating point calculations.
+
+
+
+
+
+ - Built-in Function: version ()
+
-
+ Return Octave's version number as a string. This is also the value of
+ the built-in variable
OCTAVE_VERSION
.
+
+
+
+
+
+ - Built-in Variable: OCTAVE_VERSION
+
-
+ The version number of Octave, as a string.
+
+
+
+
+
+ - Built-in Function: octave_config_info ()
+
-
+ Return a structure containing configuration and installation
+ information.
+
+
+
+
+
+ - Loadable Function: getrusage ()
+
-
+ Return a structure containing a number of statistics about the current
+ Octave process. Not all fields are available on all systems. If it is
+ not possible to get CPU time statistics, the CPU time slots are set to
+ zero. Other missing data are replaced by NaN. Here is a list of all
+ the possible fields that can be present in the structure returned by
+
getrusage
:
+
+
+
+
+
+ -
+
idrss
+ -
+ Unshared data size.
+
+
inblock
+ -
+ Number of block input operations.
+
+
isrss
+ -
+ Unshared stack size.
+
+
ixrss
+ -
+ Shared memory size.
+
+
majflt
+ -
+ Number of major page faults.
+
+
maxrss
+ -
+ Maximum data size.
+
+
minflt
+ -
+ Number of minor page faults.
+
+
msgrcv
+ -
+ Number of messages received.
+
+
msgsnd
+ -
+ Number of messages sent.
+
+
nivcsw
+ -
+ Number of involuntary context switches.
+
+
nsignals
+ -
+ Number of signals received.
+
+
nswap
+ -
+ Number of swaps.
+
+
nvcsw
+ -
+ Number of voluntary context switches.
+
+
oublock
+ -
+ Number of block output operations.
+
+
stime
+ -
+ A structure containing the system CPU time used. The structure has the
+ elements
sec
(seconds) usec
(microseconds).
+
+ utime
+ -
+ A structure containing the user CPU time used. The structure has the
+ elements
sec
(seconds) usec
(microseconds).
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_31.html octave-2.0.14/doc/interpreter/octave_31.html
*** octave-2.0.13/doc/interpreter/octave_31.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_31.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,436 ----
+
+
+
+
+ GNU Octave - Tips and Standards
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+ This chapter describes no additional features of Octave. Instead it
+ gives advice on making effective use of the features described in the
+ previous chapters.
+
+
+
+
+
+
+
+
+ Here are some tips for avoiding common errors in writing Octave code
+ intended for widespread use:
+
+
+
+
+ -
+
+ Since all global variables share the same name space, and all functions
+ share another name space, you should choose a short word to distinguish
+ your program from other Octave programs. Then take care to begin the
+ names of all global variables, constants, and functions with the chosen
+ prefix. This helps avoid name conflicts.
+
+ If you write a function that you think ought to be added to Octave under
+ a certain name, such as
fiddle_matrix
, don't call it by that name
+ in your program. Call it mylib_fiddle_matrix
in your program,
+ and send mail to @email{bug-octave@bevo.che.wisc.edu} suggesting that it
+ be added to Octave. If and when it is, the name can be changed easily
+ enough.
+
+ If one prefix is insufficient, your package may use two or three
+ alternative common prefixes, so long as they make sense.
+
+ Separate the prefix from the rest of the symbol name with an underscore
+ `_'. This will be consistent with Octave itself and with most
+ Octave programs.
+
+ -
+
+ When you encounter an error condition, call the function
error
+ (or usage
). The error
and usage
functions do not
+ return.
+ See section How Octave Reports Errors.
+
+ -
+
+ Please put a copyright notice on the file if you give copies to anyone.
+ Use the same lines that appear at the top of the function files
+ distributed with Octave. If you have not signed papers to assign the
+ copyright to anyone else, then place your name in the copyright notice.
+
+
+
+
+
+
+
+
+
+
+
+ Here are some ways of improving the execution speed of Octave programs.
+
+
+
+
+ -
+
+ Avoid looping wherever possible.
+
+
-
+
+ Use iteration rather than recursion whenever possible.
+ Function calls are slow in Octave.
+
+
-
+
+ Avoid resizing matrices unnecessarily. When building a single result
+ matrix from a series of calculations, set the size of the result matrix
+ first, then insert values into it. Write
+
+
+
+ result = zeros (big_n, big_m)
+ for i = over:and_over
+ r1 = ...
+ r2 = ...
+ result (r1, r2) = new_value ();
+ endfor
+
+
+ instead of
+
+
+
+ result = [];
+ for i = ever:and_ever
+ result = [ result, new_value() ];
+ endfor
+
+
+ -
+
+ Avoid calling
eval
or feval
whenever possible, because
+ they require Octave to parse input or look up the name of a function in
+ the symbol table.
+
+ If you are using eval
as an exception handling mechanism and not
+ because you need to execute some arbitrary text, use the try
+ statement instead. See section The try
Statement.
+
+ -
+
+ If you are calling lots of functions but none of them will need to
+ change during your run, set the variable
+
ignore_function_time_stamp
to "all"
so that Octave doesn't
+ waste a lot of time checking to see if you have updated your function
+ files.
+
+
+
+
+
+
+
+ Here are some tips for the writing of documentation strings.
+
+
+
+
+ -
+
+ Every command, function, or variable intended for users to know about
+ should have a documentation string.
+
+
-
+
+ An internal variable or subroutine of an Octave program might as well have
+ a documentation string.
+
+
-
+
+ The first line of the documentation string should consist of one or two
+ complete sentences that stand on their own as a summary.
+
+ The documentation string can have additional lines that expand on the
+ details of how to use the function or variable. The additional lines
+ should also be made up of complete sentences.
+
+
-
+
+ For consistency, phrase the verb in the first sentence of a
+ documentation string as an infinitive with "to" omitted. For
+ instance, use "Return the frob of A and B." in preference to "Returns
+ the frob of A and B." Usually it looks good to do likewise for the
+ rest of the first paragraph. Subsequent paragraphs usually look better
+ if they have proper subjects.
+
+
-
+
+ Write documentation strings in the active voice, not the passive, and in
+ the present tense, not the future. For instance, use "Return a list
+ containing A and B." instead of "A list containing A and B will be
+ returned."
+
+
-
+
+ Avoid using the word "cause" (or its equivalents) unnecessarily.
+ Instead of, "Cause Octave to display text in boldface," write just
+ "Display text in boldface."
+
+
-
+
+ Do not start or end a documentation string with whitespace.
+
+
-
+
+ Format the documentation string so that it fits in an Emacs window on an
+ 80-column screen. It is a good idea for most lines to be no wider than
+ 60 characters.
+
+ However, rather than simply filling the entire documentation string, you
+ can make it much more readable by choosing line breaks with care.
+ Use blank lines between topics if the documentation string is long.
+
+
-
+
+ Do not indent subsequent lines of a documentation string so
+ that the text is lined up in the source code with the text of the first
+ line. This looks nice in the source code, but looks bizarre when users
+ view the documentation. Remember that the indentation before the
+ starting double-quote is not part of the string!
+
+
-
+
+ The documentation string for a variable that is a yes-or-no flag should
+ start with words such as "Nonzero means...", to make it clear that
+ all nonzero values are equivalent and indicate explicitly what zero and
+ nonzero mean.
+
+
-
+
+ When a function's documentation string mentions the value of an argument
+ of the function, use the argument name in capital letters as if it were
+ a name for that value. Thus, the documentation string of the operator
+
/
refers to its second argument as `DIVISOR', because the
+ actual argument name is divisor
.
+
+ Also use all caps for meta-syntactic variables, such as when you show
+ the decomposition of a list or vector into subunits, some of which may
+ vary.
+
+
+
+
+
+
+
+ Here are the conventions to follow when writing comments.
+
+
+
+
+ - `#'
+
-
+ Comments that start with a single sharp-sign, `#', should all be
+ aligned to the same column on the right of the source code. Such
+ comments usually explain how the code on the same line does its job. In
+ the Emacs mode for Octave, the M-; (
indent-for-comment
)
+ command automatically inserts such a `#' in the right place, or
+ aligns such a comment if it is already present.
+
+ - `##'
+
-
+ Comments that start with two semicolons, `##', should be aligned to
+ the same level of indentation as the code. Such comments usually
+ describe the purpose of the following lines or the state of the program
+ at that point.
+
+
+
+ The indentation commands of the Octave mode in Emacs, such as M-;
+ (indent-for-comment
) and TAB (octave-indent-line
)
+ automatically indent comments according to these conventions,
+ depending on the number of semicolons. See section `Manipulating Comments' in The GNU Emacs Manual.
+
+
+
+
+
+
+
+
+
+
+ Octave has conventions for using special comments in function files
+ to give information such as who wrote them. This section explains these
+ conventions.
+
+
+
+ The top of the file should contain a copyright notice, followed by a
+ block of comments that can be used as the help text for the function.
+ Here is an example:
+
+
+
+
+ ## Copyright (C) 1996, 1997 John W. Eaton
+ ##
+ ## This file is part of Octave.
+ ##
+ ## Octave is free software; you can redistribute it and/or
+ ## modify it under the terms of the GNU General Public
+ ## License as published by the Free Software Foundation;
+ ## either version 2, or (at your option) any later version.
+ ##
+ ## Octave is distributed in the hope that it will be useful,
+ ## but WITHOUT ANY WARRANTY; without even the implied
+ ## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ ## PURPOSE. See the GNU General Public License for more
+ ## details.
+ ##
+ ## You should have received a copy of the GNU General Public
+ ## License along with Octave; see the file COPYING. If not,
+ ## write to the Free Software Foundation, 59 Temple Place -
+ ## Suite 330, Boston, MA 02111-1307, USA.
+
+ ## usage: [IN, OUT, PID] = popen2 (COMMAND, ARGS)
+ ##
+ ## Start a subprocess with two-way communication. COMMAND
+ ## specifies the name of the command to start. ARGS is an
+ ## array of strings containing options for COMMAND. IN and
+ ## OUT are the file ids of the input and streams for the
+ ## subprocess, and PID is the process id of the subprocess,
+ ## or -1 if COMMAND could not be executed.
+ ##
+ ## Example:
+ ##
+ ## [in, out, pid] = popen2 ("sort", "-nr");
+ ## fputs (in, "these\nare\nsome\nstrings\n");
+ ## fclose (in);
+ ## while (isstr (s = fgets (out)))
+ ## fputs (stdout, s);
+ ## endwhile
+ ## fclose (out);
+
+
+
+ Octave uses the first block of comments in a function file that do not
+ appear to be a copyright notice as the help text for the file. For
+ Octave to recognize the first comment block as a copyright notice, it
+ must match the regular expression
+
+
+
+
+ ^ Copyright (C).*\n\n This file is part of Octave.
+
+
+
+ or
+
+
+
+
+ ^ Copyright (C).*\n\n This program is free softwar
+
+
+
+ (after stripping the leading comment characters). This is a fairly
+ strict requirement, and may be relaxed somewhat in the future.
+
+
+
+ After the copyright notice and help text come several header
+ comment lines, each beginning with `## header-name:'. For
+ example,
+
+
+
+
+ ## Author: jwe
+ ## Keywords: subprocesses input-output
+ ## Maintainer: jwe
+
+
+
+ Here is a table of the conventional possibilities for header-name:
+
+
+
+
+ - `Author'
+
-
+ This line states the name and net address of at least the principal
+ author of the library.
+
+
+
+ ## Author: John W. Eaton <jwe@bevo.che.wisc.edu>
+
+
+ - `Maintainer'
+
-
+ This line should contain a single name/address as in the Author line, or
+ an address only, or the string `jwe'. If there is no maintainer
+ line, the person(s) in the Author field are presumed to be the
+ maintainers. The example above is mildly bogus because the maintainer
+ line is redundant.
+
+ The idea behind the `Author' and `Maintainer' lines is to make
+ possible a function to "send mail to the maintainer" without
+ having to mine the name out by hand.
+
+ Be sure to surround the network address with `<...>' if
+ you include the person's full name as well as the network address.
+
+
- `Created'
+
-
+ This optional line gives the original creation date of the
+ file. For historical interest only.
+
+
- `Version'
+
-
+ If you wish to record version numbers for the individual Octave program,
+ put them in this line.
+
+
- `Adapted-By'
+
-
+ In this header line, place the name of the person who adapted the
+ library for installation (to make it fit the style conventions, for
+ example).
+
+
- `Keywords'
+
-
+ This line lists keywords. Eventually, it will be used by an apropos
+ command to allow people will find your package when they're looking for
+ things by topic area. To separate the keywords, you can use spaces,
+ commas, or both.
+
+
+
+ Just about every Octave function ought to have the `Author' and
+ `Keywords' header comment lines. Use the others if they are
+ appropriate. You can also put in header lines with other header
+ names--they have no standard meanings, so they can't do any harm.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_32.html octave-2.0.14/doc/interpreter/octave_32.html
*** octave-2.0.13/doc/interpreter/octave_32.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_32.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,567 ----
+
+
+
+
+ GNU Octave - Known Causes of Trouble
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This section describes known problems that affect users of Octave. Most
+ of these are not Octave bugs per se--if they were, we would fix them.
+ But the result for a user may be like the result of a bug.
+
+
+
+ Some of these problems are due to bugs in other software, some are
+ missing features that are too much work to add, and some are places
+ where people's opinions differ as to what is best.
+
+
+
+
+
+
+
+
+
+ -
+
+ Output that comes directly from Fortran functions is not sent through
+ the pager and may appear out of sequence with other output that is sent
+ through the pager. One way to avoid this is to force pending output to
+ be flushed before calling a function that will produce output from
+ within Fortran functions. To do this, use the command
+
+
+
+ fflush (stdout)
+
+
+ Another possible workaround is to use the command
+
+
+
+ page_screen_output = "false"
+
+
+ to turn the pager off.
+
+ -
+
+ If you get messages like
+
+
+
+ Input line too long
+
+
+ when trying to plot many lines on one graph, you have probably generated
+ a plot command that is too larger for gnuplot
's fixed-length
+ buffer for commands. Splitting up the plot command doesn't help because
+ replot is implemented in gnuplot by simply appending the new plotting
+ commands to the old command line and then evaluating it again.
+
+ You can demonstrate this `feature' by running gnuplot and doing
+ something like
+
+
+
+ plot sin (x), sin (x), sin (x), ... lots more ..., sin (x)
+
+
+ and then
+
+
+
+ replot sin (x), sin (x), sin (x), ... lots more ..., sin (x)
+
+
+ after repeating the replot command a few times, gnuplot will give you
+ an error.
+
+ Also, it doesn't help to use backslashes to enter a plot command over
+ several lines, because the limit is on the overall command line
+ length, once the backslashed lines are all pasted together.
+
+ Because of this, Octave tries to use as little of the command-line
+ length as possible by using the shortest possible abbreviations for
+ all the plot commands and options. Unfortunately, the length of the
+ temporary file names is probably what is taking up the most space on
+ the command line.
+
+ You can buy a little bit of command line space by setting the
+ environment variable TMPDIR
to be "." before starting Octave, or
+ you can increase the maximum command line length in gnuplot by changing
+ the following limits in the file plot.h in the gnuplot distribution and
+ recompiling gnuplot.
+
+
+
+ #define MAX_LINE_LEN 32768 /* originally 1024 */
+ #define MAX_TOKENS 8192 /* originally 400 */
+
+
+ Of course, this doesn't really fix the problem, but it does make it
+ much less likely that you will run into trouble unless you are putting
+ a very large number of lines on a given plot.
+
+
+
+ A list of ideas for future enhancements is distributed with Octave. See
+ the file `PROJECTS' in the top level directory in the source
+ distribution.
+
+
+
+
+
+
+
+
+
+
+
+ Your bug reports play an essential role in making Octave reliable.
+
+
+
+ When you encounter a problem, the first thing to do is to see if it is
+ already known. See section Known Causes of Trouble. If it isn't known, then you should
+ report the problem.
+
+
+
+ Reporting a bug may help you by bringing a solution to your problem, or
+ it may not. In any case, the principal function of a bug report is
+ to help the entire community by making the next version of Octave work
+ better. Bug reports are your contribution to the maintenance of Octave.
+
+
+
+ In order for a bug report to serve its purpose, you must include the
+ information that makes it possible to fix the bug.
+
+
+
+
+
+
+
+ If you have Octave working at all, the easiest way to prepare a complete
+ bug report is to use the Octave function bug_report
. When you
+ execute this function, Octave will prompt you for a subject and then
+ invoke the editor on a file that already contains all the configuration
+ information. When you exit the editor, Octave will mail the bug report
+ for you.
+
+
+
+
+
+
+
+
+
+
+
+ If you are not sure whether you have found a bug, here are some guidelines:
+
+
+
+
+ -
+
+
+
+
+ If Octave gets a fatal signal, for any input whatever, that is
+ a bug. Reliable interpreters never crash.
+
+
+
+
+
+
+
+
-
+
+ If Octave produces incorrect results, for any input whatever,
+ that is a bug.
+
+
+
+
-
+
+ Some output may appear to be incorrect when it is in fact due to a
+ program whose behavior is undefined, which happened by chance to give
+ the desired results on another system. For example, the range operator
+ may produce different results because of differences in the way floating
+ point arithmetic is handled on various systems.
+
+
+
+
+
-
+
+ If Octave produces an error message for valid input, that is a bug.
+
+
+
-
+
+ If Octave does not produce an error message for invalid input, that is
+ a bug. However, you should note that your idea of "invalid input"
+ might be my idea of "an extension" or "support for traditional
+ practice".
+
+
+
+
-
+
+ If you are an experienced user of programs like Octave, your suggestions
+ for improvement are welcome in any case.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ If you have Octave working at all, the easiest way to prepare a complete
+ bug report is to use the Octave function bug_report
. When you
+ execute this function, Octave will prompt you for a subject and then
+ invoke the editor on a file that already contains all the configuration
+ information. When you exit the editor, Octave will mail the bug report
+ for you.
+
+
+
+ If for some reason you cannot use Octave's bug_report
function,
+ send bug reports for Octave to @email{bug-octave@bevo.che.wisc.edu}.
+
+
+
+ Do not send bug reports to `help-octave'. Most users of
+ Octave do not want to receive bug reports. Those that do have asked to
+ be on the mailing list.
+
+
+
+ As a last resort, send bug reports on paper to:
+
+
+
+
+ Octave Bugs c/o John W. Eaton
+ University of Wisconsin-Madison
+ Department of Chemical Engineering
+ 1415 Engineering Drive
+ Madison, Wisconsin 53706 USA
+
+
+
+
+
+
+
+
+
+
+ Send bug reports for Octave to one of the addresses listed in
+ section Where to Report Bugs.
+
+
+
+ The fundamental principle of reporting bugs usefully is this:
+ report all the facts. If you are not sure whether to state a
+ fact or leave it out, state it!
+
+
+
+ Often people omit facts because they think they know what causes the
+ problem and they conclude that some details don't matter. Thus, you might
+ assume that the name of the variable you use in an example does not matter.
+ Well, probably it doesn't, but one cannot be sure. Perhaps the bug is a
+ stray memory reference which happens to fetch from the location where that
+ name is stored in memory; perhaps, if the name were different, the contents
+ of that location would fool the interpreter into doing the right thing
+ despite the bug. Play it safe and give a specific, complete example.
+
+
+
+ Keep in mind that the purpose of a bug report is to enable someone to
+ fix the bug if it is not known. Always write your bug reports on
+ the assumption that the bug is not known.
+
+
+
+ Sometimes people give a few sketchy facts and ask, "Does this ring a
+ bell?" This cannot help us fix a bug. It is better to send a complete
+ bug report to begin with.
+
+
+
+ Try to make your bug report self-contained. If we have to ask you for
+ more information, it is best if you include all the previous information
+ in your response, as well as the information that was missing.
+
+
+
+ To enable someone to investigate the bug, you should include all these
+ things:
+
+
+
+
+ -
+
+ The version of Octave. You can get this by noting the version number
+ that is printed when Octave starts, or running it with the `-v'
+ option.
+
+
-
+
+ A complete input file that will reproduce the bug.
+
+ A single statement may not be enough of an example--the bug might
+ depend on other details that are missing from the single statement where
+ the error finally occurs.
+
+
-
+
+ The command arguments you gave Octave to execute that example
+ and observe the bug. To guarantee you won't omit something important,
+ list all the options.
+
+ If we were to try to guess the arguments, we would probably guess wrong
+ and then we would not encounter the bug.
+
+
-
+
+ The type of machine you are using, and the operating system name and
+ version number.
+
+
-
+
+ The command-line arguments you gave to the
configure
command when
+ you installed the interpreter.
+
+ -
+
+ A complete list of any modifications you have made to the interpreter
+ source.
+
+ Be precise about these changes--show a context diff for them.
+
+
-
+
+ Details of any other deviations from the standard procedure for installing
+ Octave.
+
+
+
+
+
+
+
+
-
+
+ A description of what behavior you observe that you believe is
+ incorrect. For example, "The interpreter gets a fatal signal," or, "The
+ output produced at line 208 is incorrect."
+
+ Of course, if the bug is that the interpreter gets a fatal signal, then
+ one can't miss it. But if the bug is incorrect output, we might not
+ notice unless it is glaringly wrong.
+
+ Even if the problem you experience is a fatal signal, you should still
+ say so explicitly. Suppose something strange is going on, such as, your
+ copy of the interpreter is out of synch, or you have encountered a bug
+ in the C library on your system. Your copy might crash and the copy
+ here would not. If you said to expect a crash, then when the
+ interpreter here fails to crash, we would know that the bug was not
+ happening. If you don't say to expect a crash, then we would not know
+ whether the bug was happening. We would not be able to draw any
+ conclusion from our observations.
+
+ Often the observed symptom is incorrect output when your program is run.
+ Unfortunately, this is not enough information unless the program is
+ short and simple. It is very helpful if you can include an explanation
+ of the expected output, and why the actual output is incorrect.
+
+
-
+
+ If you wish to suggest changes to the Octave source, send them as
+ context diffs. If you even discuss something in the Octave source,
+ refer to it by context, not by line number, because the line numbers in
+ the development sources probably won't match those in your sources.
+
+
+
+ Here are some things that are not necessary:
+
+
+
+
+ -
+
+
+
+ A description of the envelope of the bug.
+
+ Often people who encounter a bug spend a lot of time investigating which
+ changes to the input file will make the bug go away and which changes
+ will not affect it. Such information is usually not necessary to enable
+ us to fix bugs in Octave, but if you can find a simpler example to
+ report instead of the original one, that is a convenience.
+ Errors in the output will be easier to spot, running under the debugger
+ will take less time, etc. Most Octave bugs involve just one function, so
+ the most straightforward way to simplify an example is to delete all the
+ function definitions except the one in which the bug occurs.
+
+ However, simplification is not vital; if you don't want to do
+ this, report the bug anyway and send the entire test case you
+ used.
+
+
-
+
+ A patch for the bug. Patches can be helpful, but if you find a bug, you
+ should report it, even if you cannot send a fix for the problem.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ If you would like to write bug fixes or improvements for Octave, that is
+ very helpful. When you send your changes, please follow these
+ guidelines to avoid causing extra work for us in studying the patches.
+
+
+
+ If you don't follow these guidelines, your information might still be
+ useful, but using it will take extra work. Maintaining Octave is a lot
+ of work in the best of circumstances, and we can't keep up unless you do
+ your best to help.
+
+
+
+
+ -
+
+ Send an explanation with your changes of what problem they fix or what
+ improvement they bring about. For a bug fix, just include a copy of the
+ bug report, and explain why the change fixes the bug.
+
+
-
+
+ Always include a proper bug report for the problem you think you have
+ fixed. We need to convince ourselves that the change is right before
+ installing it. Even if it is right, we might have trouble judging it if
+ we don't have a way to reproduce the problem.
+
+
-
+
+ Include all the comments that are appropriate to help people reading the
+ source in the future understand why this change was needed.
+
+
-
+
+ Don't mix together changes made for different reasons.
+ Send them individually.
+
+ If you make two changes for separate reasons, then we might not want to
+ install them both. We might want to install just one.
+
+
-
+
+ Use `diff -c' to make your diffs. Diffs without context are hard
+ for us to install reliably. More than that, they make it hard for us to
+ study the diffs to decide whether we want to install them. Unidiff
+ format is better than contextless diffs, but not as easy to read as
+ `-c' format.
+
+ If you have GNU diff, use `diff -cp', which shows the name of the
+ function that each change occurs in.
+
+
-
+
+ Write the change log entries for your changes.
+
+ Read the `ChangeLog' file to see what sorts of information to put
+ in, and to learn the style that we use. The purpose of the change log
+ is to show people where to find what was changed. So you need to be
+ specific about what functions you changed; in large functions, it's
+ often helpful to indicate where within the function the change was made.
+
+ On the other hand, once you have shown people where to find the change,
+ you need not explain its purpose. Thus, if you add a new function, all
+ you need to say about it is that it is new. If you feel that the
+ purpose needs explaining, it probably does--but the explanation will be
+ much more useful if you put it in comments in the code.
+
+ If you would like your name to appear in the header line for who made
+ the change, send us the header line.
+
+
+
+
+
+
+
+
+
+
+ The mailing list @email{help-octave@bevo.che.wisc.edu} exists for the
+ discussion of matters related to using and installing Octave. If would
+ like to join the discussion, please send a short note to
+ @email{help-octave-request@bevo.che.wisc.edu}.
+
+
+
+ Please do not send requests to be added or removed from the
+ mailing list, or other administrative trivia to the list itself.
+
+
+
+ If you think you have found a bug in the installation procedure,
+ however, you should send a complete bug report for the problem to
+ @email{bug-octave@bevo.che.wisc.edu}. See section How to Report Bugs for
+ information that will help you to submit a useful report.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_33.html octave-2.0.14/doc/interpreter/octave_33.html
*** octave-2.0.13/doc/interpreter/octave_33.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_33.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,661 ----
+
+
+
+
+ GNU Octave - Installing Octave
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ Here is the procedure for installing Octave from scratch on a Unix
+ system. For instructions on how to install the binary distributions of
+ Octave, see section Binary Distributions.
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ You must use the version of GNU Info distributed with Octave, because it
+ includes some changes to allow Octave to search the indices of the info
+ files. If you would like, you should be able to replace other copies of
+ the Info browser that you have with the one distributed with Octave.
+ Patches relative to a recent release of the GNU Info browser are
+ included in the file `INFO.PATCH' in the Octave source
+ distribution. This modification has been submitted to the GNU Info
+ maintainer, and should appear in some future release. Once that
+ happens, the GNU Info browser will no longer be distributed with Octave.
+
+
+
+
+
+
+
+ This section contains a list of problems (and some apparent problems
+ that don't really mean anything is wrong) that may show up during
+ installation of Octave.
+
+
+
+
+ -
+
+ On some SCO systems,
info
fails to compile if
+ HAVE_TERMIOS_H
is defined int `config.h'. Simply removing
+ the definition from `info/config.h' should allow it to compile.
+
+ -
+
+ If
configure
finds dlopen
, dlsym
, dlclose
,
+ and dlerror
, but not the header file `dlfcn.h', you need to
+ find the source for the header file and install it in the directory
+ `usr/include'. This is reportedly a problem with Slackware 3.1.
+ For Linux/GNU systems, the source for `dlfcn.h' is in the
+ ldso
package.
+
+ -
+
+ Building `.oct' files doesn't work.
+
+ You should probably have a shared version of
libstdc++
. A patch
+ is needed to build shared versions of version 2.7.2 of libstdc++
+ on the HP-PA architecture. You can find the patch at
+ @url{ftp://ftp.cygnus.com/pub/g++/libg++-2.7.2-hppa-gcc-fix}.
+
+ -
+
+ On FreeBSD systems Octave may hang while initializing some internal
+ constants. The fix appears to be to use
+
+
+
+ options GPL_MATH_EMULATE
+
+
+ rather than
+
+
+
+ options MATH_EMULATE
+
+
+ in the kernel configuration files (typically found in the directory
+ `/sys/i386/conf'. After making this change, you'll need to rebuild
+ the kernel, install it, and reboot.
+
+ -
+
+ If you encounter errors like
+
+
+
+ passing `void (*)()' as argument 2 of
+ `octave_set_signal_handler(int, void (*)(int))'
+
+
+ or
+
+
+
+ warning: ANSI C++ prohibits conversion from `(int)' to `(...)'
+
+
+ while compiling `sighandlers.cc', you may need to edit some files
+ in the gcc
include subdirectory to add proper prototypes for functions
+ there. For example, Ultrix 4.2 needs proper declarations for the
+ signal
function and the SIG_IGN
macro in the file
+ `signal.h'.
+
+ On some systems the SIG_IGN
macro is defined to be something like
+ this:
+
+
+
+ #define SIG_IGN (void (*)())1
+
+
+ when it should really be something like:
+
+
+
+ #define SIG_IGN (void (*)(int))1
+
+
+ to match the prototype declaration for the signal
function. This
+ change should also be made for the SIG_DFL
and SIG_ERR
+ symbols. It may be necessary to change the definitions in
+ `sys/signal.h' as well.
+
+ The gcc
fixincludes
and fixproto
scripts should
+ probably fix these problems when gcc
installs its modified set of
+ header files, but I don't think that's been done yet.
+
+ You should not change the files in `/usr/include'. You
+ can find the gcc
include directory tree by running the command
+
+
+
+ gcc -print-libgcc-file-name
+
+
+ The directory of gcc
include files normally begins in the same directory
+ that contains the file `libgcc.a'.
+
+ -
+
+ There is a bug with the
makeinfo
program that is distributed with
+ Texinfo (through version 3.9) that causes the indices in Octave's
+ on-line manual to be generated incorrectly. If you need to recreate the
+ on-line documentation, you should get the makeinfo
program that
+ is distributed with texinfo-3.9 and apply the patch for makeinfo
+ that is distributed with Octave. See the file `MAKEINFO.PATCH' for
+ more details.
+
+ -
+
+ Some of the Fortran subroutines may fail to compile with older versions
+ of the Sun Fortran compiler. If you get errors like
+
+
+
+ zgemm.f:
+ zgemm:
+ warning: unexpected parent of complex expression subtree
+ zgemm.f, line 245: warning: unexpected parent of complex
+ expression subtree
+ warning: unexpected parent of complex expression subtree
+ zgemm.f, line 304: warning: unexpected parent of complex
+ expression subtree
+ warning: unexpected parent of complex expression subtree
+ zgemm.f, line 327: warning: unexpected parent of complex
+ expression subtree
+ pcc_binval: missing IR_CONV in complex op
+ make[2]: *** [zgemm.o] Error 1
+
+
+ when compiling the Fortran subroutines in the `libcruft'
+ subdirectory, you should either upgrade your compiler or try compiling
+ with optimization turned off.
+
+ -
+
+ On NeXT systems, if you get errors like this:
+
+
+
+ /usr/tmp/cc007458.s:unknown:Undefined local symbol LBB7656
+ /usr/tmp/cc007458.s:unknown:Undefined local symbol LBE7656
+
+
+ when compiling `Array.cc' and `Matrix.cc', try recompiling
+ these files without -g
.
+
+ -
+
+ Some people have reported that calls to shell_cmd and the pager do not
+ work on SunOS systems. This is apparently due to having
+
G_HAVE_SYS_WAIT
defined to be 0 instead of 1 when compiling
+ libstdc++
.
+
+ -
+
+ On NeXT systems, linking to `libsys_s.a' may fail to resolve the
+ following functions
+
+
+
+ _tcgetattr
+ _tcsetattr
+ _tcflow
+
+
+ which are part of `libposix.a'. Unfortunately, linking Octave with
+ -posix
results in the following undefined symbols.
+
+
+
+ .destructors_used
+ .constructors_used
+ _objc_msgSend
+ _NXGetDefaultValue
+ _NXRegisterDefaults
+ .objc_class_name_NXStringTable
+ .objc_class_name_NXBundle
+
+
+ One kluge around this problem is to extract `termios.o' from
+ `libposix.a', put it in Octave's `src' directory, and add it
+ to the list of files to link together in the makefile. Suggestions for
+ better ways to solve this problem are welcome!
+
+ -
+
+ If Octave crashes immediately with a floating point exception, it is
+ likely that it is failing to initialize the IEEE floating point values
+ for infinity and NaN.
+
+ If your system actually does support IEEE arithmetic, you should be able
+ to fix this problem by modifying the function
octave_ieee_init
in
+ the file `lo-ieee.cc' to correctly initialize Octave's internal
+ infinity and NaN variables.
+
+ If your system does not support IEEE arithmetic but Octave's configure
+ script incorrectly determined that it does, you can work around the
+ problem by editing the file `config.h' to not define
+ HAVE_ISINF
, HAVE_FINITE
, and HAVE_ISNAN
.
+
+ In any case, please report this as a bug since it might be possible to
+ modify Octave's configuration script to automatically determine the
+ proper thing to do.
+
+ -
+
+ After installing the binary distribution of Octave in an alternate
+ directory, the Emacs command
run-octave
doesn't work. Emacs
+ hangs in accept-process-output
in inferior-octave-startup
.
+
+ This seems to be a problem with executing a shell script using the
+ comint package. You can avoid the problem by changing the way Octave is
+ installed to eliminate the need for the shell script. You can either
+ compile and install Octave using the source distribution, reinstall the
+ binary distribution in the default directory, or copy the commands in
+ the octave shell script wrapper to your shell startup files (and the
+ shell startup files for anyone else who is using Octave) and then
+ rename the file `octave.bin' to be `octave'.
+
+
+
+
+
+
+
+ Although Octave is not very difficult to build from its sources, it is a
+ relatively large program that does require a significant amount of time
+ and disk space to compile and install. Because of this, many people
+ want to be able to obtain binary distributions so they can start using
+ Octave immediately, without having to bother with the details of
+ compiling it first. This is understandable, so I try to maintain a
+ current collection of binary distributions at
+ @url{ftp://ftp.che.wisc.edu/pub/octave/BINARIES}.
+
+
+
+ Please understand, however, that there is only a limited amount of time
+ available to devote to making binaries, so binaries may not be
+ immediately available for some platforms. (Please contact
+ @email{bug-octave@bevo.che.wisc.edu} if you are interested in helping
+ make a binary distribution available for your system.)
+
+
+
+
+
+
+
+
+ To install Octave from a binary distribution, execute the command
+
+
+
+
+ sh ./install-octave
+
+
+
+ in the top level directory of the distribution.
+
+
+
+ Binary distributions are normally compiled assuming that Octave will be
+ installed in the following subdirectories of `/usr/local'.
+
+
+
+
+ - `bin'
+
-
+ Octave and other binaries that people will want to run directly.
+
+
- `lib'
+
-
+ Shared libraries that Octave needs in order to run. These files are
+ not included if you are installing a statically linked version of
+ Octave.
+
+
- `man/man1'
+
-
+ Unix-style man pages describing Octave.
+
+
- `info'
+
-
+ Info files describing Octave.
+
+
- `share/octave/version/m'
+
-
+ Function files distributed with Octave. This includes the Octave
+ version, so that multiple versions of Octave may be installed at the
+ same time.
+
+
- `libexec/octave/version/exec/arch'
+
-
+ Executables to be run by Octave rather than the user.
+
+
- `libexec/octave/version/oct/arch'
+
-
+ Object files that will be dynamically loaded.
+
+
- `share/octave/version/imagelib'
+
-
+ Image files that are distributed with Octave.
+
+
+
+ where version stands for the current version number of the
+ interpreter, and arch is the type of computer on which Octave
+ is installed (for example, `i586-pc-linux-gnu').
+
+
+
+ If these directories don't exist, the script install-octave
will
+ create them for you. The installation script also creates the following
+ subdirectories of `/usr/local' that are intended for locally
+ installed functions:
+
+
+
+
+ - `share/octave/site/m'
+
-
+ Locally installed M-files.
+
+
- `libexec/octave/site/exec/arch'
+
-
+ Locally installed binaries intended to be run by Octave rather than by
+ the user.
+
+
- `libexec/octave/site/octave/arch'
+
-
+ Local object files that will be dynamically linked.
+
+
+
+ If it is not possible for you to install Octave in `/usr/local', or
+ if you would prefer to install it in a different directory, you can
+ specify the name of the top level directory as an argument to the
+ `install-octave' script. For example:
+
+
+
+
+ sh ./install-octave /some/other/directory
+
+
+
+ will install Octave in subdirectories of the directory
+ `/some/other/directory'.
+
+
+
+
+
+
+
+ Here is how to build a binary distribution for others to use. If you
+ want to make a binary distribution for your system available along with
+ the Octave sources and binaries on @url{ftp.che.wisc.edu}, please follow
+ this procedure. For directions explaining how to make the binary
+ available on the ftp site, please contact
+ @email{bug-octave@bevo.che.wisc.edu}.
+
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_34.html octave-2.0.14/doc/interpreter/octave_34.html
*** octave-2.0.13/doc/interpreter/octave_34.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_34.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,630 ----
+
+
+
+
+ GNU Octave - Emacs Octave Support
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ The development of Octave code can greatly be facilitated using Emacs
+ with Octave mode, a major mode for editing Octave files which can e.g.
+ automatically indent the code, do some of the typing (with Abbrev mode)
+ and show keywords, comments, strings, etc. in different faces (with
+ Font-lock mode on devices that support it).
+
+
+
+ It is also possible to run Octave from within Emacs, either by directly
+ entering commands at the prompt in a buffer in Inferior Octave mode, or
+ by interacting with Octave from within a file with Octave code. This is
+ useful in particular for debugging Octave code.
+
+
+
+ Finally, you can convince Octave to use the Emacs info reader for
+ help -i.
+
+
+
+ All functionality is provided by the Emacs Lisp package EOS (for "Emacs
+ Octave Support"). This chapter describes how to set up and use this
+ package.
+
+
+
+ Please contact <Kurt.Hornik@ci.tuwien.ac.at> if you have any questions
+ or suggestions on using EOS.
+
+
+
+
+
+
+
+
+ The Emacs package EOS consists of the three files `octave-mod.el',
+ `octave-inf.el', and `octave-hlp.el'. These files, or better
+ yet their byte-compiled versions, should be somewhere in your Emacs
+ load-path.
+
+
+
+ If you have GNU Emacs with a version number at least as high as 19.35,
+ you are all set up, because EOS is respectively will be part of GNU
+ Emacs as of version 19.35.
+
+
+
+ Otherwise, copy the three files from the `emacs' subdirectory of
+ the Octave distribution to a place where Emacs can find them (this
+ depends on how your Emacs was installed). Byte-compile them for speed
+ if you want.
+
+
+
+
+
+
+
+ If you are lucky, your sysadmins have already arranged everything so
+ that Emacs automatically goes into Octave mode whenever you visit an
+ Octave code file as characterized by its extension `.m'. If not,
+ proceed as follows.
+
+
+
+
+ -
+
+ To begin using Octave mode for all `.m' files you visit, add the
+ following lines to a file loaded by Emacs at startup time, typically
+ your `~/.emacs' file:
+
+
+
+ (autoload 'octave-mode "octave-mod" nil t)
+ (setq auto-mode-alist
+ (cons '("\\.m$" . octave-mode) auto-mode-alist))
+
+
+ -
+
+ Finally, to turn on the abbrevs, auto-fill and font-lock features
+ automatically, also add the following lines to one of the Emacs startup
+ files:
+
+
+ (add-hook 'octave-mode-hook
+ (lambda ()
+ (abbrev-mode 1)
+ (auto-fill-mode 1)
+ (if (eq window-system 'x)
+ (font-lock-mode 1))))
+
+
+ See the Emacs manual for more information about how to customize
+ Font-lock mode.
+
+
+
+ In Octave mode, the following special Emacs commands can be used in
+ addition to the standard Emacs commands.
+
+
+
+
+ - C-h m
+
-
+ Describe the features of Octave mode.
+
+
- LFD
+
-
+ Reindent the current Octave line, insert a newline and indent the new
+ line (
octave-reindent-then-newline-and-indent
). An abbrev before
+ point is expanded if abbrev-mode
is non-nil
.
+
+ - TAB
+
-
+ Indents current Octave line based on its contents and on previous
+ lines (
indent-according-to-mode
).
+
+ - ;
+
-
+ Insert an "electric" semicolon (
octave-electric-semi
). If
+ octave-auto-indent
is non-nil
, reindent the current line.
+ If octave-auto-newline
is non-nil
, automagically insert a
+ newline and indent the new line.
+
+ - `
+
-
+ Start entering an abbreviation (
octave-abbrev-start
). If Abbrev
+ mode is turned on, typing `C-h or `? lists all abbrevs.
+ Any other key combination is executed normally. Note that all Octave
+ abbrevs start with a grave accent.
+
+ - M-LFD
+
-
+ Break line at point and insert continuation marker and alignment
+ (
octave-split-line
).
+
+ - M-TAB
+
-
+ Perform completion on Octave symbol preceding point, comparing that
+ symbol against Octave's reserved words and builtin variables
+ (
octave-complete-symbol
).
+
+ - M-C-a
+
-
+ Move backward to the beginning of a function
+ (
octave-beginning-of-defun
).
+ With prefix argument N, do it that many times if N is
+ positive; otherwise, move forward to the N-th following beginning
+ of a function.
+
+ - M-C-e
+
-
+ Move forward to the end of a function (
octave-end-of-defun
).
+ With prefix argument N, do it that many times if N is
+ positive; otherwise, move back to the N-th preceding end of a
+ function.
+
+ - M-C-h
+
-
+ Puts point at beginning and mark at the end of the current Octave
+ function, i.e., the one containing point or following point
+ (
octave-mark-defun
).
+
+ - M-C-q
+
-
+ Properly indents the Octave function which contains point
+ (
octave-indent-defun
).
+
+ - M-;
+
-
+ If there is no comment already on this line, create a code-level comment
+ (started by two comment characters) if the line is empty, or an in-line
+ comment (started by one comment character) otherwise
+ (
octave-indent-for-comment
).
+ Point is left after the start of the comment which is properly aligned.
+
+ - C-c ;
+
-
+ Puts the comment character `#' (more precisely, the string value of
+
octave-comment-start
) at the beginning of every line in the
+ region (octave-comment-region
). With just C-u prefix
+ argument, uncomment each line in the region. A numeric prefix argument
+ N means use N comment characters.
+
+ - C-c :
+
-
+ Uncomments every line in the region (
octave-uncomment-region
).
+
+ - C-c C-p
+
-
+ Move one line of Octave code backward, skipping empty and comment lines
+ (
octave-previous-code-line
). With numeric prefix argument
+ N, move that many code lines backward (forward if N is
+ negative).
+
+ - C-c C-n
+
-
+ Move one line of Octave code forward, skipping empty and comment lines
+ (
octave-next-code-line
). With numeric prefix argument N,
+ move that many code lines forward (backward if N is negative).
+
+ - C-c C-a
+
-
+ Move to the `real' beginning of the current line
+ (
octave-beginning-of-line
). If point is in an empty or comment
+ line, simply go to its beginning; otherwise, move backwards to the
+ beginning of the first code line which is not inside a continuation
+ statement, i.e., which does not follow a code line ending in `...'
+ or `\', or is inside an open parenthesis list.
+
+ - C-c C-e
+
-
+ Move to the `real' end of the current line (
octave-end-of-line
).
+ If point is in a code line, move forward to the end of the first Octave
+ code line which does not end in `...' or `\' or is inside an
+ open parenthesis list. Otherwise, simply go to the end of the current
+ line.
+
+ - C-c M-C-n
+
-
+ Move forward across one balanced begin-end block of Octave code
+ (
octave-forward-block
). With numeric prefix argument N,
+ move forward across n such blocks (backward if N is
+ negative).
+
+ - C-c M-C-p
+
-
+ Move back across one balanced begin-end block of Octave code
+ (
octave-backward-block
). With numeric prefix argument N,
+ move backward across N such blocks (forward if N is
+ negative).
+
+ - C-c M-C-d
+
-
+ Move forward down one begin-end block level of Octave code
+ (
octave-down-block
). With numeric prefix argument, do it that
+ many times; a negative argument means move backward, but still go down
+ one level.
+
+ - C-c M-C-u
+
-
+ Move backward out of one begin-end block level of Octave code
+ (
octave-backward-up-block
). With numeric prefix argument, do it
+ that many times; a negative argument means move forward, but still to a
+ less deep spot.
+
+ - C-c M-C-h
+
-
+ Put point at the beginning of this block, mark at the end
+ (
octave-mark-block
).
+ The block marked is the one that contains point or follows point.
+
+ - C-c ]
+
-
+ Close the current block on a separate line (
octave-close-block
).
+ An error is signaled if no block to close is found.
+
+ - C-c f
+
-
+ Insert a function skeleton, prompting for the function's name, arguments
+ and return values which have to be entered without parens
+ (
octave-insert-defun
).
+
+ - C-c C-h
+
-
+ Search the function, operator and variable indices of all info files
+ with documentation for Octave for entries (
octave-help
). If used
+ interactively, the entry is prompted for with completion. If multiple
+ matches are found, one can cycle through them using the standard
+ `,' (Info-index-next
) command of the Info reader.
+
+ The variable octave-help-files
is a list of files to search
+ through and defaults to '("octave")
. If there is also an Octave
+ Local Guide with corresponding info file, say, `octave-LG', you can
+ have octave-help
search both files by
+
+
+ (setq octave-help-files '("octave" "octave-LG"))
+
+
+ in one of your Emacs startup files.
+
+
+
+
+ A common problem is that the RET key does not indent the
+ line to where the new text should go after inserting the newline. This
+ is because the standard Emacs convention is that RET (aka
+ C-m) just adds a newline, whereas LFD (aka C-j) adds a
+ newline and indents it. This is particularly inconvenient for users with
+ keyboards which do not have a special LFD key at all; in such
+ cases, it is typically more convenient to use RET as the LFD
+ key (rather than typing C-j).
+
+
+
+ You can make RET do this by adding
+
+
+ (define-key octave-mode-map "\C-m"
+ 'octave-reindent-then-newline-and-indent)
+
+
+
+ to one of your Emacs startup files. Another, more generally applicable
+ solution is
+
+
+ (defun RET-behaves-as-LFD ()
+ (let ((x (key-binding "\C-j")))
+ (local-set-key "\C-m" x)))
+ (add-hook 'octave-mode-hook 'RET-behaves-as-LFD)
+
+
+
+ (this works for all modes by adding to the startup hooks, without having
+ to know the particular binding of RET in that mode!). Similar
+ considerations apply for using M-RET as M-LFD. As Barry
+ A. Warsaw <bwarsaw@cnri.reston.va.us> says in the documentation for his
+ cc-mode
, "This is a very common question. :-)
If you want
+ this to be the default behavior, don't lobby me, lobby RMS!"
+
+
+
+ The following variables can be used to customize Octave mode.
+
+
+
+
+ octave-auto-indent
+ -
+ Non-
nil
means auto-indent the current line after a semicolon or
+ space. Default is nil
.
+
+ octave-auto-newline
+ -
+ Non-
nil
means auto-insert a newline and indent after semicolons
+ are typed. The default value is nil
.
+
+ octave-blink-matching-block
+ -
+ Non-
nil
means show matching begin of block when inserting a space,
+ newline or `;' after an else or end keyword. Default is t
.
+ This is an extremely useful feature for automatically verifying that the
+ keywords match--if they don't, an error message is displayed.
+
+ octave-block-offset
+ -
+ Extra indentation applied to statements in block structures.
+ Default is 2.
+
+
octave-continuation-offset
+ -
+ Extra indentation applied to Octave continuation lines.
+ Default is 4.
+
+
octave-continuation-string
+ -
+ String used for Octave continuation lines.
+ Normally `\'.
+
+
octave-mode-startup-message
+ -
+ If
t
(default), a startup message is displayed when Octave mode
+ is called.
+
+
+
+
+ If Font Lock mode is enabled, Octave mode will display
+
+
+ -
+
+ strings in
font-lock-string-face
+ -
+
+ comments in
font-lock-comment-face
+ -
+
+ the Octave reserved words (such as all block keywords) and the text
+ functions (such as `cd' or `who') which are also reserved
+ using
font-lock-keyword-face
+ -
+
+ the builtin operators (`&&', `<>', ...) using
+
font-lock-reference-face
+ -
+
+ the builtin variables (such as `prefer_column_vectors', `NaN'
+ or `LOADPATH') in
font-lock-variable-name-face
+ -
+
+ and the function names in function declarations in
+
font-lock-function-name-face
.
+
+
+
+ There is also rudimentary support for Imenu (currently, function names
+ can be indexed).
+
+
+
+ Customization of Octave mode can be performed by modification of the
+ variable octave-mode-hook
. It the value of this variable is
+ non-nil
, turning on Octave mode calls its value.
+
+
+
+ If you discover a problem with Octave mode, you can conveniently send a
+ bug report using C-c C-b (octave-submit-bug-report
). This
+ automatically sets up a mail buffer with version information already
+ added. You just need to add a description of the problem, including a
+ reproducible test case and send the message.
+
+
+
+
+
+
+
+ The package `octave' provides commands for running an inferior
+ Octave process in a special Emacs buffer. Use
+
+
+ M-x run-octave
+
+
+
+ to directly start an inferior Octave process. If Emacs does not know
+ about this command, add the line
+
+
+ (autoload 'run-octave "octave-inf" nil t)
+
+
+
+ to your `.emacs' file.
+
+
+
+ This will start Octave in a special buffer the name of which is
+ specified by the variable inferior-octave-buffer
and defaults to
+ "*Inferior Octave*"
. From within this buffer, you can
+ interact with the inferior Octave process `as usual', i.e., by entering
+ Octave commands at the prompt. The buffer is in Inferior Octave mode,
+ which is derived from the standard Comint mode, a major mode for
+ interacting with an inferior interpreter. See the documentation for
+ comint-mode
for more details, and use C-h b to find out
+ about available special keybindings.
+
+
+
+ You can also communicate with an inferior Octave process from within
+ files with Octave code (i.e., buffers in Octave mode), using the
+ following commands.
+
+
+
+
+ - C-c i l
+
-
+ Send the current line to the inferior Octave process
+ (
octave-send-line
).
+ With positive prefix argument N, send that many lines.
+ If octave-send-line-auto-forward
is non-nil
, go to the
+ next unsent code line.
+ - C-c i b
+
-
+ Send the current block to the inferior Octave process
+ (
octave-send-block
).
+ - C-c i f
+
-
+ Send the current function to the inferior Octave process
+ (
octave-send-defun
).
+ - C-c i r
+
-
+ Send the region to the inferior Octave process
+ (
octave-send-region
).
+ - C-c i s
+
-
+ Make sure that `inferior-octave-buffer' is displayed
+ (
octave-show-process-buffer
).
+ - C-c i h
+
-
+ Delete all windows that display the inferior Octave buffer
+ (
octave-hide-process-buffer
).
+ - C-c i k
+
-
+ Kill the inferior Octave process and its buffer
+ (
octave-kill-process
).
+
+
+
+ The effect of the commands which send code to the Octave process can be
+ customized by the following variables.
+
+
+ octave-send-echo-input
+ -
+ Non-
nil
means echo input sent to the inferior Octave process.
+ Default is t
.
+
+ octave-send-show-buffer
+ -
+ Non-
nil
means display the buffer running the Octave process after
+ sending a command (but without selecting it).
+ Default is t
.
+
+
+
+ If you send code and there is no inferior Octave process yet, it will be
+ started automatically.
+
+
+
+ The startup of the inferior Octave process is highly customizable.
+ The variable inferior-octave-startup-args
can be used for
+ specifying command lines arguments to be passed to Octave on startup
+ as a list of strings. For example, to suppress the startup message and
+ use `traditional' mode, set this to '("-q" "--traditional")
.
+ You can also specify a startup file of Octave commands to be loaded on
+ startup; note that these commands will not produce any visible output
+ in the process buffer. Which file to use is controlled by the variable
+ inferior-octave-startup-file
. If this is nil
, the file
+ `~/.emacs-octave' is used if it exists.
+
+
+
+ And finally, inferior-octave-mode-hook
is run after starting the
+ process and putting its buffer into Inferior Octave mode. Hence, if you
+ like the up and down arrow keys to behave in the interaction buffer as
+ in the shell, and you want this buffer to use nice colors, add
+
+
+ (add-hook 'inferior-octave-mode-hook
+ (lambda ()
+ (turn-on-font-lock)
+ (define-key inferior-octave-mode-map [up]
+ 'comint-previous-input)
+ (define-key inferior-octave-mode-map [down]
+ 'comint-next-input)))
+
+
+
+ to your `.emacs' file. You could also swap the roles of C-a
+ (beginning-of-line
) and C-c C-a
(comint-bol
) using
+ this hook.
+
+
+
+
+
+ Note:
+ If you set your Octave prompts to something different from the defaults,
+ make sure that inferior-octave-prompt
matches them.
+ Otherwise, nothing will work, because Emacs will have no idea
+ when Octave is waiting for input, or done sending output.
+
+
+
+
+
+
+
+ You can also set up the Emacs Info reader for dealing with the results
+ of Octave's `help -i'. For this, the package `gnuserv' needs
+ to be installed, which unfortunately still does not come with GNU Emacs
+ (it does with XEmacs). It can be retrieved from any GNU Emacs Lisp Code
+ Directory archive, e.g.
+ @url{ftp://ftp.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive},
+ in the `packages' subdirectory. The alpha version of an enhanced
+ version of gnuserv is available at
+ @url{ftp://ftp.wellfleet.com/netman/psmith/emacs/gnuserv-2.1alpha.tar.gz}.
+
+
+
+ If `gnuserv' is installed, add the lines
+
+
+ (autoload 'octave-help "octave-hlp" nil t)
+ (require 'gnuserv)
+ (gnuserv-start)
+
+
+
+ to your `.emacs' file.
+
+
+
+ You can use either `plain' Emacs Info or the function octave-help
+ as your Octave info reader (for `help -i'). In the former case,
+ set the Octave variable INFO_PROGRAM
to "info-emacs-info"
.
+ The latter is perhaps more attractive because it allows to look up keys
+ in the indices of several info files related to Octave (provided
+ that the Emacs variable octave-help-files
is set correctly). In
+ this case, set INFO_PROGRAM
to "info-emacs-octave-help"
.
+
+
+
+ If you use Octave from within Emacs, these settings are best done in the
+ `~/.emacs-octave' startup file (or the file pointed to by the Emacs
+ variable inferior-octave-startup-file
).
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_35.html octave-2.0.14/doc/interpreter/octave_35.html
*** octave-2.0.13/doc/interpreter/octave_35.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_35.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,79 ----
+
+
+
+
+ GNU Octave - Grammar
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ Someday I hope to expand this to include a semi-formal description of
+ Octave's language.
+
+
+
+
+
+
+
+
+
+
+
+ The following identifiers are keywords, and may not be used as variable
+ or function names:
+
+
+
+
+ all_va_args endwhile
+ break for
+ case function
+ catch global
+ continue gplot
+ else gsplot
+ elseif if
+ end otherwise
+ end_try_catch return
+ end_unwind_protect switch
+ endfor try
+ endfunction unwind_protect
+ endif unwind_protect_cleanup
+ endswitch while
+
+
+
+ The following command-like functions are also speical. They may be used
+ as simple variable names, but not as formal parameters for functions, or
+ as the names of structure variables. Failed assignments leave them
+ undefined (you can recover the orginal definition as a function using
+ clear).
+
+
+
+
+ casesen echo load show
+ cd edit_history ls type
+ chdir format more which
+ clear help run_history who
+ diary history save whos
+ dir hold set
+
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_36.html octave-2.0.14/doc/interpreter/octave_36.html
*** octave-2.0.13/doc/interpreter/octave_36.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_36.html Fri Oct 9 00:32:21 1998
***************
*** 0 ****
--- 1,460 ----
+
+
+
+
+ GNU Octave - GNU GENERAL PUBLIC LICENSE
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+ Version 2, June 1991
+
+
+
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+
+
+
+
+
+ The licenses for most software are designed to take away your
+ freedom to share and change it. By contrast, the GNU General Public
+ License is intended to guarantee your freedom to share and change free
+ software--to make sure the software is free for all its users. This
+ General Public License applies to most of the Free Software
+ Foundation's software and to any other program whose authors commit to
+ using it. (Some other Free Software Foundation software is covered by
+ the GNU Library General Public License instead.) You can apply it to
+ your programs, too.
+
+
+
+ When we speak of free software, we are referring to freedom, not
+ price. Our General Public Licenses are designed to make sure that you
+ have the freedom to distribute copies of free software (and charge for
+ this service if you wish), that you receive source code or can get it
+ if you want it, that you can change the software or use pieces of it
+ in new free programs; and that you know you can do these things.
+
+
+
+ To protect your rights, we need to make restrictions that forbid
+ anyone to deny you these rights or to ask you to surrender the rights.
+ These restrictions translate to certain responsibilities for you if you
+ distribute copies of the software, or if you modify it.
+
+
+
+ For example, if you distribute copies of such a program, whether
+ gratis or for a fee, you must give the recipients all the rights that
+ you have. You must make sure that they, too, receive or can get the
+ source code. And you must show them these terms so they know their
+ rights.
+
+
+
+ We protect your rights with two steps: (1) copyright the software, and
+ (2) offer you this license which gives you legal permission to copy,
+ distribute and/or modify the software.
+
+
+
+ Also, for each author's protection and ours, we want to make certain
+ that everyone understands that there is no warranty for this free
+ software. If the software is modified by someone else and passed on, we
+ want its recipients to know that what they have is not the original, so
+ that any problems introduced by others will not reflect on the original
+ authors' reputations.
+
+
+
+ Finally, any free program is threatened constantly by software
+ patents. We wish to avoid the danger that redistributors of a free
+ program will individually obtain patent licenses, in effect making the
+ program proprietary. To prevent this, we have made it clear that any
+ patent must be licensed for everyone's free use or not licensed at all.
+
+
+
+ The precise terms and conditions for copying, distribution and
+ modification follow.
+
+
+
+
+
+
+
+
+ -
+
+ This License applies to any program or other work which contains
+ a notice placed by the copyright holder saying it may be distributed
+ under the terms of this General Public License. The "Program", below,
+ refers to any such program or work, and a "work based on the Program"
+ means either the Program or any derivative work under copyright law:
+ that is to say, a work containing the Program or a portion of it,
+ either verbatim or with modifications and/or translated into another
+ language. (Hereinafter, translation is included without limitation in
+ the term "modification".) Each licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope. The act of
+ running the Program is not restricted, and the output from the Program
+ is covered only if its contents constitute a work based on the
+ Program (independent of having been made by running the Program).
+ Whether that is true depends on what the Program does.
+
+
-
+
+ You may copy and distribute verbatim copies of the Program's
+ source code as you receive it, in any medium, provided that you
+ conspicuously and appropriately publish on each copy an appropriate
+ copyright notice and disclaimer of warranty; keep intact all the
+ notices that refer to this License and to the absence of any warranty;
+ and give any other recipients of the Program a copy of this License
+ along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and
+ you may at your option offer warranty protection in exchange for a fee.
+
+
-
+
+ You may modify your copy or copies of the Program or any portion
+ of it, thus forming a work based on the Program, and copy and
+ distribute such modifications or work under the terms of Section 1
+ above, provided that you also meet all of these conditions:
+
+
+
+ -
+
+ You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+
-
+
+ You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+
-
+
+ If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the Program,
+ and can be reasonably considered independent and separate works in
+ themselves, then this License, and its terms, do not apply to those
+ sections when you distribute them as separate works. But when you
+ distribute the same sections as part of a whole which is a work based
+ on the Program, the distribution of the whole must be on the terms of
+ this License, whose permissions for other licensees extend to the
+ entire whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the Program
+ with the Program (or with a work based on the Program) on a volume of
+ a storage or distribution medium does not bring the other work under
+ the scope of this License.
+
+ -
+
+ You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms of
+ Sections 1 and 2 above provided that you also do one of the following:
+
+
+
+ -
+
+ Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+
-
+
+ Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+
-
+
+ Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+
+ The source code for a work means the preferred form of the work for
+ making modifications to it. For an executable work, complete source
+ code means all the source code for all modules it contains, plus any
+ associated interface definition files, plus the scripts used to
+ control compilation and installation of the executable. However, as a
+ special exception, the source code distributed need not include
+ anything that is normally distributed (in either source or binary
+ form) with the major components (compiler, kernel, and so on) of the
+ operating system on which the executable runs, unless that component
+ itself accompanies the executable.
+
+ If distribution of executable or object code is made by offering
+ access to copy from a designated place, then offering equivalent
+ access to copy the source code from the same place counts as
+ distribution of the source code, even though third parties are not
+ compelled to copy the source along with the object code.
+
+ -
+
+ You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License. Any attempt
+ otherwise to copy, modify, sublicense or distribute the Program is
+ void, and will automatically terminate your rights under this License.
+ However, parties who have received copies, or rights, from you under
+ this License will not have their licenses terminated so long as such
+ parties remain in full compliance.
+
+
-
+
+ You are not required to accept this License, since you have not
+ signed it. However, nothing else grants you permission to modify or
+ distribute the Program or its derivative works. These actions are
+ prohibited by law if you do not accept this License. Therefore, by
+ modifying or distributing the Program (or any work based on the
+ Program), you indicate your acceptance of this License to do so, and
+ all its terms and conditions for copying, distributing or modifying
+ the Program or works based on it.
+
+
-
+
+ Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject to
+ these terms and conditions. You may not impose any further
+ restrictions on the recipients' exercise of the rights granted herein.
+ You are not responsible for enforcing compliance by third parties to
+ this License.
+
+
-
+
+ If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot
+ distribute so as to satisfy simultaneously your obligations under this
+ License and any other pertinent obligations, then as a consequence you
+ may not distribute the Program at all. For example, if a patent
+ license would not permit royalty-free redistribution of the Program by
+ all those who receive copies directly or indirectly through you, then
+ the only way you could satisfy both it and this License would be to
+ refrain entirely from distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under
+ any particular circumstance, the balance of the section is intended to
+ apply and the section as a whole is intended to apply in other
+ circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system, which is
+ implemented by public license practices. Many people have made
+ generous contributions to the wide range of software distributed
+ through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is willing
+ to distribute software through any other system and a licensee cannot
+ impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to
+ be a consequence of the rest of this License.
+
+
-
+
+ If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Program under this License
+ may add an explicit geographical distribution limitation excluding
+ those countries, so that distribution is permitted only in or among
+ countries not thus excluded. In such case, this License incorporates
+ the limitation as if written in the body of this License.
+
+
-
+
+ The Free Software Foundation may publish revised and/or new versions
+ of the General Public License from time to time. Such new versions will
+ be similar in spirit to the present version, but may differ in detail to
+ address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Program
+ specifies a version number of this License which applies to it and "any
+ later version", you have the option of following the terms and conditions
+ either of that version or of any later version published by the Free
+ Software Foundation. If the Program does not specify a version number of
+ this License, you may choose any version ever published by the Free Software
+ Foundation.
+
+
-
+
+ If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the author
+ to ask for permission. For software which is copyrighted by the Free
+ Software Foundation, write to the Free Software Foundation; we sometimes
+ make exceptions for this. Our decision will be guided by the two goals
+ of preserving the free status of all derivatives of our free software and
+ of promoting the sharing and reuse of software generally.
+
+
+
+
NO WARRANTY
+
+ -
+
+ BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+ REPAIR OR CORRECTION.
+
+
-
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES.
+
+
+
+ END OF TERMS AND CONDITIONS
+
+
+
+
+
+
+ If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.
+
+
+
+ To do so, attach the following notices to the program. It is safest
+ to attach them to the start of each source file to most effectively
+ convey the exclusion of warranty; and each file should have at least
+ the "copyright" line and a pointer to where the full notice is found.
+
+
+
+
+ one line to give the program's name and a brief idea of what it does.
+ Copyright (C) 19yy name of author
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+
+
+
+ Also add information on how to contact you by electronic and paper mail.
+
+
+
+ If the program is interactive, make it output a short notice like this
+ when it starts in an interactive mode:
+
+
+
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
+ type `show w'. This is free software, and you are welcome
+ to redistribute it under certain conditions; type `show c'
+ for details.
+
+
+
+ The hypothetical commands `show w' and `show c' should show
+ the appropriate parts of the General Public License. Of course, the
+ commands you use may be called something other than `show w' and
+ `show c'; they could even be mouse-clicks or menu items--whatever
+ suits your program.
+
+
+
+ You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a "copyright disclaimer" for the program, if
+ necessary. Here is a sample; alter the names:
+
+
+
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ signature of Ty Coon, 1 April 1989
+ Ty Coon, President of Vice
+
+
+
+ This General Public License does not permit incorporating your program into
+ proprietary programs. If your program is a subroutine library, you may
+ consider it more useful to permit linking proprietary applications with the
+ library. If this is what you want to do, use the GNU Library General
+ Public License instead of this License.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_37.html octave-2.0.14/doc/interpreter/octave_37.html
*** octave-2.0.13/doc/interpreter/octave_37.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_37.html Fri Oct 9 00:32:21 1998
***************
*** 0 ****
--- 1,386 ----
+
+
+
+
+ GNU Octave - Concept Index
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
#
+
+ `#'
+ `#!'
+
+ %
+
+ `%'
+
+ -
+
+ --braindead
+ --debug
+ --echo-commands
+ --exec-path path
+ --help
+ --info-file filename
+ --info-program program
+ --interactive
+ --no-init-file
+ --no-line-editing
+ --no-site-file
+ --norc
+ --path path
+ --quiet
+ --silent
+ --traditional
+ --verbose
+ --version
+ -?
+ -d
+ -f
+ -h
+ -i
+ -p path
+ -q
+ -V
+ -v
+ -x
+
+ .
+
+ ...
, ...
+ ...
continuation marker
+ .octaverc
+
+ \
+
+ \
continuation marker
+
+ a
+
+ acknowledgements
+ addition
+ and operator
+ answers, incorrect, answers, incorrect
+ any key
+ arguments in function call
+ arithmetic operators
+ assignment expressions
+ assignment operators
+
+ b
+
+ body of a loop
+ boolean expressions
+ boolean operators
+ break
statement
+ bug criteria
+ bug report mailing lists
+ bugs
+ bugs, investigating
+ bugs, known
+ bugs, reporting, bugs, reporting
+ built-in data types
+ built-in function
+
+ c
+
+ case
statement
+ catch
+ character strings, character strings
+ Cholesky factorization
+ clearing the screen
+ coding standards
+ command and ouput logs
+ command completion
+ command descriptions
+ command echoing
+ command history
+ command options
+ command-line editing
+ comments
+ comparison expressions
+ complex-conjugate transpose
+ continuation lines
+ continue
statement
+ contributing to Octave
+ contributors
+ conversion specifications (printf
)
+ conversion specifications (scanf
)
+ copyright
+ core dump
+ customizing the prompt
+
+ d
+
+ DAE
+ data structures, data structures
+ data types
+ data types, built-in
+ data types, user-defined
+ decrement operator
+ defining functions
+ description format
+ diary of commands and output
+ Differential Equations
+ diffs, submitting
+ distribution of Octave
+ division
+ documentation notation
+ documenting Octave programs
+ dynamic linking
+
+ e
+
+ echoing executing commands
+ editing the command line
+ element-by-element evaluation
+ else
statement
+ elseif
statement
+ end
statement
+ end_try_catch
+ end_unwind_protect
+ endfor
statement
+ endfunction
statement
+ endif
statement
+ endswitch
statement
+ endwhile
statement
+ equality operator
+ equality, tests for
+ equations, nonlinear
+ erroneous messages
+ erroneous results, erroneous results
+ error message notation
+ error messages
+ error messages, incorrect
+ escape sequence notation
+ evaluation notation
+ executable scripts
+ execution speed
+ exiting octave, exiting octave
+ exponentiation
+ expression, range
+ expressions
+ expressions, assignment
+ expressions, boolean
+ expressions, comparison
+ expressions, logical
+
+ f
+
+ factorial function
+ fatal signal
+ flag character (printf
)
+ flag character (scanf
)
+ flying high and fast
+ fonts
+ for
statement
+ Fordyce, A. P.
+ Frobenius norm
+ function descriptions
+ function file, function file
+ function
statement
+ functions, user-defined
+ funding Octave development
+
+ g
+
+ getting a good job
+ global
statement
+ global variables
+ grammar rules
+ graphics
+ greater than operator
+
+ h
+
+ header comments
+ help, on-line
+ help, where to find
+ Hermitian operator
+ Hessenberg decomposition
+ history
+ history of commands
+
+ i
+
+ if
statement
+ improving Octave, improving Octave
+ incorrect error messages
+ incorrect output, incorrect output
+ incorrect results, incorrect results
+ increment operator
+ infinity norm
+ initialization
+ input conversions, for scanf
+ input history
+ installation trouble
+ installing Octave
+ introduction
+ invalid input
+
+ j
+
+ job hunting
+
+ k
+
+ keywords
+ known causes of trouble
+
+ l
+
+ language definition
+ less than operator
+ loadable function
+ logging commands and output
+ logical expressions
+ logical operators
+ loop
+ looping over structure elements
+ LP
+ LU decomposition
+ lvalue
+
+ m
+
+ mapping function
+ matching failure, in scanf
+ matrices
+ matrix multiplication
+ maximum field width (scanf
)
+ messages, error
+ minimum field width (printf
)
+ multiplication
+
+ n
+
+ negation
+ NLP
+ nonlinear equations
+ nonlinear programming
+ not operator
+ numeric constant, numeric constant
+ numeric value, numeric value
+
+ o
+
+ Octave command options
+ ODE
+ on-line help
+ operator precedence
+ operators, arithmetic
+ operators, assignment
+ operators, boolean
+ operators, decrement
+ operators, increment
+ operators, logical
+ operators, relational
+ optimization
+ options, Octave command
+ or operator
+ oregonator
+ otherwise
statement
+ output conversions, for printf
+
+ p
+
+ partial fraction expansion
+ patches, submitting
+ plotting
+ precision (printf
)
+ printing notation
+ program, self contained
+ programs
+ prompt customization
+
+ q
+
+ QP
+ QR factorization
+ quadratic programming
+ quitting octave, quitting octave
+ quotient
+
+ r
+
+ range expressions
+ relational operators
+ reporting bugs, reporting bugs
+ results, incorrect, results, incorrect
+
+ s
+
+ Schur decomposition
+ script files
+ scripts
+ self contained programs
+ short-circuit evaluation
+ side effect
+ singular value decomposition
+ speedups
+ standards of coding style
+ startup
+ startup files
+ statements
+ strings, strings
+ structure elements, looping over
+ structures, structures
+ submitting diffs
+ submitting patches
+ subtraction
+ suggestions
+ switch
statement
+
+ t
+
+ tests for equality
+ tips
+ transpose
+ transpose, complex-conjugate
+ troubleshooting
+ try
statement
+
+ u
+
+ unary minus
+ undefined behavior
+ undefined function value
+ unwind_protect
statement
+ unwind_protect_cleanup
+ use of comments
+ user-defined data types
+ user-defined functions
+ user-defined variables
+
+ v
+
+ variable descriptions
+ Variable-length argument lists
+ Variable-length return lists
+ variables, global
+ variables, user-defined
+
+ w
+
+ warranty
+ while
statement
+ wrong answers, wrong answers
+
+ ~
+
+ ~/.octaverc
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_38.html octave-2.0.14/doc/interpreter/octave_38.html
*** octave-2.0.13/doc/interpreter/octave_38.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_38.html Fri Oct 9 00:32:21 1998
***************
*** 0 ****
--- 1,191 ----
+
+
+
+
+ GNU Octave - Variable Index
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+ , ,
+
+ a
+
+ all_va_args
+ ans
+ argv
+ auto_unload_dot_oct_files, auto_unload_dot_oct_files
+ automatic_replot, automatic_replot
+
+ b
+
+ beep_on_error, beep_on_error
+
+ c
+
+ completion_append_char, completion_append_char
+
+ d
+
+ default_eval_print_flag, default_eval_print_flag
+ default_return_value, default_return_value
+ default_save_format, default_save_format
+ define_all_return_values, define_all_return_values
+ do_fortran_indexing, do_fortran_indexing
+ do_what_i_mean_not_what_i_say
+
+ e
+
+ e
+ echo_executing_commands
+ EDITOR, EDITOR, EDITOR
+ empty_list_elements_ok, empty_list_elements_ok
+ eps
+ error_text
+ EXEC_PATH, EXEC_PATH
+
+ f
+
+ F_DUPFD
+ F_GETFD
+ F_GETFL
+ F_SETFD
+ F_SETFL
+ fixed_point_format, fixed_point_format
+
+ g
+
+ gnuplot_binary, gnuplot_binary
+ gnuplot_has_frames
+ gnuplot_has_multiplot
+
+ h
+
+ history_file, history_file
+ history_size, history_size
+
+ i
+
+ I
+ i
+ ignore_function_time_stamp, ignore_function_time_stamp
+ IMAGEPATH
+ implicit_num_to_str_ok, implicit_num_to_str_ok
+ implicit_str_to_num_ok, implicit_str_to_num_ok
+ Inf
+ inf
+ INFO_FILE, INFO_FILE
+ INFO_PROGRAM, INFO_PROGRAM
+
+ j
+
+ J
+ j
+
+ l
+
+ LOADPATH, LOADPATH
+
+ m
+
+ max_recursion_depth
+
+ n
+
+ NaN
+ nan
+ nargin
+ nargout
+
+ o
+
+ O_APPEND
+ O_ASYNC
+ O_NONBLOCK
+ O_RDONLY
+ O_RDWR
+ O_SYNC
+ O_WRONLY
+ OCTAVE_EXEC_PATH
+ OCTAVE_HISTFILE
+ OCTAVE_HISTSIZE
+ OCTAVE_HOME
+ OCTAVE_INFO_FILE
+ OCTAVE_INFO_PROGRAM
+ OCTAVE_PATH
+ OCTAVE_VERSION
+ ok_to_lose_imaginary_part
+ output_max_field_width, output_max_field_width
+ output_precision, output_precision
+
+ p
+
+ page_output_immediately
+ page_screen_output, page_screen_output
+ PAGER, PAGER
+ pi
+ prefer_column_vectors, prefer_column_vectors
+ prefer_zero_one_indexing
+ print_answer_id_name, print_answer_id_name
+ print_empty_dimensions, print_empty_dimensions
+ program_invocation_name
+ program_name
+ propagate_empty_matrices
+ PS1, PS1
+ PS2, PS2
+ PS4, PS4
+ PWD
+
+ r
+
+ realmax
+ realmin
+ resize_on_range_error, resize_on_range_error
+ return
+ return_last_computed_value, return_last_computed_value
+
+ s
+
+ save_precision, save_precision
+ saving_history, saving_history
+ SEEK_CUR
+ SEEK_END
+ SEEK_SET
+ silent_functions, silent_functions
+ split_long_rows, split_long_rows
+ stderr
+ stdin
+ stdout
+ string_fill_char
+ struct_levels_to_print, struct_levels_to_print
+ suppress_verbose_help_message, suppress_verbose_help_message
+
+ t
+
+ treat_neg_dim_as_zero, treat_neg_dim_as_zero
+
+ w
+
+ warn_assign_as_truth_value, warn_assign_as_truth_value
+ warn_comma_in_global_decl, warn_comma_in_global_decl
+ warn_divide_by_zero, warn_divide_by_zero
+ warn_function_name_clash, warn_function_name_clash
+ warn_missing_semicolon
+ warn_reload_forces_clear, warn_reload_forces_clear
+ warn_variable_switch_label, warn_variable_switch_label
+ whitespace_in_literal_matrix, whitespace_in_literal_matrix
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_39.html octave-2.0.14/doc/interpreter/octave_39.html
*** octave-2.0.13/doc/interpreter/octave_39.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_39.html Fri Oct 9 00:32:21 1998
***************
*** 0 ****
--- 1,529 ----
+
+
+
+
+ GNU Octave - Function Index
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
a
+
+ abcddim
+ abs
+ acos
+ acosh
+ acot
+ acoth
+ acsc
+ acsch
+ all
+ angle
+ any
+ are
+ arg
+ asctime
+ asec
+ asech
+ asin
+ asinh
+ atan
+ atan2
+ atanh
+ atexit
+ axis
+
+ b
+
+ balance, balance, balance
+ bar
+ besseli
+ besselj
+ besselk
+ bessely
+ beta
+ betai
+ bin2dec
+ bincoeff
+ blanks
+ bottom_title
+ bug_report, bug_report
+
+ c
+
+ c2d
+ cd, cd
+ ceil
+ chdir, chdir
+ chol
+ clc
+ clear
+ clearplot
+ clg
+ clock
+ closeplot
+ colloc
+ colormap, colormap
+ columns
+ common_size
+ commutation_matrix
+ compan
+ complement
+ completion_matches
+ computer
+ cond
+ conj
+ contour
+ conv
+ corrcoef
+ cos
+ cosh
+ cot
+ coth
+ cov
+ cputime
+ create_set
+ cross
+ csc
+ csch
+ ctime
+ cumprod
+ cumsum
+
+ d
+
+ dare
+ dassl
+ dassl_options
+ date
+ deblank
+ dec2bin
+ dec2hex
+ deconv
+ det
+ detrend
+ dgram
+ diag
+ diary
+ diff
+ dir
+ disp
+ dlqe
+ dlqr
+ dlyap
+ document
+ dup2
+ duplication_matrix
+
+ e
+
+ echo
+ edit_history
+ eig, eig
+ endgrent
+ endpwent
+ erf
+ erfc
+ erfinv
+ error
+ etime
+ eval
+ exec
+ exist
+ exit
+ exp
+ expm
+ eye, eye
+
+ f
+
+ fclose
+ fcntl
+ feof
+ ferror
+ feval
+ fflush
+ fft
+ fft2
+ fftconv
+ fftfilt
+ fgetl
+ fgets
+ figure
+ file_in_path
+ filter, filter
+ find
+ findstr
+ finite
+ fix
+ fliplr
+ flipud
+ floor
+ fnmatch
+ foo
+ fopen, fopen, fopen
+ fork
+ format
+ fprintf
+ fputs
+ fread
+ freport
+ freqz
+ frewind
+ fscanf, fscanf
+ fseek
+ fsolve
+ fsolve_options
+ ftell
+ fwrite
+
+ g
+
+ gamma
+ gammai
+ gammaln
+ gcd
+ getegid
+ getenv
+ geteuid
+ getgid
+ getgrent
+ getgrgid
+ getgrnam
+ getpgrp
+ getpid
+ getppid
+ getpwent
+ getpwnam
+ getpwuid
+ getrusage
+ getuid
+ givens, givens
+ glob
+ gls
+ gmtime
+ gplot
+ gray
+ gray2ind
+ grid
+ gset
+ gshow
+ gsplot
+
+ h
+
+ hankel
+ help
+ hess, hess
+ hex2dec
+ hilb
+ hist
+ history
+ hold
+ home
+
+ i
+
+ ifft
+ ifft2
+ imag
+ image
+ imagesc
+ imshow, imshow, imshow, imshow
+ ind2gray
+ ind2rgb
+ index
+ input, input
+ int2str
+ intersection
+ inv
+ inverse
+ invhilb
+ is_controllable
+ is_global
+ is_leap_year
+ is_matrix
+ is_observable
+ is_scalar
+ is_square
+ is_struct
+ is_symmetric
+ is_vector
+ isalnum
+ isalpha
+ isascii
+ iscntrl
+ isdigit
+ isempty
+ isgraph
+ ishold
+ isieee
+ isinf
+ islower
+ isnan
+ isprint
+ ispunct
+ isspace
+ isstr
+ isupper
+ isxdigit
+
+ k
+
+ kbhit
+ keyboard
+ kron
+ kurtosis
+
+ l
+
+ lcm
+ length
+ lgamma
+ lin2mu
+ linspace
+ load
+ loadaudio
+ loadimage
+ localtime
+ log
+ log10
+ log2, log2
+ loglog
+ logm
+ logspace
+ lqe
+ lqr
+ ls
+ lsode
+ lsode_options
+ lstat
+ lu
+ lyap
+
+ m
+
+ mahalanobis
+ max
+ mean
+ median
+ menu
+ mesh
+ meshdom
+ min
+ mkdir
+ mkfifo
+ mktime
+ more, more, more
+ mplot, mplot, mplot
+ mu2lin
+ multiplot
+
+ n
+
+ nargchk
+ newtroot
+ nextpow2
+ norm
+ ntsc2rgb
+ null
+ num2str
+
+ o
+
+ ocean
+ octave_config_info
+ ols
+ oneplot
+ ones, ones
+ orth
+
+ p
+
+ pause
+ pclose
+ perror
+ pinv
+ pipe
+ playaudio, playaudio
+ plot
+ plot_border
+ polar
+ poly
+ polyderiv
+ polyfit
+ polyinteg
+ polyreduce
+ polyval
+ polyvalm
+ popen
+ popen2
+ pow2, pow2
+ printf
+ prod
+ purge_tmp_files
+ putenv
+ puts
+ pwd
+
+ q
+
+ qr
+ quad
+ quad_options
+ quit
+ qzhess
+ qzval
+
+ r
+
+ rand, rand, rand
+ randn, randn, randn
+ rank
+ readdir
+ real
+ record
+ rem
+ rename
+ replot
+ reshape
+ residue
+ rgb2ind
+ rgb2ntsc
+ rindex
+ rmdir
+ roots
+ rot90
+ round
+ rows
+ run_history
+
+ s
+
+ save
+ saveaudio
+ saveimage
+ scanf, scanf
+ schur, schur
+ sec
+ sech
+ semilogx
+ semilogy
+ set
+ setaudio, setaudio
+ setgrent
+ setpwent
+ setstr
+ shg
+ shift
+ show
+ sign
+ sin
+ sinc
+ sinh
+ size
+ skewness
+ sleep
+ sort
+ source
+ split
+ sprintf
+ sqrt
+ sqrtm
+ sscanf, sscanf
+ stairs
+ stat
+ std
+ str2mat
+ str2num
+ strcat
+ strcmp
+ strerror
+ strftime
+ strrep
+ struct_contains
+ struct_elements
+ subplot, subplot
+ substr
+ subwindow
+ sum
+ sumsq
+ svd, svd
+ syl
+ sylvester_matrix
+ system
+
+ t
+
+ tan
+ tanh
+ tic
+ tilde_expand
+ time
+ title
+ tmpnam
+ toascii
+ toc
+ toeplitz
+ tolower
+ top_title
+ toupper
+ trace
+ tril
+ triu
+ type
+ tzero
+
+ u
+
+ umask
+ undo_string_escapes
+ union
+ unlink
+ usage
+ usleep
+
+ v
+
+ va_arg
+ va_start
+ vander
+ vec
+ vech
+ version
+ vr_val
+
+ w
+
+ waitpid
+ warning
+ which
+ who
+ whos
+
+ x
+
+ xlabel
+ xor
+
+ y
+
+ ylabel
+
+ z
+
+ zeros, zeros
+ zlabel
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_4.html octave-2.0.14/doc/interpreter/octave_4.html
*** octave-2.0.13/doc/interpreter/octave_4.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_4.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,226 ----
+
+
+
+
+ GNU Octave - Data Types
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+ All versions of Octave include a number of built-in data types,
+ including real and complex scalars and matrices, character strings, and
+ a data structure type.
+
+
+
+ It is also possible to define new specialized data types by writing a
+ small amount of C++ code. On some systems, new data types can be loaded
+ dynamically while Octave is running, so it is not necessary to recompile
+ all of Octave just to add a new type. See section Dynamically Linked Functions for more information about Octave's dynamic linking
+ capabilities. section User-defined Data Types describes what you must do
+ to define a new data type for Octave.
+
+
+
+
+
+
+
+
+
+
+
+
+ The standard built-in data types are real and complex scalars and
+ matrices, ranges, character strings, and a data structure type.
+ Additional built-in data types may be added in future versions. If you
+ need a specialized data type that is not currently provided as a
+ built-in type, you are encouraged to write your own user-defined data
+ type and contribute it for distribution in a future release of Octave.
+
+
+
+
+
+
+
+
+
+
+
+
+ Octave's built-in numeric objects include real and complex scalars and
+ matrices. All built-in numeric data is currently stored as double
+ precision numbers. On systems that use the IEEE floating point format,
+ values in the range of approximately
+ can be stored, and the relative precision is approximately
+ The exact values are given by the variables realmin
,
+ realmax
, and eps
, respectively.
+
+
+
+ Matrix objects can be of any size, and can be dynamically reshaped and
+ resized. It is easy to extract individual rows, columns, or submatrices
+ is using a variety of powerful indexing features. See section Index Expressions.
+
+
+
+ See section Numeric Data Types, for more information.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A character string in Octave consists of a sequence of characters
+ enclosed in either double-quote or single-quote marks. Internally,
+ Octave currently stores strings as matrices of characters. All the
+ indexing operations that work for matrix objects also work for strings.
+
+
+
+ See section Strings, for more information.
+
+
+
+
+
+
+
+
+
+
+
+ Octave's data structure type can help you to organize related objects of
+ different types. The current implementation uses an associative array
+ with indices limited to strings, but the syntax is more like C-style
+ structures.
+
+
+
+ See section Data Structures, for more information.
+
+
+
+
+
+
+
+
+
+
+
+ Someday I hope to expand this to include a complete description of
+ Octave's mechanism for managing user-defined data types. Until this
+ feature is documented here, you will have to make do by reading the code
+ in the `ov.h', `ops.h', and related files from Octave's
+ `src' directory.
+
+
+
+
+
+
+
+ The following functions allow you to determine the size of a variable or
+ expression. These functions are defined for all objects. They return
+ -1 when the operation doesn't make sense. For example, Octave's
+ data structure type doesn't have rows or columns, so the rows
and
+ columns
functions return -1 for structure arguments.
+
+
+
+
+ - Function File: columns (a)
+
-
+ Return the number of columns of a.
+
+
+
+
+
+ - Function File: rows (a)
+
-
+ Return the number of rows of a.
+
+
+
+
+
+ - Function File: length (a)
+
-
+ Return the number of rows of a or the number of columns of
+ a, whichever is larger.
+
+
+
+
+
+ - Function File: size (a, n)
+
-
+ Return the number rows and columns of a.
+
+
+
+ With one input argument and one output argument, the result is returned
+ in a 2 element row vector. If there are two output arguments, the
+ number of rows is assigned to the first, and the number of columns to
+ the second. For example,
+
+
+
+
+ size ([1, 2; 3, 4; 5, 6])
+ => [ 3, 2 ]
+
+ [nr, nc] = size ([1, 2; 3, 4; 5, 6])
+ => nr = 3
+ => nc = 2
+
+
+
+ If given a second argument of either 1 or 2, size
will return
+ only the row or column dimension. For example
+
+
+
+
+ size ([1, 2; 3, 4; 5, 6], 2)
+ => 2
+
+
+
+ returns the number of columns in the given matrix.
+
+
+
+
+
+ - Function File: isempty (a)
+
-
+ Return 1 if a is an empty matrix (either the number of rows, or
+ the number of columns, or both are zero). Otherwise, return 0.
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_40.html octave-2.0.14/doc/interpreter/octave_40.html
*** octave-2.0.13/doc/interpreter/octave_40.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_40.html Fri Oct 9 00:32:21 1998
***************
*** 0 ****
--- 1,131 ----
+
+
+
+
+ GNU Octave - Operator Index
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
!
+
+ !
+ !=
+
+ "
+
+ ", "
+
+ &
+
+ &
+ &&
+
+ '
+
+ ', ', '
+
+ (
+
+ (
+
+ )
+
+ )
+
+ *
+
+ *
+ **
+
+ +
+
+ +, +
+ ++, ++
+
+ ,
+
+ ,
+
+ -
+
+ -, -
+ --
, --
+
+ .
+
+ .'
+ .*
+ .**
+ .+
+ ./
+ .\
+ .^
+
+ /
+
+ /
+
+ :
+
+ :
+
+ ;
+
+ ;
+
+ <
+
+ <
+ <=
+ <>
+
+ =
+
+ =
+ ==
+
+ >
+
+ >
+ >=
+
+ [
+
+ [
+
+ \
+
+ \
+
+ ]
+
+ ]
+
+ ^
+
+ ^
+
+ |
+
+ |
+ ||
+
+ ~
+
+ ~
+ ~=
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_5.html octave-2.0.14/doc/interpreter/octave_5.html
*** octave-2.0.13/doc/interpreter/octave_5.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_5.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,683 ----
+
+
+
+
+ GNU Octave - Numeric Data Types
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ A numeric constant may be a scalar, a vector, or a matrix, and it
+ may contain complex values.
+
+
+
+ The simplest form of a numeric constant, a scalar, is a single number
+ that can be an integer, a decimal fraction, a number in scientific
+ (exponential) notation, or a complex number. Note that all numeric
+ constants are represented within Octave in double-precision floating
+ point format (complex constants are stored as pairs of double-precision
+ floating point values). Here are some examples of real-valued numeric
+ constants, which all have the same value:
+
+
+
+
+ 105
+ 1.05e+2
+ 1050e-1
+
+
+
+ To specify complex constants, you can write an expression of the form
+
+
+
+
+ 3 + 4i
+ 3.0 + 4.0i
+ 0.3e1 + 40e-1i
+
+
+
+ all of which are equivalent. The letter `i' in the previous example
+ stands for the pure imaginary constant, defined as
+
+
+
+ For Octave to recognize a value as the imaginary part of a complex
+ constant, a space must not appear between the number and the `i'.
+ If it does, Octave will print an error message, like this:
+
+
+
+
+ octave:13> 3 + 4 i
+
+ parse error:
+
+ 3 + 4 i
+ ^
+
+
+
+ You may also use `j', `I', or `J' in place of the
+ `i' above. All four forms are equivalent.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ It is easy to define a matrix of values in Octave. The size of the
+ matrix is determined automatically, so it is not necessary to explicitly
+ state the dimensions. The expression
+
+
+
+
+ a = [1, 2; 3, 4]
+
+
+
+ results in the matrix
+
+
+
+ Elements of a matrix may be arbitrary expressions, provided that the
+ dimensions all make sense when combining the various pieces. For
+ example, given the above matrix, the expression
+
+
+
+
+ [ a, a ]
+
+
+
+ produces the matrix
+
+
+
+
+ ans =
+
+ 1 2 1 2
+ 3 4 3 4
+
+
+
+ but the expression
+
+
+
+
+ [ a, 1 ]
+
+
+
+ produces the error
+
+
+
+
+ error: number of rows must match near line 13, column 6
+
+
+
+ (assuming that this expression was entered as the first thing on line
+ 13, of course).
+
+
+
+ Inside the square brackets that delimit a matrix expression, Octave
+ looks at the surrounding context to determine whether spaces and newline
+ characters should be converted into element and row separators, or
+ simply ignored, so commands like
+
+
+
+
+ [ linspace (1, 2) ]
+
+
+
+ and
+
+
+
+
+ a = [ 1 2
+ 3 4 ]
+
+
+
+ will work. However, some possible sources of confusion remain. For
+ example, in the expression
+
+
+
+
+ [ 1 - 1 ]
+
+
+
+ the `-' is treated as a binary operator and the result is the
+ scalar 0, but in the expression
+
+
+
+
+ [ 1 -1 ]
+
+
+
+ the `-' is treated as a unary operator and the result is the
+ vector [ 1, -1 ]
.
+
+
+
+ Given a = 1
, the expression
+
+
+
+
+ [ 1 a' ]
+
+
+
+ results in the single quote character `'' being treated as a
+ transpose operator and the result is the vector [ 1, 1 ]
, but the
+ expression
+
+
+
+
+ [ 1 a ' ]
+
+
+
+ produces the error message
+
+
+
+
+ error: unterminated string constant
+
+
+
+ because to not do so would make it impossible to correctly parse the
+ valid expression
+
+
+
+
+ [ a 'foo' ]
+
+
+
+ For clarity, it is probably best to always use commas and semicolons to
+ separate matrix elements and rows. It is possible to enforce this style
+ by setting the built-in variable whitespace_in_literal_matrix
to
+ "ignore"
.
+
+
+
+
+ - Built-in Variable: whitespace_in_literal_matrix
+
-
+ This variable allows some control over how Octave decides to convert
+ spaces to commas and semicolons in matrix expressions like
+
[m (1)]
or
+
+
+
+
+ [ 1, 2,
+ 3, 4 ]
+
+
+
+ If the value of whitespace_in_literal_matrix
is "ignore"
,
+ Octave will never insert a comma or a semicolon in a literal matrix
+ list. For example, the expression [1 2]
will result in an error
+ instead of being treated the same as [1, 2]
, and the expression
+
+
+
+
+ [ 1, 2,
+ 3, 4 ]
+
+
+
+ will result in the vector [ 1, 2, 3, 4 ]
instead of a matrix.
+
+
+
+ If the value of whitespace_in_literal_matrix
is "traditional"
,
+ Octave will convert spaces to a comma between identifiers and `('. For
+ example, given the matrix
+
+
+
+
+ m = [3 2]
+
+
+
+ the expression
+
+
+
+
+ [m (1)]
+
+
+
+ will be parsed as
+
+
+
+
+ [m, (1)]
+
+
+
+ and will result in
+
+
+
+
+ [3 2 1]
+
+
+
+ and the expression
+
+
+
+
+ [ 1, 2,
+ 3, 4 ]
+
+
+
+ will result in a matrix because the newline character is converted to a
+ semicolon (row separator) even though there is a comma at the end of the
+ first line (trailing commas or semicolons are ignored). This is
+ apparently how MATLAB behaves.
+
+
+
+ Any other value for whitespace_in_literal_matrix
results in behavior
+ that is the same as traditional, except that Octave does not
+ convert spaces to a comma between identifiers and `('. For
+ example, the expression
+
+
+
+
+ [m (1)]
+
+
+
+ will produce `3'. This is the way Octave has always behaved.
+
+
+
+
+ When you type a matrix or the name of a variable whose value is a
+ matrix, Octave responds by printing the matrix in with neatly aligned
+ rows and columns. If the rows of the matrix are too large to fit on the
+ screen, Octave splits the matrix and displays a header before each
+ section to indicate which columns are being displayed. You can use the
+ following variables to control the format of the output.
+
+
+
+
+ - Built-in Variable: output_max_field_width
+
-
+ This variable specifies the maximum width of a numeric output field.
+ The default value is 10.
+
+
+
+
+
+ - Built-in Variable: output_precision
+
-
+ This variable specifies the minimum number of significant figures to
+ display for numeric output. The default value is 5.
+
+
+
+
+ It is possible to achieve a wide range of output styles by using
+ different values of output_precision
and
+ output_max_field_width
. Reasonable combinations can be set using
+ the format
function. See section Basic Input and Output.
+
+
+
+
+ - Built-in Variable: split_long_rows
+
-
+ For large matrices, Octave may not be able to display all the columns of
+ a given row on one line of your screen. This can result in missing
+ information or output that is nearly impossible to decipher, depending
+ on whether your terminal truncates or wraps long lines.
+
+
+
+ If the value of split_long_rows
is nonzero, Octave will display
+ the matrix in a series of smaller pieces, each of which can fit within
+ the limits of your terminal width. Each set of rows is labeled so that
+ you can easily see which columns are currently being displayed.
+ For example:
+
+
+
+
+ octave:13> rand (2,10)
+ ans =
+
+ Columns 1 through 6:
+
+ 0.75883 0.93290 0.40064 0.43818 0.94958 0.16467
+ 0.75697 0.51942 0.40031 0.61784 0.92309 0.40201
+
+ Columns 7 through 10:
+
+ 0.90174 0.11854 0.72313 0.73326
+ 0.44672 0.94303 0.56564 0.82150
+
+
+
+ The default value of split_long_rows
is nonzero.
+
+
+
+
+ Octave automatically switches to scientific notation when values become
+ very large or very small. This guarantees that you will see several
+ significant figures for every value in a matrix. If you would prefer to
+ see all values in a matrix printed in a fixed point format, you can set
+ the built-in variable fixed_point_format
to a nonzero value. But
+ doing so is not recommended, because it can produce output that can
+ easily be misinterpreted.
+
+
+
+
+ - Built-in Variable: fixed_point_format
+
-
+ If the value of this variable is nonzero, Octave will scale all values
+ in a matrix so that the largest may be written with one leading digit.
+ The scaling factor is printed on the first line of output. For example,
+
+
+
+
+ octave:1> logspace (1, 7, 5)'
+ ans =
+
+ 1.0e+07 *
+
+ 0.00000
+ 0.00003
+ 0.00100
+ 0.03162
+ 1.00000
+
+
+
+ Notice that first value appears to be zero when it is actually 1. For
+ this reason, you should be careful when setting
+ fixed_point_format
to a nonzero value.
+
+
+
+ The default value of fixed_point_format
is 0.
+
+
+
+
+
+
+
+
+
+ A matrix may have one or both dimensions zero, and operations on empty
+ matrices are handled as described by Carl de Boor in An Empty
+ Exercise, SIGNUM, Volume 25, pages 2--6, 1990 and C. N. Nett and W. M.
+ Haddad, in A System-Theoretic Appropriate Realization of the Empty
+ Matrix Concept, IEEE Transactions on Automatic Control, Volume 38,
+ Number 5, May 1993.
+
+
+
+ By default, dimensions of the empty matrix are printed along with the
+ empty matrix symbol, `[]'. The built-in variable
+ print_empty_dimensions
controls this behavior.
+
+
+
+
+ - Built-in Variable: print_empty_dimensions
+
-
+ If the value of
print_empty_dimensions
is nonzero, the
+ dimensions of empty matrices are printed along with the empty matrix
+ symbol, `[]'. For example, the expression
+
+
+
+
+ zeros (3, 0)
+
+
+
+ will print
+
+
+
+
+ ans = [](3x0)
+
+
+
+
+
+ Empty matrices may also be used in assignment statements as a convenient
+ way to delete rows or columns of matrices.
+ See section Assignment Expressions.
+
+
+
+ Octave will normally issue a warning if it finds an empty matrix in the
+ list of elements that make up another matrix. You can use the variable
+ empty_list_elements_ok
to suppress the warning or to treat it as
+ an error.
+
+
+
+
+ - Built-in Variable: empty_list_elements_ok
+
-
+ This variable controls whether Octave ignores empty matrices in a matrix
+ list.
+
+
+
+ For example, if the value of empty_list_elements_ok
is
+ nonzero, Octave will ignore the empty matrices in the expression
+
+
+
+
+ a = [1, [], 3, [], 5]
+
+
+
+ and the variable a
will be assigned the value [ 1, 3, 5 ]
.
+
+
+
+ The default value is "warn"
.
+
+
+
+
+ When Octave parses a matrix expression, it examines the elements of the
+ list to determine whether they are all constants. If they are, it
+ replaces the list with a single matrix constant.
+
+
+
+
+ - Built-in Variable: propagate_empty_matrices
+
-
+ If the value of
propagate_empty_matrices
is nonzero,
+ functions like inverse
and svd
will return an empty matrix
+ if they are given one as an argument. The default value is 1.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A range is a convenient way to write a row vector with evenly
+ spaced elements. A range expression is defined by the value of the first
+ element in the range, an optional value for the increment between
+ elements, and a maximum value which the elements of the range will not
+ exceed. The base, increment, and limit are separated by colons (the
+ `:' character) and may contain any arithmetic expressions and
+ function calls. If the increment is omitted, it is assumed to be 1.
+ For example, the range
+
+
+
+
+ 1 : 5
+
+
+
+ defines the set of values `[ 1, 2, 3, 4, 5 ]', and the range
+
+
+
+
+ 1 : 3 : 5
+
+
+
+ defines the set of values `[ 1, 4 ]'.
+
+
+
+ Although a range constant specifies a row vector, Octave does not
+ convert range constants to vectors unless it is necessary to do so.
+ This allows you to write a constant like `1 : 10000' without using
+ 80,000 bytes of storage on a typical 32-bit workstation.
+
+
+
+ Note that the upper (or lower, if the increment is negative) bound on
+ the range is not always included in the set of values, and that ranges
+ defined by floating point values can produce surprising results because
+ Octave uses floating point arithmetic to compute the values in the
+ range. If it is important to include the endpoints of a range and the
+ number of elements is known, you should use the linspace
function
+ instead (see section Special Utility Matrices).
+
+
+
+ When Octave parses a range expression, it examines the elements of the
+ expression to determine whether they are all constants. If they are, it
+ replaces the range expression with a single range constant.
+
+
+
+
+
+
+
+
+ - Function File: is_matrix (a)
+
-
+ Return 1 if a is a matrix. Otherwise, return 0.
+
+
+
+
+
+ - Function File: is_vector (a)
+
-
+ Return 1 if a is a vector. Otherwise, return 0.
+
+
+
+
+
+ - Function File: is_scalar (a)
+
-
+ Return 1 if a is a scalar. Otherwise, return 0.
+
+
+
+
+
+ - Function File: is_square (x)
+
-
+ If x is a square matrix, then return the dimension of x.
+ Otherwise, return 0.
+
+
+
+
+
+ - Function File: is_symmetric (x, tol)
+
-
+ If x is symmetric within the tolerance specified by tol,
+ then return the dimension of x. Otherwise, return 0. If
+ tol is omitted, use a tolerance equal to the machine precision.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_6.html octave-2.0.14/doc/interpreter/octave_6.html
*** octave-2.0.13/doc/interpreter/octave_6.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_6.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,694 ----
+
+
+
+
+ GNU Octave - Strings
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+
+ A string constant consists of a sequence of characters enclosed in
+ either double-quote or single-quote marks. For example, both of the
+ following expressions
+
+
+
+
+ "parrot"
+ 'parrot'
+
+
+
+ represent the string whose contents are `parrot'. Strings in
+ Octave can be of any length.
+
+
+
+ Since the single-quote mark is also used for the transpose operator
+ (see section Arithmetic Operators) but double-quote marks have no other purpose in
+ Octave, it is best to use double-quote marks to denote strings.
+
+
+
+
+
+ Some characters cannot be included literally in a string constant. You
+ represent them instead with escape sequences, which are character
+ sequences beginning with a backslash (`\').
+
+
+
+ One use of an escape sequence is to include a double-quote
+ (single-quote) character in a string constant that has been defined
+ using double-quote (single-quote) marks. Since a plain double-quote
+ would end the string, you must use `\"' to represent a single
+ double-quote character as a part of the string. The backslash character
+ itself is another character that cannot be included normally. You must
+ write `\\' to put one backslash in the string. Thus, the string
+ whose contents are the two characters `"\' may be written
+ "\"\\"
or '"\\'
. Similarly, the string whose contents are
+ the two characters `'\' may be written '\'\\'
or "'\\"
.
+
+
+
+ Another use of backslash is to represent unprintable characters
+ such as newline. While there is nothing to stop you from writing most
+ of these characters directly in a string constant, they may look ugly.
+
+
+
+ Here is a table of all the escape sequences used in Octave. They are
+ the same as those used in the C programming language.
+
+
+
+
+ \\
+ -
+ Represents a literal backslash, `\'.
+
+
\"
+ -
+ Represents a literal double-quote character, `"'.
+
+
\'
+ -
+ Represents a literal single-quote character, `''.
+
+
\a
+ -
+ Represents the "alert" character, control-g, ASCII code 7.
+
+
\b
+ -
+ Represents a backspace, control-h, ASCII code 8.
+
+
\f
+ -
+ Represents a formfeed, control-l, ASCII code 12.
+
+
\n
+ -
+ Represents a newline, control-j, ASCII code 10.
+
+
\r
+ -
+ Represents a carriage return, control-m, ASCII code 13.
+
+
\t
+ -
+ Represents a horizontal tab, control-i, ASCII code 9.
+
+
\v
+ -
+ Represents a vertical tab, control-k, ASCII code 11.
+
+
+
+
+ Strings may be concatenated using the notation for defining matrices.
+ For example, the expression
+
+
+
+
+ [ "foo" , "bar" , "baz" ]
+
+
+
+ produces the string whose contents are `foobarbaz'. See section Numeric Data Types for more information about creating matrices.
+
+
+
+
+
+
+
+
+
+ - Function File: blanks (n)
+
-
+ Return a string of n blanks.
+
+
+
+
+
+ - Function File: int2str (n)
+
-
+
- Function File: num2str (x)
+
-
+ Convert a number to a string. These functions are not very flexible,
+ but are provided for compatibility with MATLAB. For better control
+ over the results, use
sprintf
(see section Formatted Output).
+
+
+
+
+
+ - Built-in Function: setstr (x)
+
-
+ Convert a matrix to a string. Each element of the matrix is converted
+ to the corresponding ASCII
+ character. For example,
+
+
+
+
+ setstr ([97, 98, 99])
+ => "abc"
+
+
+
+
+
+
+ - Function File: strcat (s1, s2, ...)
+
-
+ Return a string containing all the arguments concatenated. For example,
+
+
+
+
+ s = [ "ab"; "cde" ];
+ strcat (s, s, s)
+ => "ab ab ab "
+ "cdecdecde"
+
+
+
+
+
+
+ - Built-in Variable: string_fill_char
+
-
+ The value of this variable is used to pad all strings in a string matrix
+ to the same length. It should be a single character. The default value
+ is
" "
(a single space). For example,
+
+
+
+
+ string_fill_char = "X";
+ [ "these"; "are"; "strings" ]
+ => "theseXX"
+ "areXXXX"
+ "strings"
+
+
+
+
+
+
+ - Function File: str2mat (s_1, ..., s_n)
+
-
+ Return a matrix containing the strings s_1, ..., s_n as
+ its rows. Each string is padded with blanks in order to form a valid
+ matrix.
+
+
+
+ Note:
+ This function is modelled after MATLAB. In Octave, you can create
+ a matrix of strings by [s_1; ...; s_n]
even if
+ the strings are not all the same length.
+
+
+
+
+
+ - Built-in Function: isstr (a)
+
-
+ Return 1 if a is a string. Otherwise, return 0.
+
+
+
+
+
+
+
+
+
+ - Function File: deblank (s)
+
-
+ Removes the trailing blanks from the string s.
+
+
+
+
+
+ - Function File: findstr (s, t, overlap)
+
-
+ Return the vector of all positions in the longer of the two strings
+ s and t where an occurrence of the shorter of the two starts.
+ If the optional argument overlap is nonzero, the returned vector
+ can include overlapping positions (this is the default). For example,
+
+
+
+
+ findstr ("ababab", "a")
+ => [ 1, 3, 5 ]
+ findstr ("abababa", "aba", 0)
+ => [ 1, 5 ]
+
+
+
+
+
+
+ - Function File: index (s, t)
+
-
+ Return the position of the first occurrence of the string t in the
+ string s, or 0 if no occurrence is found. For example,
+
+
+
+
+ index ("Teststring", "t")
+ => 4
+
+
+
+ Note: This function does not work for arrays of strings.
+
+
+
+
+
+ - Function File: rindex (s, t)
+
-
+ Return the position of the last occurrence of the string t in the
+ string s, or 0 if no occurrence is found. For example,
+
+
+
+
+ rindex ("Teststring", "t")
+ => 6
+
+
+
+ Note: This function does not work for arrays of strings.
+
+
+
+
+
+ - Function File: split (s, t)
+
-
+ Divides the string s into pieces separated by t, returning
+ the result in a string array (padded with blanks to form a valid
+ matrix). For example,
+
+
+
+
+ split ("Test string", "t")
+ => "Tes "
+ " s "
+ "ring"
+
+
+
+
+
+
+ - Function File: strcmp (s1, s2)
+
-
+ Compares two strings, returning 1 if they are the same, and 0 otherwise.
+
+
+
+ Note: For compatibility with MATLAB, Octave's strcmp
+ function returns 1 if the strings are equal, and 0 otherwise. This is
+ just the opposite of the corresponding C library function.
+
+
+
+
+
+ - Function File: strrep (s, x, y)
+
-
+ Replaces all occurrences of the substring x of the string s
+ with the string y. For example,
+
+
+
+
+ strrep ("This is a test string", "is", "&%$")
+ => "Th&%$ &%$ a test string"
+
+
+
+
+
+
+ - Function File: substr (s, beg, len)
+
-
+ Return the substring of s which starts at character number
+ beg and is len characters long. For example,
+
+
+
+
+ substr ("This is a test string", 6, 9)
+ => "is a test"
+
+
+
+
+
+ Note:
+ This function is patterned after AWK. You can get the same result by
+ s (beg : (beg + len - 1))
.
+
+
+
+
+
+
+
+
+
+
+ - Function File: bin2dec (s)
+
-
+ Return a decimal number corresponding to the binary number
+ represented as a string of zeros and ones. For example,
+
+
+
+
+ bin2dec ("1110")
+ => 14
+
+
+
+
+
+
+ - Function File: dec2bin (n)
+
-
+ Return a binary number corresponding the nonnegative decimal number
+ n, as a string of ones and zeros. For example,
+
+
+
+
+ dec2bin (14)
+ => "1110"
+
+
+
+
+
+
+ - Function File: dec2hex (n)
+
-
+ Return the hexadecimal number corresponding to the nonnegative decimal
+ number n, as a string. For example,
+
+
+
+
+ dec2hex (2748)
+ => "abc"
+
+
+
+
+
+
+ - Function File: hex2dec (s)
+
-
+ Return the decimal number corresponding to the hexadecimal number stored
+ in the string s. For example,
+
+
+
+
+ hex2dec ("12B")
+ => 299
+ hex2dec ("12b")
+ => 299
+
+
+
+
+
+
+ - Function File: str2num (s)
+
-
+ Convert the string s to a number.
+
+
+
+
+
+ - Function File: toascii (s)
+
-
+ Return ASCII representation of s in a matrix. For example,
+
+
+
+
+ toascii ("ASCII")
+ => [ 65, 83, 67, 73, 73 ]
+
+
+
+
+
+
+
+ - Function File: tolower (s)
+
-
+ Return a copy of the string s, with each upper-case character
+ replaced by the corresponding lower-case one; nonalphabetic characters
+ are left unchanged. For example,
+
+
+
+
+ tolower ("MiXeD cAsE 123")
+ => "mixed case 123"
+
+
+
+
+
+
+ - Function File: toupper (s)
+
-
+ Return a copy of the string s, with each lower-case character
+ replaced by the corresponding upper-case one; nonalphabetic characters
+ are left unchanged. For example,
+
+
+
+
+ toupper ("MiXeD cAsE 123")
+ => "MIXED CASE 123"
+
+
+
+
+
+
+ - Built-in Function: undo_string_escapes (s)
+
-
+ Converts special characters in strings back to their escaped forms. For
+ example, the expression
+
+
+
+
+ bell = "\a";
+
+
+
+ assigns the value of the alert character (control-g, ASCII code 7) to
+ the string variable bell
. If this string is printed, the
+ system will ring the terminal bell (if it is possible). This is
+ normally the desired outcome. However, sometimes it is useful to be
+ able to print the original representation of the string, with the
+ special characters replaced by their escape sequences. For example,
+
+
+
+
+ octave:13> undo_string_escapes (bell)
+ ans = \a
+
+
+
+ replaces the unprintable alert character with its printable
+ representation.
+
+
+
+
+
+ - Built-in Variable: implicit_num_to_str_ok
+
-
+ If the value of
implicit_num_to_str_ok
is nonzero, implicit
+ conversions of numbers to their ASCII character equivalents are
+ allowed when strings are constructed using a mixture of strings and
+ numbers in matrix notation. Otherwise, an error message is printed and
+ control is returned to the top level. The default value is 0. For
+ example,
+
+
+
+
+ [ "f", 111, 111 ]
+ => "foo"
+
+
+
+
+
+
+ - Built-in Variable: implicit_str_to_num_ok
+
-
+ If the value of
implicit_str_to_num_ok
is nonzero, implicit
+ conversions of strings to their numeric ASCII equivalents are allowed.
+ Otherwise, an error message is printed and control is returned to the
+ top level. The default value is 0.
+
+
+
+
+
+
+
+
+ Octave also provides the following character class test functions
+ patterned after the functions in the standard C library. They all
+ operate on string arrays and return matrices of zeros and ones.
+ Elements that are nonzero indicate that the condition was true for the
+ corresponding character in the string array. For example,
+
+
+
+
+ isalpha ("!Q@WERT^Y&")
+ => [ 0, 1, 0, 1, 1, 1, 1, 0, 1, 0 ]
+
+
+
+
+ - Mapping Function: isalnum (s)
+
-
+ Return 1 for characters that are letters or digits (
isalpha
+ (a)
or isdigit (
) is true).
+
+
+
+
+
+ - Mapping Function: isalpha (s)
+
-
+ Return true for characters that are letters (
isupper (a)
+ or islower (
) is true).
+
+
+
+
+
+ - Mapping Function: isascii (s)
+
-
+ Return 1 for characters that are ASCII (in the range 0 to 127 decimal).
+
+
+
+
+
+ - Mapping Function: iscntrl (s)
+
-
+ Return 1 for control characters.
+
+
+
+
+
+ - Mapping Function: isdigit (s)
+
-
+ Return 1 for characters that are decimal digits.
+
+
+
+
+
+ - Mapping Function: isgraph (s)
+
-
+ Return 1 for printable characters (but not the space character).
+
+
+
+
+
+ - Mapping Function: islower (s)
+
-
+ Return 1 for characters that are lower case letters.
+
+
+
+
+
+ - Mapping Function: isprint (s)
+
-
+ Return 1 for printable characters (including the space character).
+
+
+
+
+
+ - Mapping Function: ispunct (s)
+
-
+ Return 1 for punctuation characters.
+
+
+
+
+
+ - Mapping Function: isspace (s)
+
-
+ Return 1 for whitespace characters (space, formfeed, newline,
+ carriage return, tab, and vertical tab).
+
+
+
+
+
+ - Mapping Function: isupper (s)
+
-
+ Return 1 for upper case letters.
+
+
+
+
+
+ - Mapping Function: isxdigit (s)
+
-
+ Return 1 for characters that are hexadecimal digits.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_7.html octave-2.0.14/doc/interpreter/octave_7.html
*** octave-2.0.13/doc/interpreter/octave_7.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_7.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,246 ----
+
+
+
+
+ GNU Octave - Data Structures
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ Octave includes support for organizing data in structures. The current
+ implementation uses an associative array with indices limited to
+ strings, but the syntax is more like C-style structures. Here are some
+ examples of using data structures in Octave.
+
+
+
+ Elements of structures can be of any value type. For example, the three
+ expressions
+
+
+
+
+ x.a = 1
+ x.b = [1, 2; 3, 4]
+ x.c = "string"
+
+
+
+ create a structure with three elements. To print the value of the
+ structure, you can type its name, just as for any other variable:
+
+
+
+
+ octave:2> x
+ x =
+ {
+ a = 1
+ b =
+
+ 1 2
+ 3 4
+
+ c = string
+ }
+
+
+
+ Note that Octave may print the elements in any order.
+
+
+
+ Structures may be copied.
+
+
+
+
+ octave:1> y = x
+ y =
+ {
+ a = 1
+ b =
+
+ 1 2
+ 3 4
+
+ c = string
+ }
+
+
+
+ Since structures are themselves values, structure elements may reference
+ other structures. The following statements change the value of the
+ element b
of the structure x
to be a data structure
+ containing the single element d
, which has a value of 3.
+
+
+
+
+ octave:1> x.b.d = 3
+ x.b.d = 3
+ octave:2> x.b
+ ans =
+ {
+ d = 3
+ }
+ octave:3> x
+ x =
+ {
+ a = 1
+ b =
+ {
+ d = 3
+ }
+
+ c = string
+ }
+
+
+
+ Note that when Octave prints the value of a structure that contains
+ other structures, only a few levels are displayed. For example,
+
+
+
+
+ octave:1> a.b.c.d.e = 1;
+ octave:2> a
+ a =
+ {
+ b =
+ {
+ c = <structure>
+ }
+ }
+
+
+
+ This prevents long and confusing output from large deeply nested
+ structures.
+
+
+
+
+ - Built-in Variable: struct_levels_to_print
+
-
+ You can tell Octave how many structure levels to display by setting the
+ built-in variable
struct_levels_to_print
. The default value is 2.
+
+
+
+
+ Functions can return structures. For example, the following function
+ separates the real and complex parts of a matrix and stores them in two
+ elements of the same structure variable.
+
+
+
+
+ octave:1> function y = f (x)
+ > y.re = real (x);
+ > y.im = imag (x);
+ > endfunction
+
+
+
+ When called with a complex-valued argument, f
returns the data
+ structure containing the real and imaginary parts of the original
+ function argument.
+
+
+
+
+ octave:2> f (rand (3) + rand (3) * I);
+ ans =
+ {
+ im =
+
+ 0.26475 0.14828
+ 0.18436 0.83669
+
+ re =
+
+ 0.040239 0.242160
+ 0.238081 0.402523
+ }
+
+
+
+ Function return lists can include structure elements, and they may be
+ indexed like any other variable. For example,
+
+
+
+
+ octave:1> [ x.u, x.s(2:3,2:3), x.v ] = svd ([1, 2; 3, 4])
+ x.u =
+
+ -0.40455 -0.91451
+ -0.91451 0.40455
+
+ x.s =
+
+ 0.00000 0.00000 0.00000
+ 0.00000 5.46499 0.00000
+ 0.00000 0.00000 0.36597
+
+ x.v =
+
+ -0.57605 0.81742
+ -0.81742 -0.57605
+
+
+
+ It is also possible to cycle through all the elements of a structure in
+ a loop, using a special form of the for
statement
+ (see section The for
Statement)
+
+
+
+ The following functions are available to give you information about
+ structures.
+
+
+
+
+ - Built-in Function: is_struct (expr)
+
-
+ Return 1 if the value of the expression expr is a structure.
+
+
+
+
+
+ - Built-in Function: struct_contains (expr, name)
+
-
+ Return 1 if the expression expr is a structure and it includes an
+ element named name. The first argument must be a structure and
+ the second must be a string.
+
+
+
+
+
+ - Built-in Function: struct_elements (struct)
+
-
+ Return a list of strings naming the elements of the structure
+ struct. It is an error to call
struct_elements
with an
+ argument that is not a structure.
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_8.html octave-2.0.14/doc/interpreter/octave_8.html
*** octave-2.0.13/doc/interpreter/octave_8.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_8.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,851 ----
+
+
+
+
+ GNU Octave - Variables
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ Variables let you give names to values and refer to them later. You have
+ already seen variables in many of the examples. The name of a variable
+ must be a sequence of letters, digits and underscores, but it may not begin
+ with a digit. Octave does not enforce a limit on the length of variable
+ names, but it is seldom useful to have variables with names longer than
+ about 30 characters. The following are all valid variable names
+
+
+
+
+
+
+
+
+ x
+ x15
+ __foo_bar_baz__
+ fucnrdthsucngtagdjb
+
+
+
+ However, names like __foo_bar_baz__
that begin and end with two
+ underscores are understood to be reserved for internal use by Octave.
+ You should not use them in code you write, except to access Octave's
+ documented internal variables and built-in symbolic constants.
+
+
+
+ Case is significant in variable names. The symbols a
and
+ A
are distinct variables.
+
+
+
+ A variable name is a valid expression by itself. It represents the
+ variable's current value. Variables are given new values with
+ assignment operators and increment operators.
+ See section Assignment Expressions.
+
+
+
+ A number of variables have special built-in meanings. For example,
+ PWD
holds the current working directory, and pi
names the
+ ratio of the circumference of a circle to its diameter. See section Summary of Built-in Variables, for a list of all the predefined variables. Some
+ of these built-in symbols are constants and may not be changed. Others
+ can be used and assigned just like all other variables, but their values
+ are also used or changed automatically by Octave.
+
+
+
+ Variables in Octave do not have fixed types, so it is possible to first
+ store a numeric value in a variable and then to later use the same name
+ to hold a string value in the same program. Variables may not be used
+ before they have been given a value. Doing so results in an error.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A variable that has been declared global may be accessed from
+ within a function body without having to pass it as a formal parameter.
+
+
+
+ A variable may be declared global using a global
declaration
+ statement. The following statements are all global declarations.
+
+
+
+
+ global a
+ global b = 2
+ global c = 3, d, e = 5
+
+
+
+ It is necessary declare a variable as global within a function body in
+ order to access it. For example,
+
+
+
+
+ global x
+ function f ()
+ x = 1;
+ endfunction
+ f ()
+
+
+
+ does not set the value of the global variable x
to 1. In
+ order to change the value of the global variable x
, you must also
+ declare it to be global within the function body, like this
+
+
+
+
+ function f ()
+ global x;
+ x = 1;
+ endfunction
+
+
+
+ Passing a global variable in a function parameter list will
+ make a local copy and not modify the global value. For example, given
+ the function
+
+
+
+
+ function f (x)
+ x = 0
+ endfunction
+
+
+
+ and the definition of x
as a global variable at the top level,
+
+
+
+
+ global x = 13
+
+
+
+ the expression
+
+
+
+
+ f (x)
+
+
+
+ will display the value of x
from inside the function as 0,
+ but the value of x
at the top level remains unchanged, because
+ the function works with a copy of its argument.
+
+
+
+
+ - Built-in Variable: warn_comma_in_global_decl
+
-
+ If the value of
warn_comma_in_global_decl
is nonzero, a
+ warning is issued for statements like
+
+
+
+
+ global a = 1, b
+
+
+
+ which makes the variables a
and b
global and assigns the
+ value 1 to the variable a
, because in this context, the comma is
+ not interpreted as a statement separator.
+
+
+
+ The default value of warn_comma_in_global_decl
is nonzero.
+
+
+
+
+
+ - initialize_global_variables:
+
-
+ if the value of
initialize_global_variables
is nonzero, global
+ variables are initialized to the value of the built-in variable
+ default_global_variable_value
.
+
+
+
+ the default value of initialize_global_variables
is zero.
+
+
+
+
+
+ - default_global_variable_value:
+
-
+ if
initialize_global_variables
is nonzero, the value of
+ default_glbaol_variable_value
is used as the initial value of
+ global variables that are not explicitly initialized. for example,
+
+
+
+
+ initialize_global_variables = 1;
+ default_global_variable_value = 13;
+ global foo;
+ foo
+ => 13
+
+
+
+ the variable default_global_variable_value
is initially undefined.
+
+
+
+
+
+ - Built-in Function: is_global (name)
+
-
+ Return 1 if name is globally visible. Otherwise, return 0. For
+ example,
+
+
+
+
+ global x
+ is_global ("x")
+ => 1
+
+
+
+
+
+
+
+
+
+
+ - Command: clear options pattern ...
+
-
+ Delete the names matching the given patterns from the symbol table. The
+ pattern may contain the following special characters:
+
+
+ ?
+ -
+ Match any single character.
+
+
*
+ -
+ Match zero or more characters.
+
+
[ list ]
+ -
+ Match the list of characters specified by list. If the first
+ character is
!
or ^
, match all characters except those
+ specified by list. For example, the pattern `[a-zA-Z]' will
+ match all lower and upper case alphabetic characters.
+
+
+
+ For example, the command
+
+
+
+
+ clear foo b*r
+
+
+
+ clears the name foo
and all names that begin with the letter
+ b
and end with the letter r
.
+
+
+
+ If clear
is called without any arguments, all user-defined
+ variables (local and global) are cleared from the symbol table. If
+ clear
is called with at least one argument, only the visible
+ names matching the arguments are cleared. For example, suppose you have
+ defined a function foo
, and then hidden it by performing the
+ assignment foo = 2
. Executing the command clear foo once
+ will clear the variable definition and restore the definition of
+ foo
as a function. Executing clear foo a second time will
+ clear the function definition.
+
+
+
+ This command may not be used within a function body.
+
+
+
+
+
+ - Command: who options pattern ...
+
-
+
- Command: whos options pattern ...
+
-
+ List currently defined symbols matching the given patterns. The
+ following are valid options. They may be shortened to one character but
+ may not be combined.
+
+
+
+
+ -all
+ -
+ List all currently defined symbols.
+
+
-builtins
+ -
+ List built-in variables and functions. This includes all currently
+ compiled function files, but does not include all function files that
+ are in the
LOADPATH
.
+
+ -functions
+ -
+ List user-defined functions.
+
+
-long
+ -
+ Print a long listing including the type and dimensions of any symbols.
+ The symbols in the first column of output indicate whether it is
+ possible to redefine the symbol, and whether it is possible for it to be
+ cleared.
+
+
-variables
+ -
+ List user-defined variables.
+
+
+
+ Valid patterns are the same as described for the clear
command
+ above. If no patterns are supplied, all symbols from the given category
+ are listed. By default, only user defined functions and variables
+ visible in the local scope are displayed.
+
+
+
+ The command whos is equivalent to who -long.
+
+
+
+
+
+ - Built-in Function: exist (name)
+
-
+ Return 1 if the name exists as a variable, 2 if the name (after
+ appending `.m') is a function file in the path, 3 if the name is a
+ `.oct' file in the path, or 5 if the name is a built-in function.
+ Otherwise, return 0.
+
+
+
+
+
+ - Built-in Function: document (symbol, text)
+
-
+ Set the documentation string for symbol to text.
+
+
+
+
+
+ - Command: type options name ...
+
-
+ Display the definition of each name that refers to a function.
+
+
+
+ Normally also displays if each name is user-defined or builtin;
+ the -q
option suppresses this behaviour.
+
+
+
+ Currently, Octave can only display functions that can be compiled
+ cleanly, because it uses its internal representation of the function to
+ recreate the program text.
+
+
+
+ Comments are not displayed because Octave's parser currently discards
+ them as it converts the text of a function file to its internal
+ representation. This problem may be fixed in a future release.
+
+
+
+
+
+ - Command: which name ...
+
-
+ Display the type of each name. If name is defined from a
+ function file, the full name of the file is also displayed.
+
+
+
+
+
+
+
+
+ Here is a summary of all of Octave's built-in variables along with
+ cross references to additional information and their default values. In
+ the following table octave-home stands for the root directory
+ where all of Octave is installed (the default is `/usr/local',
+ version stands for the Octave version number (for example,
+ 2.0.13) and arch stands for the type of system for which
+ Octave was compiled (for example, i586-pc-linux-gnu
).
+
+
+
+
+ EDITOR
+ -
+
+ See section Commands For Manipulating The History.
+
+ Default value:
"emacs"
.
+
+ EXEC_PATH
+ -
+
+ See section Controlling Subprocesses.
+
+ Default value:
":$PATH"
.
+
+ INFO_FILE
+ -
+
+ See section Commands for Getting Help.
+
+ Default value:
"octave-home/info/octave.info"
.
+
+ INFO_PROGRAM
+ -
+
+ See section Commands for Getting Help.
+
+ Default value:
"octave-home/libexec/octave/version/exec/arch/info"
.
+
+ LOADPATH
+ -
+
+ See section Function Files.
+
+ Default value:
".:octave-home/lib/version"
.
+
+ OCTAVE_HOME
+ -
+
+
+ Default value:
"/usr/local"
.
+
+ PAGER
+ -
+
+ See section Input and Output.
+
+ Default value:
"less", or "more"
.
+
+ PS1
+ -
+
+ See section Customizing the Prompt.
+
+ Default value:
"\s:\#> "
.
+
+ PS2
+ -
+
+ See section Customizing the Prompt.
+
+ Default value:
"> "
.
+
+ PS4
+ -
+
+ See section Customizing the Prompt.
+
+ Default value:
"+ "
.
+
+ auto_unload_dot_oct_files
+ -
+
+ See section Dynamically Linked Functions.
+
+ Default value: 0.
+
+
automatic_replot
+ -
+
+ See section Two-Dimensional Plotting.
+
+ Default value: 0.
+
+
beep_on_error
+ -
+
+ See section Error Handling.
+
+ Default value: 0.
+
+
completion_append_char
+ -
+
+ See section Letting Readline Type For You.
+
+ Default value:
" "
.
+
+ default_eval_print_flag
+ -
+
+ See section Evaluation.
+
+ Default value: 1.
+
+
default_return_value
+ -
+
+ See section Multiple Return Values.
+
+ Default value:
[]
.
+
+ default_save_format
+ -
+
+ See section Simple File I/O.
+
+ Default value:
"ascii"
.
+
+ do_fortran_indexing
+ -
+
+ See section Index Expressions.
+
+ Default value: 0.
+
+
define_all_return_values
+ -
+
+ See section Multiple Return Values.
+
+ Default value: 0.
+
+
empty_list_elements_ok
+ -
+
+ See section Empty Matrices.
+
+ Default value:
"warn"
.
+
+ fixed_point_format
+ -
+
+ See section Matrices
+
+ Default value: 0.
+
+
gnuplot_binary
+ -
+
+ See section Three-Dimensional Plotting.
+
+ Default value:
"gnuplot"
.
+
+ history_file
+ -
+
+ See section Commands For Manipulating The History.
+
+ Default value:
"~/.octave_hist"
.
+
+ history_size
+ -
+
+ See section Commands For Manipulating The History.
+
+ Default value: 1024.
+
+
ignore_function_time_stamp
+ -
+
+ See section Function Files.
+
+ Default value:
"system"
.
+
+ implicit_num_to_str_ok
+ -
+
+ See section String Conversions.
+
+ Default value: 0.
+
+
implicit_str_to_num_ok
+ -
+
+ See section String Conversions.
+
+ Default value: 0.
+
+
max_recursion_depth
+ -
+
+ See section Recursion.
+
+ Default value: 256.
+
+
ok_to_lose_imaginary_part
+ -
+
+ See section Special Utility Matrices.
+
+ Default value:
"warn"
.
+
+ output_max_field_width
+ -
+
+ See section Matrices.
+
+ Default value: 10.
+
+
output_precision
+ -
+
+ See section Matrices.
+
+ Default value: 5.
+
+
page_screen_output
+ -
+
+ See section Input and Output.
+
+ Default value: 1.
+
+
prefer_column_vectors
+ -
+
+ See section Index Expressions.
+
+ Default value: 1.
+
+
print_answer_id_name
+ -
+
+ See section Terminal Output.
+
+ Default value: 1.
+
+
print_empty_dimensions
+ -
+
+ See section Empty Matrices.
+
+ Default value: 1.
+
+
resize_on_range_error
+ -
+
+ See section Index Expressions.
+
+ Default value: 1.
+
+
return_last_computed_value
+ -
+
+ See section Returning From a Function.
+
+ Default value: 0.
+
+
save_precision
+ -
+
+ See section Simple File I/O.
+
+ Default value: 17.
+
+
saving_history
+ -
+
+ See section Commands For Manipulating The History.
+
+ Default value: 1.
+
+
silent_functions
+ -
+
+ See section Defining Functions.
+
+ Default value: 0.
+
+
split_long_rows
+ -
+
+ See section Matrices.
+
+ Default value: 1.
+
+
struct_levels_to_print
+ -
+
+ See section Data Structures.
+
+ Default value: 2.
+
+
suppress_verbose_help_message
+ -
+
+ See section Commands for Getting Help.
+
+ Default value: 1.
+
+
treat_neg_dim_as_zero
+ -
+
+ See section Special Utility Matrices.
+
+ Default value: 0.
+
+
warn_assign_as_truth_value
+ -
+
+ See section The
if
Statement.
+
+ Default value: 1.
+
+ warn_comma_in_global_decl
+ -
+
+ See section Global Variables.
+
+ Default value: 1.
+
+
warn_divide_by_zero
+ -
+
+ See section Arithmetic Operators.
+
+ Default value: 1.
+
+
warn_function_name_clash
+ -
+
+ See section Function Files.
+
+ Default value: 1.
+
+
warn_reload_forces_clear
+ -
+
+ See section Dynamically Linked Functions.
+
+ Default value: 1.
+
+
warn_variable_switch_label
+ -
+
+ See section The
switch
Statement.
+
+ Default value: 0.
+
+ whitespace_in_literal_matrix
+ -
+
+ See section Matrices.
+
+ Default value:
""
.
+
+
+
+
+
+
+
+ Octave uses the values of the following environment variables to set the
+ default values for the corresponding built-in variables. In addition,
+ the values from the environment may be overridden by command-line
+ arguments. See section Command Line Options.
+
+
+
+
+ EDITOR
+ -
+
+ See section Commands For Manipulating The History.
+
+ Built-in variable:
EDITOR
.
+
+ OCTAVE_EXEC_PATH
+ -
+
+ See section Controlling Subprocesses.
+
+ Built-in variable:
EXEC_PATH
.
+ Command-line argument: --exec-path
.
+
+ OCTAVE_PATH
+ -
+
+ See section Function Files.
+
+ Built-in variable:
LOADPATH
.
+ Command-line argument: --path
.
+
+ OCTAVE_INFO_FILE
+ -
+
+ See section Commands for Getting Help.
+
+ Built-in variable:
INFO_FILE
.
+ Command-line argument: --info-file
.
+
+ OCTAVE_INFO_PROGRAM
+ -
+
+ See section Commands for Getting Help.
+
+ Built-in variable:
INFO_PROGRAM
.
+ Command-line argument: --info-program
.
+
+ OCTAVE_HISTSIZE
+ -
+
+ See section Commands For Manipulating The History.
+
+ Built-in variable:
history_size
.
+
+ OCTAVE_HISTFILE
+ -
+
+ See section Commands For Manipulating The History.
+
+ Built-in variable:
history_file
.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_9.html octave-2.0.14/doc/interpreter/octave_9.html
*** octave-2.0.13/doc/interpreter/octave_9.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_9.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,1408 ----
+
+
+
+
+ GNU Octave - Expressions
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+ Expressions are the basic building block of statements in Octave. An
+ expression evaluates to a value, which you can print, test, store in a
+ variable, pass to a function, or assign a new value to a variable with
+ an assignment operator.
+
+
+
+ An expression can serve as a statement on its own. Most other kinds of
+ statements contain one or more expressions which specify data to be
+ operated on. As in other languages, expressions in Octave include
+ variables, array references, constants, and function calls, as well as
+ combinations of these with various operators.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An index expression allows you to reference or extract selected
+ elements of a matrix or vector.
+
+
+
+ Indices may be scalars, vectors, ranges, or the special operator
+ `:', which may be used to select entire rows or columns.
+
+
+
+ Vectors are indexed using a single expression. Matrices require two
+ indices unless the value of the built-in variable
+ do_fortran_indexing
is nonzero, in which case matrices may
+ also be indexed by a single expression.
+
+
+
+
+ - Built-in Variable: do_fortran_indexing
+
-
+ If the value of
do_fortran_indexing
is nonzero, Octave allows
+ you to select elements of a two-dimensional matrix using a single index
+ by treating the matrix as a single vector created from the columns of
+ the matrix. The default value is 0.
+
+
+
+
+ Given the matrix
+
+
+
+
+ a = [1, 2; 3, 4]
+
+
+
+ all of the following expressions are equivalent
+
+
+
+
+ a (1, [1, 2])
+ a (1, 1:2)
+ a (1, :)
+
+
+
+ and select the first row of the matrix.
+
+
+
+ A special form of indexing may be used to select elements of a matrix or
+ vector. If the indices are vectors made up of only ones and zeros, the
+ result is a new matrix whose elements correspond to the elements of the
+ index vector that are equal to one. For example,
+
+
+
+
+ a = [1, 2; 3, 4];
+ a ([1, 0], :)
+
+
+
+ selects the first row of the matrix a
.
+
+
+
+ This operation can be useful for selecting elements of a matrix based on
+ some condition, since the comparison operators return matrices of ones
+ and zeros.
+
+
+
+ This special zero-one form of indexing leads to a conflict with the
+ standard indexing operation. For example, should the following
+ statements
+
+
+
+
+ a = [1, 2; 3, 4];
+ a ([1, 1], :)
+
+
+
+ return the original matrix, or the matrix formed by selecting the first
+ row twice? Although this conflict is not likely to arise very often in
+ practice, you may select the behavior you prefer by setting the built-in
+ variable prefer_zero_one_indexing
.
+
+
+
+
+ - Built-in Variable: prefer_zero_one_indexing
+
-
+ If the value of
prefer_zero_one_indexing
is nonzero, Octave
+ will perform zero-one style indexing when there is a conflict with the
+ normal indexing rules. See section Index Expressions. For example, given a
+ matrix
+
+
+
+
+ a = [1, 2, 3, 4]
+
+
+
+ with prefer_zero_one_indexing
is set to nonzero, the
+ expression
+
+
+
+
+ a ([1, 1, 1, 1])
+
+
+
+ results in the matrix [ 1, 2, 3, 4 ]
. If the value of
+ prefer_zero_one_indexing
set to 0, the result would be
+ the matrix [ 1, 1, 1, 1 ]
.
+
+
+
+ In the first case, Octave is selecting each element corresponding to a
+ `1' in the index vector. In the second, Octave is selecting the
+ first element multiple times.
+
+
+
+ The default value for prefer_zero_one_indexing
is 0.
+
+
+
+
+ Finally, indexing a scalar with a vector of ones can be used to create a
+ vector the same size as the index vector, with each element equal to
+ the value of the original scalar. For example, the following statements
+
+
+
+
+ a = 13;
+ a ([1, 1, 1, 1])
+
+
+
+ produce a vector whose four elements are all equal to 13.
+
+
+
+ Similarly, indexing a scalar with two vectors of ones can be used to
+ create a matrix. For example the following statements
+
+
+
+
+ a = 13;
+ a ([1, 1], [1, 1, 1])
+
+
+
+ create a 2 by 3 matrix with all elements equal to 13.
+
+
+
+ This is an obscure notation and should be avoided. It is better to
+ use the function ones
to generate a matrix of the appropriate
+ size whose elements are all one, and then to scale it to produce the
+ desired result. See section Special Utility Matrices.
+
+
+
+
+ - Built-in Variable: prefer_column_vectors
+
-
+ If
prefer_column_vectors
is nonzero, operations like
+
+
+
+
+ for i = 1:10
+ a (i) = i;
+ endfor
+
+
+
+ (for a
previously undefined) produce column vectors. Otherwise, row
+ vectors are preferred. The default value is 1.
+
+
+
+ If a variable is already defined to be a vector (a matrix with a single
+ row or column), the original orientation is respected, regardless of the
+ value of prefer_column_vectors
.
+
+
+
+
+
+ - Built-in Variable: resize_on_range_error
+
-
+ If the value of
resize_on_range_error
is nonzero, expressions
+ like
+
+
+
+
+ for i = 1:10
+ a (i) = sqrt (i);
+ endfor
+
+
+
+ (for a
previously undefined) result in the variable a
+ being resized to be just large enough to hold the new value. New
+ elements that have not been given a value are set to zero. If the value
+ of resize_on_range_error
is 0, an error message is printed and
+ control is returned to the top level. The default value is 1.
+
+
+
+
+ Note that it is quite inefficient to create a vector using a loop like
+ the one shown in the example above. In this particular case, it would
+ have been much more efficient to use the expression
+
+
+
+
+ a = sqrt (1:10);
+
+
+
+ thus avoiding the loop entirely. In cases where a loop is still
+ required, or a number of values must be combined to form a larger
+ matrix, it is generally much faster to set the size of the matrix first,
+ and then insert elements using indexing commands. For example, given a
+ matrix a
,
+
+
+
+
+ [nr, nc] = size (a);
+ x = zeros (nr, n * nc);
+ for i = 1:n
+ x(:,(i-1)*n+1:i*n) = a;
+ endfor
+
+
+
+ is considerably faster than
+
+
+
+
+ x = a;
+ for i = 1:n-1
+ x = [x, a];
+ endfor
+
+
+
+ particularly for large matrices because Octave does not have to
+ repeatedly resize the result.
+
+
+
+
+
+
+
+ A function is a name for a particular calculation. Because it has
+ a name, you can ask for it by name at any point in the program. For
+ example, the function sqrt
computes the square root of a number.
+
+
+
+ A fixed set of functions are built-in, which means they are
+ available in every Octave program. The sqrt
function is one of
+ these. In addition, you can define your own functions.
+ See section Functions and Script Files, for information about how to do this.
+
+
+
+
+ The way to use a function is with a function call expression,
+ which consists of the function name followed by a list of
+ arguments in parentheses. The arguments are expressions which give
+ the raw materials for the calculation that the function will do. When
+ there is more than one argument, they are separated by commas. If there
+ are no arguments, you can omit the parentheses, but it is a good idea to
+ include them anyway, to clearly indicate that a function call was
+ intended. Here are some examples:
+
+
+
+
+ sqrt (x^2 + y^2) # One argument
+ ones (n, m) # Two arguments
+ rand () # No arguments
+
+
+
+ Each function expects a particular number of arguments. For example, the
+ sqrt
function must be called with a single argument, the number
+ to take the square root of:
+
+
+
+
+ sqrt (argument)
+
+
+
+ Some of the built-in functions take a variable number of arguments,
+ depending on the particular usage, and their behavior is different
+ depending on the number of arguments supplied.
+
+
+
+ Like every other expression, the function call has a value, which is
+ computed by the function based on the arguments you give it. In this
+ example, the value of sqrt (argument)
is the square root of
+ the argument. A function can also have side effects, such as assigning
+ the values of certain variables or doing input or output operations.
+
+
+
+ Unlike most languages, functions in Octave may return multiple values.
+ For example, the following statement
+
+
+
+
+ [u, s, v] = svd (a)
+
+
+
+ computes the singular value decomposition of the matrix a
and
+ assigns the three result matrices to u
, s
, and v
.
+
+
+
+ The left side of a multiple assignment expression is itself a list of
+ expressions, and is allowed to be a list of variable names or index
+ expressions. See also section Index Expressions, and section Assignment Expressions.
+
+
+
+
+
+
+
+
+ In Octave, unlike Fortran, function arguments are passed by value, which
+ means that each argument in a function call is evaluated and assigned to
+ a temporary location in memory before being passed to the function.
+ There is currently no way to specify that a function parameter should be
+ passed by reference instead of by value. This means that it is
+ impossible to directly alter the value of function parameter in the
+ calling function. It can only change the local copy within the function
+ body. For example, the function
+
+
+
+
+ function f (x, n)
+ while (n-- > 0)
+ disp (x);
+ endwhile
+ endfunction
+
+
+
+ displays the value of the first argument n times. In this
+ function, the variable n is used as a temporary variable without
+ having to worry that its value might also change in the calling
+ function. Call by value is also useful because it is always possible to
+ pass constants for any function parameter without first having to
+ determine that the function will not attempt to modify the parameter.
+
+
+
+ The caller may use a variable as the expression for the argument, but
+ the called function does not know this: it only knows what value the
+ argument had. For example, given a function called as
+
+
+
+
+ foo = "bar";
+ fcn (foo)
+
+
+
+ you should not think of the argument as being "the variable
+ foo
." Instead, think of the argument as the string value,
+ "bar"
.
+
+
+
+ Even though Octave uses pass-by-value semantics for function arguments,
+ values are not copied unnecessarily. For example,
+
+
+
+
+ x = rand (1000);
+ f (x);
+
+
+
+ does not actually force two 1000 by 1000 element matrices to exist
+ unless the function f
modifies the value of its
+ argument. Then Octave must create a copy to avoid changing the
+ value outside the scope of the function f
, or attempting (and
+ probably failing!) to modify the value of a constant or the value of a
+ temporary result.
+
+
+
+
+
+
+
+
+
+
+ With some restrictions(2), recursive function calls are allowed. A
+ recursive function is one which calls itself, either directly or
+ indirectly. For example, here is an inefficient(3) way to compute the factorial of a given integer:
+
+
+
+
+ function retval = fact (n)
+ if (n > 0)
+ retval = n * fact (n-1);
+ else
+ retval = 1;
+ endif
+ endfunction
+
+
+
+ This function is recursive because it calls itself directly. It
+ eventually terminates because each time it calls itself, it uses an
+ argument that is one less than was used for the previous call. Once the
+ argument is no longer greater than zero, it does not call itself, and
+ the recursion ends.
+
+
+
+ The built-in variable max_recursion_depth
specifies a limit to
+ the recursion depth and prevents Octave from recursing infinitely.
+
+
+
+
+ - max_recursion_depth:
+
-
+ Limit the number of times a function may be called recursively.
+ If the limit is exceeded, an error message is printed and control
+ returns to the top level.
+
+
+
+ The default value is 256.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The following arithmetic operators are available, and work on scalars
+ and matrices.
+
+
+
+
+ x + y
+ -
+
+ Addition. If both operands are matrices, the number of rows and columns
+ must both agree. If one operand is a scalar, its value is added to
+ all the elements of the other operand.
+
+
x .+ y
+ -
+
+ Element by element addition. This operator is equivalent to
+
.
+
+ x - y
+ -
+
+ Subtraction. If both operands are matrices, the number of rows and
+ columns of both must agree.
+
+
x .- y
+ -
+ Element by element subtraction. This operator is equivalent to
-
.
+
+ x * y
+ -
+
+ Matrix multiplication. The number of columns of x must agree
+ with the number of rows of y.
+
+
x .* y
+ -
+
+ Element by element multiplication. If both operands are matrices, the
+ number of rows and columns must both agree.
+
+
x / y
+ -
+
+ Right division. This is conceptually equivalent to the expression
+
+
+
+ (inverse (y') * x')'
+
+
+ but it is computed without forming the inverse of y'.
+
+ If the system is not square, or if the coefficient matrix is singular,
+ a minimum norm solution is computed.
+
+ x ./ y
+ -
+
+ Element by element right division.
+
+
x \ y
+ -
+
+ Left division. This is conceptually equivalent to the expression
+
+
+
+ inverse (x) * y
+
+
+ but it is computed without forming the inverse of x.
+
+ If the system is not square, or if the coefficient matrix is singular,
+ a minimum norm solution is computed.
+
+ x .\ y
+ -
+
+ Element by element left division. Each element of y is divided
+ by each corresponding element of x.
+
+
x ^ y
+ -
+
x ** y
+ -
+
+
+ Power operator. If x and y are both scalars, this operator
+ returns x raised to the power y. If x is a scalar and
+ y is a square matrix, the result is computed using an eigenvalue
+ expansion. If x is a square matrix. the result is computed by
+ repeated multiplication if y is an integer, and by an eigenvalue
+ expansion if y is not an integer. An error results if both
+ x and y are matrices.
+
+ The implementation of this operator needs to be improved.
+
+
x .^ y
+ -
+
x .** y
+ -
+
+
+ Element by element power operator. If both operands are matrices, the
+ number of rows and columns must both agree.
+
+
-x
+ -
+
+ Negation.
+
+
+x
+ -
+
+ Unary plus. This operator has no effect on the operand.
+
+
x'
+ -
+
+ Complex conjugate transpose. For real arguments, this operator is the
+ same as the transpose operator. For complex arguments, this operator is
+ equivalent to the expression
+
+
+
+ conj (x.')
+
+
+ x.'
+ -
+
+ Transpose.
+
+
+
+ Note that because Octave's element by element operators begin with a
+ `.', there is a possible ambiguity for statements like
+
+
+
+
+ 1./m
+
+
+
+ because the period could be interpreted either as part of the constant
+ or as part of the operator. To resolve this conflict, Octave treats the
+ expression as if you had typed
+
+
+
+
+ (1) ./ m
+
+
+
+ and not
+
+
+
+
+ (1.) / m
+
+
+
+ Although this is inconsistent with the normal behavior of Octave's
+ lexer, which usually prefers to break the input into tokens by
+ preferring the longest possible match at any given point, it is more
+ useful in this case.
+
+
+
+
+ - Built-in Variable: warn_divide_by_zero
+
-
+ If the value of
warn_divide_by_zero
is nonzero, a warning
+ is issued when Octave encounters a division by zero. If the value is
+ 0, the warning is omitted. The default value is 1.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Comparison operators compare numeric values for relationships
+ such as equality. They are written using
+ relational operators.
+
+
+
+ All of Octave's comparison operators return a value of 1 if the
+ comparison is true, or 0 if it is false. For matrix values, they all
+ work on an element-by-element basis. For example,
+
+
+
+
+ [1, 2; 3, 4] == [1, 3; 2, 4]
+ => 1 0
+ 0 1
+
+
+
+ If one operand is a scalar and the other is a matrix, the scalar is
+ compared to each element of the matrix in turn, and the result is the
+ same size as the matrix.
+
+
+
+
+ x < y
+ -
+
+ True if x is less than y.
+
+
x <= y
+ -
+
+ True if x is less than or equal to y.
+
+
x == y
+ -
+
+ True if x is equal to y.
+
+
x >= y
+ -
+
+ True if x is greater than or equal to y.
+
+
x > y
+ -
+
+ True if x is greater than y.
+
+
x != y
+ -
+
x ~= y
+ -
+
x <> y
+ -
+
+
+
+ True if x is not equal to y.
+
+
+
+ String comparisons may also be performed with the strcmp
+ function, not with the comparison operators listed above.
+ See section Strings.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An element-by-element boolean expression is a combination of
+ comparison expressions using the boolean
+ operators "or" (`|'), "and" (`&'), and "not" (`!'),
+ along with parentheses to control nesting. The truth of the boolean
+ expression is computed by combining the truth values of the
+ corresponding elements of the component expressions. A value is
+ considered to be false if it is zero, and true otherwise.
+
+
+
+ Element-by-element boolean expressions can be used wherever comparison
+ expressions can be used. They can be used in if
and while
+ statements. However, if a matrix value used as the condition in an
+ if
or while
statement is only true if all of its
+ elements are nonzero.
+
+
+
+ Like comparison operations, each element of an element-by-element
+ boolean expression also has a numeric value (1 if true, 0 if false) that
+ comes into play if the result of the boolean expression is stored in a
+ variable, or used in arithmetic.
+
+
+
+ Here are descriptions of the three element-by-element boolean operators.
+
+
+
+
+ boolean1 & boolean2
+ -
+
+ Elements of the result are true if both corresponding elements of
+ boolean1 and boolean2 are true.
+
+
boolean1 | boolean2
+ -
+
+ Elements of the result are true if either of the corresponding elements
+ of boolean1 or boolean2 is true.
+
+
! boolean
+ -
+
~ boolean
+ -
+
+
+ Each element of the result is true if the corresponding element of
+ boolean is false.
+
+
+
+ For matrix operands, these operators work on an element-by-element
+ basis. For example, the expression
+
+
+
+
+ [1, 0; 0, 1] & [1, 0; 2, 3]
+
+
+
+ returns a two by two identity matrix.
+
+
+
+ For the binary operators, the dimensions of the operands must conform if
+ both are matrices. If one of the operands is a scalar and the other a
+ matrix, the operator is applied to the scalar and each element of the
+ matrix.
+
+
+
+ For the binary element-by-element boolean operators, both subexpressions
+ boolean1 and boolean2 are evaluated before computing the
+ result. This can make a difference when the expressions have side
+ effects. For example, in the expression
+
+
+
+
+ a & b++
+
+
+
+ the value of the variable b is incremented even if the variable
+ a is zero.
+
+
+
+ This behavior is necessary for the boolean operators to work as
+ described for matrix-valued operands.
+
+
+
+
+
+
+
+
+
+
+ Combined with the implicit conversion to scalar values in if
and
+ while
conditions, Octave's element-by-element boolean operators
+ are often sufficient for performing most logical operations. However,
+ it is sometimes desirable to stop evaluating a boolean expression as
+ soon as the overall truth value can be determined. Octave's
+ short-circuit boolean operators work this way.
+
+
+
+
+ boolean1 && boolean2
+ -
+
+ The expression boolean1 is evaluated and converted to a scalar
+ using the equivalent of the operation
all (all (boolean1))
.
+ If it is false, the result of the overall expression is 0. If it is
+ true, the expression boolean2 is evaluated and converted to a
+ scalar using the equivalent of the operation all (all
+ (boolean1))
. If it is true, the result of the overall expression
+ is 1. Otherwise, the result of the overall expression is 0.
+
+ boolean1 || boolean2
+ -
+
+ The expression boolean1 is evaluated and converted to a scalar
+ using the equivalent of the operation
all (all (boolean1))
.
+ If it is true, the result of the overall expression is 1. If it is
+ false, the expression boolean2 is evaluated and converted to a
+ scalar using the equivalent of the operation all (all
+ (boolean1))
. If it is true, the result of the overall expression
+ is 1. Otherwise, the result of the overall expression is 0.
+
+
+
+ The fact that both operands may not be evaluated before determining the
+ overall truth value of the expression can be important. For example, in
+ the expression
+
+
+
+
+ a && b++
+
+
+
+ the value of the variable b is only incremented if the variable
+ a is nonzero.
+
+
+
+ This can be used to write somewhat more concise code. For example, it
+ is possible write
+
+
+
+
+ function f (a, b, c)
+ if (nargin > 2 && isstr (c))
+ ...
+
+
+
+ instead of having to use two if
statements to avoid attempting to
+ evaluate an argument that doesn't exist. For example, without the
+ short-circuit feature, it would be necessary to write
+
+
+
+
+ function f (a, b, c)
+ if (nargin > 2)
+ if (isstr (c))
+ ...
+
+
+
+ Writing
+
+
+
+
+ function f (a, b, c)
+ if (nargin > 2 & isstr (c))
+ ...
+
+
+
+ would result in an error if f
were called with one or two
+ arguments because Octave would be forced to try to evaluate both of the
+ operands for the operator `&'.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An assignment is an expression that stores a new value into a
+ variable. For example, the following expression assigns the value 1 to
+ the variable z
:
+
+
+
+
+ z = 1
+
+
+
+ After this expression is executed, the variable z
has the value 1.
+ Whatever old value z
had before the assignment is forgotten.
+ The `=' sign is called an assignment operator.
+
+
+
+ Assignments can store string values also. For example, the following
+ expression would store the value "this food is good"
in the
+ variable message
:
+
+
+
+
+ thing = "food"
+ predicate = "good"
+ message = [ "this " , thing , " is " , predicate ]
+
+
+
+ (This also illustrates concatenation of strings.)
+
+
+
+
+ Most operators (addition, concatenation, and so on) have no effect
+ except to compute a value. If you ignore the value, you might as well
+ not use the operator. An assignment operator is different. It does
+ produce a value, but even if you ignore the value, the assignment still
+ makes itself felt through the alteration of the variable. We call this
+ a side effect.
+
+
+
+
+ The left-hand operand of an assignment need not be a variable
+ (see section Variables). It can also be an element of a matrix
+ (see section Index Expressions) or a list of return values
+ (see section Calling Functions). These are all called lvalues, which
+ means they can appear on the left-hand side of an assignment operator.
+ The right-hand operand may be any expression. It produces the new value
+ which the assignment stores in the specified variable, matrix element,
+ or list of return values.
+
+
+
+ It is important to note that variables do not have permanent types.
+ The type of a variable is simply the type of whatever value it happens
+ to hold at the moment. In the following program fragment, the variable
+ foo
has a numeric value at first, and a string value later on:
+
+
+
+
+ octave:13> foo = 1
+ foo = 1
+ octave:13> foo = "bar"
+ foo = bar
+
+
+
+ When the second assignment gives foo
a string value, the fact that
+ it previously had a numeric value is forgotten.
+
+
+
+ Assignment of a scalar to an indexed matrix sets all of the elements
+ that are referenced by the indices to the scalar value. For example, if
+ a
is a matrix with at least two columns,
+
+
+
+
+ a(:, 2) = 5
+
+
+
+ sets all the elements in the second column of a
to 5.
+
+
+
+ Assigning an empty matrix `[]' works in most cases to allow you to
+ delete rows or columns of matrices and vectors. See section Empty Matrices.
+ For example, given a 4 by 5 matrix A, the assignment
+
+
+
+
+ A (3, :) = []
+
+
+
+ deletes the third row of A, and the assignment
+
+
+
+
+ A (:, 1:2:5) = []
+
+
+
+ deletes the first, third, and fifth columns.
+
+
+
+ An assignment is an expression, so it has a value. Thus, z = 1
+ as an expression has the value 1. One consequence of this is that you
+ can write multiple assignments together:
+
+
+
+
+ x = y = z = 0
+
+
+
+ stores the value 0 in all three variables. It does this because the
+ value of z = 0
, which is 0, is stored into y
, and then
+ the value of y = z = 0
, which is 0, is stored into x
.
+
+
+
+ This is also true of assignments to lists of values, so the following is
+ a valid expression
+
+
+
+
+ [a, b, c] = [u, s, v] = svd (a)
+
+
+
+ that is exactly equivalent to
+
+
+
+
+ [u, s, v] = svd (a)
+ a = u
+ b = s
+ c = v
+
+
+
+ In expressions like this, the number of values in each part of the
+ expression need not match. For example, the expression
+
+
+
+
+ [a, b, c, d] = [u, s, v] = svd (a)
+
+
+
+ is equivalent to the expression above, except that the value of the
+ variable `d' is left unchanged, and the expression
+
+
+
+
+ [a, b] = [u, s, v] = svd (a)
+
+
+
+ is equivalent to
+
+
+
+
+ [u, s, v] = svd (a)
+ a = u
+ b = s
+
+
+
+ You can use an assignment anywhere an expression is called for. For
+ example, it is valid to write x != (y = 1)
to set y
to 1
+ and then test whether x
equals 1. But this style tends to make
+ programs hard to read. Except in a one-shot program, you should rewrite
+ it to get rid of such nesting of assignments. This is never very hard.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Increment operators increase or decrease the value of a variable
+ by 1. The operator to increment a variable is written as `++'. It
+ may be used to increment a variable either before or after taking its
+ value.
+
+
+
+ For example, to pre-increment the variable x, you would write
+ ++x
. This would add one to x and then return the new
+ value of x as the result of the expression. It is exactly the
+ same as the expression x = x + 1
.
+
+
+
+ To post-increment a variable x, you would write x++
.
+ This adds one to the variable x, but returns the value that
+ x had prior to incrementing it. For example, if x is equal
+ to 2, the result of the expression x++
is 2, and the new
+ value of x is 3.
+
+
+
+ For matrix and vector arguments, the increment and decrement operators
+ work on each element of the operand.
+
+
+
+ Here is a list of all the increment and decrement expressions.
+
+
+
+
+ ++x
+ -
+
+ This expression increments the variable x. The value of the
+ expression is the new value of x. It is equivalent to the
+ expression
x = x + 1
.
+
+ --x
+ -
+
+ This expression decrements the variable x. The value of the
+ expression is the new value of x. It is equivalent to the
+ expression
x = x - 1
.
+
+ x++
+ -
+
+ This expression causes the variable x to be incremented. The
+ value of the expression is the old value of x.
+
+
x--
+ -
+
+ This expression causes the variable x to be decremented. The
+ value of the expression is the old value of x.
+
+
+
+ It is not currently possible to increment index expressions. For
+ example, you might expect that the expression v(4)++
would
+ increment the fourth element of the vector v, but instead it
+ results in a parse error. This problem may be fixed in a future
+ release of Octave.
+
+
+
+
+
+
+
+
+
+
+ Operator precedence determines how operators are grouped, when
+ different operators appear close by in one expression. For example,
+ `*' has higher precedence than `+'. Thus, the expression
+ a + b * c
means to multiply b
and c
, and then add
+ a
to the product (i.e., a + (b * c)
).
+
+
+
+ You can overrule the precedence of the operators by using parentheses.
+ You can think of the precedence rules as saying where the parentheses
+ are assumed if you do not write parentheses yourself. In fact, it is
+ wise to use parentheses whenever you have an unusual combination of
+ operators, because other people who read the program may not remember
+ what the precedence is in this case. You might forget as well, and then
+ you too could make a mistake. Explicit parentheses will help prevent
+ any such mistake.
+
+
+
+ When operators of equal precedence are used together, the leftmost
+ operator groups first, except for the assignment and exponentiation
+ operators, which group in the opposite order. Thus, the expression
+ a - b + c
groups as (a - b) + c
, but the expression
+ a = b = c
groups as a = (b = c)
.
+
+
+
+ The precedence of prefix unary operators is important when another
+ operator follows the operand. For example, -x^2
means
+ -(x^2)
, because `-' has lower precedence than `^'.
+
+
+
+ Here is a table of the operators in Octave, in order of increasing
+ precedence.
+
+
+
+
+ statement separators
+ -
+ `;', `,'.
+
+
assignment
+ -
+ `='. This operator groups right to left.
+
+
logical "or" and "and"
+ -
+ `||', `&&'.
+
+
element-wise "or" and "and"
+ -
+ `|', `&'.
+
+
relational
+ -
+ `<', `<=', `==', `>=', `>', `!=',
+ `~=', `<>'.
+
+
colon
+ -
+ `:'.
+
+
add, subtract
+ -
+ `+', `-'.
+
+
multiply, divide
+ -
+ `*', `/', `\', `.\', `.*', `./'.
+
+
transpose
+ -
+ `'', `.''
+
+
unary plus, minus, increment, decrement, and "not"
+ -
+ `+', `-', `++', `--', `!', `~'.
+
+
exponentiation
+ -
+ `^', `**', `.^', `.**'.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_foot.html octave-2.0.14/doc/interpreter/octave_foot.html
*** octave-2.0.13/doc/interpreter/octave_foot.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_foot.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,48 ----
+
+
+
+
+ GNU Octave - Footnotes
+
+
+ GNU Octave
+ A high-level interactive language for numerical computations
+ Edition 3 for Octave version 2.0.13
+ February 1997
+ John W. Eaton
+
+
+
+ The `#!'
+ mechanism works on Unix systems derived from Berkeley Unix, System V
+ Release 4, and some System V Release 3 systems.
+
+ Some of Octave's function are
+ implemented in terms of functions that cannot be called recursively.
+ For example, the ODE solver lsode
is ultimately implemented in a
+ Fortran subroutine that cannot be called recursively, so lsode
+ should not be called either directly or indirectly from within the
+ user-supplied function that lsode
requires. Doing so will result
+ in undefined behavior.
+
+ It would be
+ much better to use prod (1:n)
, or gamma (n+1)
instead,
+ after first checking to ensure that the value n
is actually a
+ positive integer.
+
+ The `.m' suffix was
+ chosen for compatibility with MATLAB.
+
+ Yes, it's a kluge, but it seems to be a
+ reasonably useful one.
+
+ For example, to first sort
+ based on the values in column 1, and then, for any values that are
+ repeated in column 1, sort based on the values found in column 2, etc.
+
+ This document was generated on 9 October 1998 using the
+ texi2html
+ translator version 1.51.
+
+
diff -cNr octave-2.0.13/doc/interpreter/octave_toc.html octave-2.0.14/doc/interpreter/octave_toc.html
*** octave-2.0.13/doc/interpreter/octave_toc.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/interpreter/octave_toc.html Fri Oct 9 00:32:20 1998
***************
*** 0 ****
--- 1,308 ----
+
+
+
+
+ GNU Octave - Table of Contents
+
+
+ GNU Octave
+ A high-level interactive language for numerical computations
+ Edition 3 for Octave version 2.0.13
+ February 1997
+ John W. Eaton
+
+
+
+
+ This document was generated on 9 October 1998 using the
+ texi2html
+ translator version 1.51.
+
+
diff -cNr octave-2.0.13/doc/interpreter/poly.texi octave-2.0.14/doc/interpreter/poly.texi
*** octave-2.0.13/doc/interpreter/poly.texi Wed Sep 10 16:01:56 1997
--- octave-2.0.14/doc/interpreter/poly.texi Thu Sep 3 16:02:02 1998
***************
*** 105,111 ****
coefficients are given by vector @var{c}.
@end deftypefn
! @deftypefn {Function File} {} polyfit (@var{n}, @var{y}, @var{n})
Return the coefficients of a polynomial @var{p}(@var{x}) of degree
@var{n} that minimizes
@iftex
--- 105,111 ----
coefficients are given by vector @var{c}.
@end deftypefn
! @deftypefn {Function File} {[@var{p}, @var{yf}] =} polyfit (@var{x}, @var{y}, @var{n})
Return the coefficients of a polynomial @var{p}(@var{x}) of degree
@var{n} that minimizes
@iftex
***************
*** 121,129 ****
to best fit the data in the least squares sense.
@end deftypefn
@deftypefn {Function File} {} polyinteg (@var{c})
! Return the coefficients of the integral the polynomial whose coefficients
! are represented by the vector @var{c}.
The constant of integration is set to zero.
@end deftypefn
--- 121,132 ----
to best fit the data in the least squares sense.
@end deftypefn
+ If two output arguments are requested, the second contains the values of
+ the polynomial for each value of @var{x}.
+
@deftypefn {Function File} {} polyinteg (@var{c})
! Return the coefficients of the integral of the polynomial whose
! coefficients are represented by the vector @var{c}.
The constant of integration is set to zero.
@end deftypefn
diff -cNr octave-2.0.13/doc/interpreter/preface.texi octave-2.0.14/doc/interpreter/preface.texi
*** octave-2.0.13/doc/interpreter/preface.texi Tue Jan 13 13:22:50 1998
--- octave-2.0.14/doc/interpreter/preface.texi Thu Oct 29 18:52:19 1998
***************
*** 132,138 ****
@code{ferror}.
@item
! Tony Richardson @email{tony@@guts.biomed.uakron.edu} wrote Octave's
image processing functions as well as most of the original polynomial
functions.
--- 132,138 ----
@code{ferror}.
@item
! Tony Richardson @email{arichard@@stark.cc.oh.us} wrote Octave's
image processing functions as well as most of the original polynomial
functions.
diff -cNr octave-2.0.13/doc/interpreter/stmt.texi octave-2.0.14/doc/interpreter/stmt.texi
*** octave-2.0.13/doc/interpreter/stmt.texi Wed Jan 28 22:43:38 1998
--- octave-2.0.14/doc/interpreter/stmt.texi Tue Aug 11 11:32:03 1998
***************
*** 686,692 ****
@group
save_do_fortran_indexing = do_fortran_indexing;
unwind_protect
! do_fortran_indexing = "true";
elt = a (idx)
unwind_protect_cleanup
do_fortran_indexing = save_do_fortran_indexing;
--- 686,692 ----
@group
save_do_fortran_indexing = do_fortran_indexing;
unwind_protect
! do_fortran_indexing = 1;
elt = a (idx)
unwind_protect_cleanup
do_fortran_indexing = save_do_fortran_indexing;
diff -cNr octave-2.0.13/doc/interpreter/struct.texi octave-2.0.14/doc/interpreter/struct.texi
*** octave-2.0.13/doc/interpreter/struct.texi Wed Sep 10 16:01:56 1997
--- octave-2.0.14/doc/interpreter/struct.texi Thu Mar 4 01:57:07 1999
***************
*** 137,143 ****
@example
@group
! octave:2> f (rand (3) + rand (3) * I);
ans =
@{
im =
--- 137,143 ----
@example
@group
! octave:2> f (rand (2) + rand (2) * I);
ans =
@{
im =
diff -cNr octave-2.0.13/doc/interpreter/system.texi octave-2.0.14/doc/interpreter/system.texi
*** octave-2.0.13/doc/interpreter/system.texi Tue Feb 17 12:31:26 1998
--- octave-2.0.14/doc/interpreter/system.texi Mon Oct 12 13:10:41 1998
***************
*** 1023,1034 ****
Return the current working directory.
@end deftypefn
- @defvr {Built-in Variable} PWD
- The current working directory. The value of @code{PWD} is updated each
- time the current working directory is changed with the @samp{cd}
- command.
- @end defvr
-
@deffn {Command} ls options
@deffnx {Command} dir options
List directory contents. For example,
--- 1023,1028 ----
diff -cNr octave-2.0.13/doc/interpreter/var.texi octave-2.0.14/doc/interpreter/var.texi
*** octave-2.0.13/doc/interpreter/var.texi Fri Mar 20 11:46:17 1998
--- octave-2.0.14/doc/interpreter/var.texi Fri Dec 4 17:09:56 1998
***************
*** 41,47 ****
@xref{Assignment Ops, ,Assignment Expressions}.
A number of variables have special built-in meanings. For example,
! @code{PWD} holds the current working directory, and @code{pi} names the
ratio of the circumference of a circle to its diameter. @xref{Summary of
Built-in Variables}, for a list of all the predefined variables. Some
of these built-in symbols are constants and may not be changed. Others
--- 41,47 ----
@xref{Assignment Ops, ,Assignment Expressions}.
A number of variables have special built-in meanings. For example,
! @code{ans} holds the most recently computed result, and @code{pi} names the
ratio of the circumference of a circle to its diameter. @xref{Summary of
Built-in Variables}, for a list of all the predefined variables. Some
of these built-in symbols are constants and may not be changed. Others
***************
*** 315,320 ****
--- 315,325 ----
Octave was compiled (for example, @code{@value{TARGETHOSTTYPE}}).
@vtable @code
+ @item DEFAULT_LOADPATH
+ @xref{Function Files}.
+
+ Default value: @code{".:@var{octave-home}/lib/@var{version}"}.
+
@item EDITOR
@xref{Commands For History}.
***************
*** 338,344 ****
@item LOADPATH
@xref{Function Files}.
! Default value: @code{".:@var{octave-home}/lib/@var{version}"}.
@item OCTAVE_HOME
--- 343,350 ----
@item LOADPATH
@xref{Function Files}.
! Default value: @code{":"}, which tells Octave to use the directories
! specified by the built-in variable @code{DEFAULT_LOADPATH}.
@item OCTAVE_HOME
***************
*** 403,408 ****
--- 409,419 ----
@xref{Index Expressions}.
Default value: 0.
+
+ @item crash_dumps_octave_core
+ @xref{Simple File I/O}.
+
+ Default value: 1.
@item define_all_return_values
@xref{Multiple Return Values}.
diff -cNr octave-2.0.13/doc/liboctave/Makefile.in octave-2.0.14/doc/liboctave/Makefile.in
*** octave-2.0.13/doc/liboctave/Makefile.in Wed Feb 26 12:06:17 1997
--- octave-2.0.14/doc/liboctave/Makefile.in Fri Oct 9 00:30:13 1998
***************
*** 25,31 ****
liboctave.texi matvec.texi nleqn.texi nlfunc.texi ode.texi \
optim.texi preface.texi quad.texi range.texi
! FORMATTED = liboctave.dvi liboctave.ps liboctave.info liboctave.info-[0-9]*
DISTFILES = Makefile.in gpl.texi $(TEXINFO) $(FORMATTED)
--- 25,32 ----
liboctave.texi matvec.texi nleqn.texi nlfunc.texi ode.texi \
optim.texi preface.texi quad.texi range.texi
! FORMATTED = liboctave.dvi liboctave.ps liboctave.info \
! liboctave.info-[0-9]* liboctave_*.html
DISTFILES = Makefile.in gpl.texi $(TEXINFO) $(FORMATTED)
***************
*** 38,44 ****
sed -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp
mv $@.tmp $@
! all: liboctave.info liboctave.dvi liboctave.ps
.PHONY: all
liboctave.info: $(TEXINFO) ../conf.texi
--- 39,45 ----
sed -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp
mv $@.tmp $@
! all: liboctave.info liboctave.dvi liboctave.ps liboctave_toc.html
.PHONY: all
liboctave.info: $(TEXINFO) ../conf.texi
***************
*** 52,57 ****
--- 53,61 ----
liboctave.ps: liboctave.dvi
-dvips -o liboctave.ps liboctave.dvi
+ liboctave_toc.html:
+ -texi2html -split_chapter -I$(srcdir)/.. $(srcdir)/liboctave.texi
+
check:
.PHONY: check
***************
*** 84,91 ****
.PHONY: distclean
maintainer-clean: distclean
! rm -f tags TAGS liboctave.info liboctave.info-* \
! liboctave.dvi liboctave.ps
.PHONY: maintainer-clean
dist: all
--- 88,96 ----
.PHONY: distclean
maintainer-clean: distclean
! rm -f tags TAGS liboctave.info liboctave.info-*
! rm -f liboctave.dvi liboctave.ps
! rm -f liboctave_*.html
.PHONY: maintainer-clean
dist: all
diff -cNr octave-2.0.13/doc/liboctave/array.texi octave-2.0.14/doc/liboctave/array.texi
*** octave-2.0.13/doc/liboctave/array.texi Tue May 20 14:42:48 1997
--- octave-2.0.14/doc/liboctave/array.texi Tue Aug 18 16:49:56 1998
***************
*** 1,4 ****
! @node Arrays, Matrix and Vector @var{Operations}, Introduction, Top
@chapter Arrays
@cindex arrays
--- 1,4 ----
! @node Arrays, Matrix and Vector Operations, Introduction, Top
@chapter Arrays
@cindex arrays
diff -cNr octave-2.0.13/doc/liboctave/factor.texi octave-2.0.14/doc/liboctave/factor.texi
*** octave-2.0.13/doc/liboctave/factor.texi Tue May 20 14:42:48 1997
--- octave-2.0.14/doc/liboctave/factor.texi Tue Aug 18 16:49:56 1998
***************
*** 1,4 ****
! @node Matrix Factorizations, Ranges, Matrix and Vector @var{Operations}, Top
@chapter Matrix Factorizations
@cindex matrix factorizations
@cindex factorizations
--- 1,4 ----
! @node Matrix Factorizations, Ranges, Matrix and Vector Operations, Top
@chapter Matrix Factorizations
@cindex matrix factorizations
@cindex factorizations
diff -cNr octave-2.0.13/doc/liboctave/liboctave.texi octave-2.0.14/doc/liboctave/liboctave.texi
*** octave-2.0.13/doc/liboctave/liboctave.texi Tue May 20 14:42:48 1997
--- octave-2.0.14/doc/liboctave/liboctave.texi Tue Aug 18 16:49:42 1998
***************
*** 98,104 ****
* Copying::
* Introduction::
* Arrays::
! * Matrix and Vector @var{Operations}::
* Matrix Factorizations::
* Ranges::
* Nonlinear Functions::
--- 98,104 ----
* Copying::
* Introduction::
* Arrays::
! * Matrix and Vector Operations::
* Matrix Factorizations::
* Ranges::
* Nonlinear Functions::
diff -cNr octave-2.0.13/doc/liboctave/liboctave_1.html octave-2.0.14/doc/liboctave/liboctave_1.html
*** octave-2.0.13/doc/liboctave/liboctave_1.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_1.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,81 ----
+
+
+
+
+ Octave C++ Classes - Acknowledgements
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+ % Copyright (C) 1996, 1997 John W. Eaton
+ % This is part of the Octave manual.
+ % For copying conditions, see the file gpl.texi.
+
+
+
+ \input texinfo
+
+
+
+
+ @title{Octave C++ Classes}
+ @subtitle{Edition 1.0 for Octave version 2.0.13}
+ @subtitle{September 1993}
+ @author{John W. Eaton}
+ Copyright (C) 1996, 1997 John W. Eaton.
+
+
+
+ This is the first edition of the documentation for Octave's C++ classes,
+ and is consistent with version 2.0.13 of Octave.
+
+
+
+ Permission is granted to make and distribute verbatim copies of
+ this manual provided the copyright notice and this permission notice
+ are preserved on all copies.
+
+
+
+ Permission is granted to copy and distribute modified versions of this
+ manual under the conditions for verbatim copying, provided that the entire
+ resulting derived work is distributed under the terms of a permission
+ notice identical to this one.
+
+
+
+ Permission is granted to copy and distribute translations of this manual
+ into another language, under the same conditions as for modified versions.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ In addition to John W. Eaton, several people have written parts
+ of liboctave. (This has been removed because it is the same as what is
+ in the Octave manual.)
+
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_10.html octave-2.0.14/doc/liboctave/liboctave_10.html
*** octave-2.0.13/doc/liboctave/liboctave_10.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_10.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,427 ----
+
+
+
+
+ Octave C++ Classes - Optimization
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - : {}Objective (void)
+
-
+
- : {}Objective (const objective_fcn)
+
-
+
- : {}Objective (const objective_fcn, const gradient_fcn)
+
-
+
- : {}Objective (const Objective &a)
+
-
+
+
+
+
+
+ - : Objective& operator = (const Objective &a)
+
-
+
+
+
+
+
+ - : objective_fcn objective_function (void) const;
+
-
+
+
+
+
+
+ - : Objective& set_objective_function (const objective_fcn)
+
-
+
+
+
+
+
+ - : gradient_fcn gradient_function (void) const;
+
-
+
+
+
+
+
+ - : Objective& set_gradient_function (const gradient_fcn)
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - : {}Bounds (void)
+
-
+
- : {}Bounds (int n)
+
-
+
- : {}Bounds (const ColumnVector lb, const ColumnVector ub)
+
-
+
- : {}Bounds (const Bounds &a)
+
-
+
+
+
+
+
+ - : Bounds& operator = (const Bounds &a)
+
-
+
+
+
+
+
+ - : Bounds& resize (int n)
+
-
+
+
+
+
+
+ - : double lower_bound (int index) const;
+
-
+
- : double upper_bound (int index) const;
+
-
+
+
+
+
+
+ - : ColumnVector lower_bounds (void) const;
+
-
+
- : ColumnVector upper_bounds (void) const;
+
-
+
+
+
+
+
+ - : int size (void) const;
+
-
+
+
+
+
+
+ - : Bounds& set_bound (int index, double low, double high)
+
-
+
+
+
+
+
+ - : Bounds& set_bounds (double low, double high)
+
-
+
- : Bounds& set_bounds (const ColumnVector lb, const ColumnVector ub)
+
-
+
+
+
+
+
+ - : Bounds& set_lower_bound (int index, double low)
+
-
+
- : Bounds& set_upper_bound (int index, double high)
+
-
+
+
+
+
+
+ - : Bounds& set_lower_bounds (double low)
+
-
+
- : Bounds& set_upper_bounds (double high)
+
-
+
+
+
+
+
+ - : Bounds& set_lower_bounds (const ColumnVector lb)
+
-
+
- : Bounds& set_upper_bounds (const ColumnVector ub)
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const Bounds &b)
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - : {}LinConst (void)
+
-
+
- : {}LinConst (int nclin, int nx)
+
-
+
- : {}LinConst (int nclin_eq, int nclin_ineq, int nx)
+
-
+
- : {}LinConst (const ColumnVector &lb, const Matrix &A, const ColumnVector &ub)
+
-
+
- : {}LinConst (const Matrix &A_eq, const ColumnVector &b_eq, const Matrix &A_ineq, const ColumnVector &b_ineq)
+
-
+
- : {}LinConst (const LinConst &a)
+
-
+
+
+
+
+
+ - : LinConst& operator = (const LinConst &a)
+
-
+
+
+
+
+
+ - : LinConst& resize (int nclin, int n)
+
-
+
+
+
+
+
+ - : Matrix constraint_matrix (void) const;
+
-
+
+
+
+
+
+ - : LinConst& set_constraint_matrix (const Matrix &A)
+
-
+
+
+
+
+
+ - : Matrix eq_constraint_matrix (void) const;
+
-
+
- : Matrix ineq_constraint_matrix (void) const;
+
-
+
+
+
+
+
+ - : ColumnVector eq_constraint_vector (void) const;
+
-
+
- : ColumnVector ineq_constraint_vector (void) const;
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const LinConst &b)
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - : {}NLConst (void)
+
-
+
- : {}NLConst (int n)
+
-
+
- : {}NLConst (const ColumnVector lb, const NLFunc f, const ColumnVector ub)
+
-
+
- : {}NLConst (const NLConst &a)
+
-
+
+
+
+
+
+ - : NLConst& operator = (const NLConst &a)
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - : {}QP (void)
+
-
+
- : {}QP (const ColumnVector &x, const Matrix &H)
+
-
+
- : {}QP (const ColumnVector &x, const Matrix &H, const ColumnVector &c)
+
-
+
- : {}QP (const ColumnVector &x, const Matrix &H, const Bounds &b)
+
-
+
- : {}QP (const ColumnVector &x, const Matrix &H, const LinConst &lc)
+
-
+
- : {}QP (const ColumnVector &x, const Matrix &H, const ColumnVector &c, const Bounds &b)
+
-
+
- : {}QP (const ColumnVector &x, const Matrix &H, const ColumnVector &c, const LinConst &lc)
+
-
+
- : {}QP (const ColumnVector &x, const Matrix &H, const Bounds &b, const LinConst &lc)
+
-
+
- : {}QP (const ColumnVector &x, const Matrix &H, const ColumnVector &c, const Bounds &b, const LinConst &lc)
+
-
+
+
+
+
+
+ - : virtual ColumnVector minimize (void)
+
-
+
- : virtual ColumnVector minimize (double &objf)
+
-
+
- : virtual ColumnVector minimize (double &objf, int &inform)
+
-
+
- : virtual ColumnVector minimize (double &objf, int &inform, ColumnVector &lambda) = 0;
+
-
+
+
+
+
+
+ - : virtual ColumnVector minimize (const ColumnVector &x)
+
-
+
- : virtual ColumnVector minimize (const ColumnVector &x, double &objf)
+
-
+
- : virtual ColumnVector minimize (const ColumnVector &x, double &objf, int &inform)
+
-
+
- : virtual ColumnVector minimize (const ColumnVector &x, double &objf, int &inform, ColumnVector &lambda)
+
-
+
+
+
+
+
+ - : ColumnVector minimize (double &objf, int &inform, ColumnVector &lambda)
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - : {}NLP (void)
+
-
+
- : {}NLP (const ColumnVector &x, const Objective &phi)
+
-
+
- : {}NLP (const ColumnVector &x, const Objective &phi, const Bounds &b)
+
-
+
- : {}NLP (const ColumnVector &x, const Objective &phi, const Bounds &b, const LinConst &lc)
+
-
+
- : {}NLP (const ColumnVector &x, const Objective &phi, const Bounds &b, const LinConst &lc, const NLConst &nlc)
+
-
+
- : {}NLP (const ColumnVector &x, const Objective &phi, const LinConst &lc)
+
-
+
- : {}NLP (const ColumnVector &x, const Objective &phi, const LinConst &lc, const NLConst &nlc)
+
-
+
- : {}NLP (const ColumnVector &x, const Objective &phi, const NLConst &nlc)
+
-
+
- : {}NLP (const ColumnVector &x, const Objective &phi, const Bounds &b, const NLConst &nlc)
+
-
+
+
+
+
+
+ - : NLP& operator = (const NLP &a)
+
-
+
+
+
+
+
+ - : int size (void) const
+
-
+
+
+
+
+
+ - : ColumnVector minimize (void)
+
-
+
- : ColumnVector minimize (double &objf)
+
-
+
- : ColumnVector minimize (double &objf, int &inform)
+
-
+
- : ColumnVector minimize (double &objf, int &inform, ColumnVector &lambda)
+
-
+
+
+
+
+
+ - : ColumnVector minimize (const ColumnVector &x)
+
-
+
- : ColumnVector minimize (const ColumnVector &x, double &objf)
+
-
+
- : ColumnVector minimize (const ColumnVector &x, double &objf, int &inform)
+
-
+
- : ColumnVector minimize (const ColumnVector &x, double &objf, int &inform, ColumnVector &lambda)
+
-
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_11.html octave-2.0.14/doc/liboctave/liboctave_11.html
*** octave-2.0.13/doc/liboctave/liboctave_11.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_11.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,274 ----
+
+
+
+
+ Octave C++ Classes - Quadrature
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+
+ - : {}Quad (integrand_fcn fcn)
+
-
+
- : {}Quad (integrand_fcn fcn, double abs, double rel)
+
-
+
+
+
+
+
+ - : virtual double integrate (void)
+
-
+
- : virtual double integrate (int &ier)
+
-
+
- : virtual double integrate (int &ier, int &neval)
+
-
+
- : virtual double integrate (int &ier, int &neval, double &abserr) = 0
+
-
+
+
+
+
+
+ - : Quad_options (void)
+
-
+
- : Quad_options (const Quad_options &opt)
+
-
+
+
+
+
+
+ - : Quad_options& operator = (const Quad_options &opt)
+
-
+
+
+
+
+
+ - : void init (void)
+
-
+
+
+
+
+
+ - : void copy (const Quad_options &opt)
+
-
+
+
+
+
+
+ - : void set_default_options (void)
+
-
+
+
+
+
+
+ - : void set_absolute_tolerance (double val)
+
-
+
+
+
+
+
+ - : void set_relative_tolerance (double val)
+
-
+
+
+
+
+
+ - : double absolute_tolerance (void)
+
-
+
- : double relative_tolerance (void)
+
-
+
+
+
+
+
+ - : {}DefQuad (integrand_fcn fcn)
+
-
+
- : {}DefQuad (integrand_fcn fcn, double ll, double ul)
+
-
+
- : {}DefQuad (integrand_fcn fcn, double ll, double ul, double abs, double rel)
+
-
+
- : {}DefQuad (integrand_fcn fcn, double ll, double ul, const ColumnVector &sing)
+
-
+
- : {}DefQuad (integrand_fcn fcn, const ColumnVector &sing, double abs, double rel)
+
-
+
- : {}DefQuad (integrand_fcn fcn, const ColumnVector &sing)
+
-
+
- : {}DefQuad (integrand_fcn fcn, double ll, double ul, const ColumnVector &sing, double abs, double rel)
+
-
+
+
+
+
+
+ - : {}IndefQuad (integrand_fcn fcn)
+
-
+
- : {}IndefQuad (integrand_fcn fcn, double b, IntegralType t)
+
-
+
- : {}IndefQuad (integrand_fcn fcn, double b, IntegralType t, double abs, double rel)
+
-
+
- : {}IndefQuad (integrand_fcn fcn, double abs, double rel)
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - : {}CollocWt (void)
+
-
+
- : {}CollocWt (int n, int inc_l, int inc_r)
+
-
+
- : {}CollocWt (int n, int inc_l, int inc_r, double l, double r)
+
-
+
- : {}CollocWt (int n, double a, double b, int inc_l, int inc_r)
+
-
+
- : {}CollocWt (int n, int inc_l, int inc_r, double l, double r)
+
-
+
- : {}CollocWt (const CollocWt&)
+
-
+
+
+
+
+
+ - : CollocWt& operator = (const CollocWt&)
+
-
+
+
+
+
+
+ - : CollocWt& resize (int ncol)
+
-
+
+
+
+
+
+ - : CollocWt& add_left (void)
+
-
+
- : CollocWt& add_right (void)
+
-
+
+
+
+
+
+ - : CollocWt& delete_left (void)
+
-
+
- : CollocWt& delete_right (void)
+
-
+
+
+
+
+
+ - : CollocWt& set_left (double val)
+
-
+
- : CollocWt& set_right (double val)
+
-
+
+
+
+
+
+ - : CollocWt& set_alpha (double val)
+
-
+
- : CollocWt& set_beta (double val)
+
-
+
+
+
+
+
+ - : int ncol (void) const
+
-
+
+
+
+
+
+ - : int left_included (void) const
+
-
+
- : int right_included (void) const
+
-
+
+
+
+
+
+ - : double left (void) const
+
-
+
- : double right (void) const
+
-
+
- : double width (void) const
+
-
+
+
+
+
+
+ - : double alpha (void) const
+
-
+
- : double beta (void) const
+
-
+
+
+
+
+
+ - : ColumnVector roots (void)
+
-
+
- : ColumnVector quad (void)
+
-
+
- : ColumnVector quad_weights (void)
+
-
+
+
+
+
+
+ - : Matrix first (void)
+
-
+
- : Matrix second (void)
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const CollocWt &c)
+
-
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_12.html octave-2.0.14/doc/liboctave/liboctave_12.html
*** octave-2.0.13/doc/liboctave/liboctave_12.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_12.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,189 ----
+
+
+
+
+ Octave C++ Classes - Ordinary Differential Equations
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ - : {}ODE_options (void)
+
-
+
- : {}ODE_options (const ODE_options &opt)
+
-
+
+
+
+
+
+ - : ODE_options& operator = (const ODE_options &opt)
+
-
+
+
+
+
+
+ - : void init (void)
+
-
+
+
+
+
+
+ - : void copy (const ODE_options &opt)
+
-
+
+
+
+
+
+ - : void set_default_options (void)
+
-
+
+
+
+
+
+ - : void set_absolute_tolerance (double val)
+
-
+
+
+
+
+
+ - : void set_initial_step_size (double val)
+
-
+
+
+
+
+
+ - : void set_maximum_step_size (double val)
+
-
+
+
+
+
+
+ - : void set_minimum_step_size (double val)
+
-
+
+
+
+
+
+ - : void set_relative_tolerance (double val)
+
-
+
+
+
+
+
+ - : double absolute_tolerance (void)
+
-
+
- : double initial_step_size (void)
+
-
+
- : double maximum_step_size (void)
+
-
+
- : double minimum_step_size (void)
+
-
+
- : double relative_tolerance (void)
+
-
+
+
+
+
+
+ - : {}ODE (void)
+
-
+
- : {}ODE (int n)
+
-
+
- : {}ODE (const ColumnVector &state, double time, const ODEFunc &f)
+
-
+
+
+
+
+
+ - : virtual int size (void) const
+
-
+
+
+
+
+
+ - : virtual ColumnVector state (void) const
+
-
+
+
+
+
+
+ - : virtual double time (void) const
+
-
+
+
+
+
+
+ - : virtual void force_restart (void)
+
-
+
+
+
+
+
+ - : virtual void initialize (const ColumnVector &x, double t)
+
-
+
+
+
+
+
+ - : virtual void set_stop_time (double t)
+
-
+
+
+
+
+
+ - : virtual void clear_stop_time (void)
+
-
+
+
+
+
+
+ - : virtual ColumnVector integrate (double t)
+
-
+
+
+
+
+
+ - : void integrate (int nsteps, double tstep, ostream &s)
+
-
+
+
+
+
+
+ - : Matrix integrate (const ColumnVector &tout)
+
-
+
- : Matrix integrate (const ColumnVector &tout, const ColumnVector &tcrit)
+
-
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_13.html octave-2.0.14/doc/liboctave/liboctave_13.html
*** octave-2.0.13/doc/liboctave/liboctave_13.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_13.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,64 ----
+
+
+
+
+ Octave C++ Classes - Differential Algebraic Equations
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ - : {}DAE (void)
+
-
+
- : {}DAE (int n)
+
-
+
- : {}DAE (const ColumnVector &x, double time, DAEFunc &f)
+
-
+
- : {}DAE (const ColumnVector &x, ColumnVector &xdot, double time, DAEFunc &f)
+
-
+
+
+
+
+
+ - : ColumnVector deriv (void)
+
-
+
+
+
+
+
+ - : virtual void initialize (const ColumnVector &x, double t)
+
-
+
- : virtual void initialize (const ColumnVector &x, ColumnVector &xdot, double t)
+
-
+
+
+
+
+
+ - : ColumnVector integrate (double t)
+
-
+
+
+
+
+
+ - : Matrix integrate (const ColumnVector &tout, Matrix &xdot_out)
+
-
+
- : Matrix integrate (const ColumnVector &tout, Matrix &xdot_out, const ColumnVector &tcrit)
+
-
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_14.html octave-2.0.14/doc/liboctave/liboctave_14.html
*** octave-2.0.13/doc/liboctave/liboctave_14.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_14.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,18 ----
+
+
+
+
+ Octave C++ Classes - Error Handling
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_15.html octave-2.0.14/doc/liboctave/liboctave_15.html
*** octave-2.0.13/doc/liboctave/liboctave_15.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_15.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,19 ----
+
+
+
+
+ Octave C++ Classes - Installation
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_16.html octave-2.0.14/doc/liboctave/liboctave_16.html
*** octave-2.0.13/doc/liboctave/liboctave_16.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_16.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,22 ----
+
+
+
+
+ Octave C++ Classes - Bugs
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_17.html octave-2.0.14/doc/liboctave/liboctave_17.html
*** octave-2.0.13/doc/liboctave/liboctave_17.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_17.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,101 ----
+
+
+
+
+ Octave C++ Classes - Concept Index
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
a
+
+ acknowledgements
+ arrays
+
+ b
+
+ bounds
+ bugs, known
+
+ c
+
+ collocation weights
+ contributors
+ copyright
+
+ d
+
+ DAE
+
+ f
+
+ factorizations
+
+ i
+
+ installation
+ installation trouble
+ integration
+ introduction
+
+ k
+
+ known causes of trouble
+
+ l
+
+ linear Constraints
+
+ m
+
+ matrix factorizations
+ matrix manipulations
+
+ n
+
+ NLP
+ nonlinear Constraints
+ nonlinear equations
+ nonlinear functions
+ nonlinear programming
+ numerical integration
+
+ o
+
+ objective functions
+ ODE
+ optimization
+ orthogonal collocation
+
+ q
+
+ QP
+ quadratic programming
+ quadrature
+
+ r
+
+ ranges
+
+ t
+
+ troubleshooting
+
+ v
+
+ vector manipulations
+
+ w
+
+ warranty
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_18.html octave-2.0.14/doc/liboctave/liboctave_18.html
*** octave-2.0.13/doc/liboctave/liboctave_18.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_18.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,275 ----
+
+
+
+
+ Octave C++ Classes - Function Index
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
(
+
+ (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const, (const
+ (double, (double
+ (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int, (int
+ (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn, (integrand_fcn
+ (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void), (void)
+
+ a
+
+ absolute_tolerance, absolute_tolerance
+ add_left
+ add_right
+ all, all
+ alpha
+ any, any
+ append, append, append, append, append, append, append, append, append, append, append, append, append, append, append
+ Array2, Array2, Array2, Array2, Array2
+ Array<T>::Array, Array<T>::Array, Array<T>::Array
+ Array<T>::capacity
+ Array<T>::checkelem, Array<T>::checkelem
+ Array<T>::data
+ Array<T>::elem, Array<T>::elem
+ Array<T>::length
+ Array<T>::operator
+ Array<T>::operator ()
+ Array<T>::operator =
+ Array<T>::resize
+ Array<T>::xelem, Array<T>::xelem
+
+ b
+
+ balanced_a_matrix
+ balanced_b_matrix
+ balanced_matrix, balanced_matrix
+ balancing_matrix, balancing_matrix
+ base
+ beta
+
+ c
+
+ checkelem, checkelem, checkelem
+ chol_matrix, chol_matrix
+ clear_stop_time
+ coefficient, coefficient
+ cols, cols
+ column, column, column, column, column, column, column, column
+ column_max, column_max
+ column_max_loc, column_max_loc
+ column_min, column_min
+ column_min_loc, column_min_loc
+ columns, columns
+ conj, conj, conj, conj
+ constraint_matrix
+ copy, copy, copy
+ cumprod, cumprod
+ cumsum, cumsum
+
+ d
+
+ delete_left
+ delete_right
+ deriv
+ determinant, determinant, determinant, determinant, determinant, determinant
+ diag, diag, diag, diag, diag, diag, diag, diag
+ dim1, dim1, dim1
+ dim2, dim2, dim2
+ dim3
+
+ e
+
+ eigenvalues
+ eigenvectors
+ elem, elem, elem
+ eq_constraint_matrix
+ eq_constraint_vector
+ exponent, exponent
+ extract, extract, extract, extract, extract, extract, extract, extract
+
+ f
+
+ fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill
+ first
+ force_restart
+ fourier, fourier
+ function
+
+ g
+
+ gradient_function
+
+ h
+
+ hess_matrix, hess_matrix
+
+ i
+
+ ifourier, ifourier
+ imag, imag, imag, imag
+ inc
+ ineq_constraint_matrix
+ ineq_constraint_vector
+ init, init, init
+ initial_step_size
+ initialize, initialize, initialize
+ insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert
+ integrate, integrate, integrate, integrate, integrate, integrate, integrate, integrate, integrate, integrate, integrate
+ inverse, inverse, inverse, inverse, inverse, inverse, inverse, inverse, inverse, inverse
+
+ j
+
+ jacobian_function
+
+ l
+
+ L, L
+ left
+ left_balancing_matrix
+ left_included
+ left_singular_matrix, left_singular_matrix
+ limit
+ lower_bound
+ lower_bounds
+ lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve, lssolve
+
+ m
+
+ map, map, map, map, map, map, map, map, map, map, map, map, map, map, map
+ max, max, max, max, max
+ maximum_step_size
+ min, min, min, min, min
+ minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize, minimize
+ minimum_step_size
+
+ n
+
+ ncol
+ nelem
+
+ o
+
+ objective_function
+ operator !, operator !
+ operator !=, operator !=, operator !=, operator !=, operator !=, operator !=, operator !=, operator !=
+ operator (), operator (), operator ()
+ operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *, operator *
+ operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +, operator +
+ operator +=, operator +=, operator +=, operator +=, operator +=, operator +=, operator +=, operator +=, operator +=, operator +=, operator +=, operator +=, operator +=, operator +=, operator +=
+ operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -, operator -
+ operator -=, operator -=, operator -=, operator -=, operator -=, operator -=, operator -=, operator -=, operator -=, operator -=, operator -=, operator -=, operator -=, operator -=, operator -=
+ operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /, operator /
+ operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<, operator <<
+ operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =, operator =
+ operator ==, operator ==, operator ==, operator ==, operator ==, operator ==, operator ==, operator ==
+ operator >>, operator >>, operator >>
+
+ p
+
+ P, P
+ print_range
+ prod, prod
+ product, product, product, product, product, product, product, product, product, product, product
+
+ q
+
+ Q, Q
+ quad
+ quad_weights
+ quotient, quotient, quotient, quotient, quotient, quotient, quotient, quotient
+
+ r
+
+ R, R
+ real, real, real, real
+ relative_tolerance, relative_tolerance
+ resize, resize, resize, resize, resize, resize, resize, resize, resize, resize
+ right
+ right_balancing_matrix
+ right_included
+ right_singular_matrix, right_singular_matrix
+ roots
+ row, row, row, row, row, row, row, row
+ row_max, row_max
+ row_max_loc, row_max_loc
+ row_min, row_min
+ row_min_loc, row_min_loc
+ rows, rows
+
+ s
+
+ schur_matrix, schur_matrix
+ second
+ set_absolute_tolerance, set_absolute_tolerance
+ set_alpha
+ set_base
+ set_beta
+ set_bound
+ set_bounds, set_bounds
+ set_constraint_matrix
+ set_default_options, set_default_options, set_default_options
+ set_function
+ set_gradient_function
+ set_inc
+ set_initial_step_size
+ set_jacobian_function
+ set_left
+ set_limit
+ set_lower_bound
+ set_lower_bounds, set_lower_bounds
+ set_maximum_step_size
+ set_minimum_step_size
+ set_objective_function
+ set_relative_tolerance, set_relative_tolerance
+ set_right
+ set_states
+ set_stop_time
+ set_tolerance
+ set_upper_bound
+ set_upper_bounds, set_upper_bounds
+ singular_values, singular_values
+ size, size, size, size
+ solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve
+ sort
+ stack, stack, stack, stack, stack, stack, stack, stack, stack, stack, stack, stack, stack, stack, stack
+ state
+ states
+ sum, sum
+ sumsq, sumsq
+
+ t
+
+ time
+ tolerance
+ transpose, transpose, transpose, transpose, transpose, transpose, transpose, transpose
+
+ u
+
+ U, U
+ unitary_hess_matrix, unitary_hess_matrix
+ unitary_matrix, unitary_matrix
+ upper_bound
+ upper_bounds
+
+ v
+
+ value, value
+ value_will_overflow, value_will_overflow
+ value_will_underflow, value_will_underflow
+
+ w
+
+ width
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_2.html octave-2.0.14/doc/liboctave/liboctave_2.html
*** octave-2.0.13/doc/liboctave/liboctave_2.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_2.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,457 ----
+
+
+
+
+ Octave C++ Classes - GNU GENERAL PUBLIC LICENSE
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+ Version 2, June 1991
+
+
+
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+
+
+
+
+
+ The licenses for most software are designed to take away your
+ freedom to share and change it. By contrast, the GNU General Public
+ License is intended to guarantee your freedom to share and change free
+ software--to make sure the software is free for all its users. This
+ General Public License applies to most of the Free Software
+ Foundation's software and to any other program whose authors commit to
+ using it. (Some other Free Software Foundation software is covered by
+ the GNU Library General Public License instead.) You can apply it to
+ your programs, too.
+
+
+
+ When we speak of free software, we are referring to freedom, not
+ price. Our General Public Licenses are designed to make sure that you
+ have the freedom to distribute copies of free software (and charge for
+ this service if you wish), that you receive source code or can get it
+ if you want it, that you can change the software or use pieces of it
+ in new free programs; and that you know you can do these things.
+
+
+
+ To protect your rights, we need to make restrictions that forbid
+ anyone to deny you these rights or to ask you to surrender the rights.
+ These restrictions translate to certain responsibilities for you if you
+ distribute copies of the software, or if you modify it.
+
+
+
+ For example, if you distribute copies of such a program, whether
+ gratis or for a fee, you must give the recipients all the rights that
+ you have. You must make sure that they, too, receive or can get the
+ source code. And you must show them these terms so they know their
+ rights.
+
+
+
+ We protect your rights with two steps: (1) copyright the software, and
+ (2) offer you this license which gives you legal permission to copy,
+ distribute and/or modify the software.
+
+
+
+ Also, for each author's protection and ours, we want to make certain
+ that everyone understands that there is no warranty for this free
+ software. If the software is modified by someone else and passed on, we
+ want its recipients to know that what they have is not the original, so
+ that any problems introduced by others will not reflect on the original
+ authors' reputations.
+
+
+
+ Finally, any free program is threatened constantly by software
+ patents. We wish to avoid the danger that redistributors of a free
+ program will individually obtain patent licenses, in effect making the
+ program proprietary. To prevent this, we have made it clear that any
+ patent must be licensed for everyone's free use or not licensed at all.
+
+
+
+ The precise terms and conditions for copying, distribution and
+ modification follow.
+
+
+
+
+
+
+
+
+ -
+
+ This License applies to any program or other work which contains
+ a notice placed by the copyright holder saying it may be distributed
+ under the terms of this General Public License. The "Program", below,
+ refers to any such program or work, and a "work based on the Program"
+ means either the Program or any derivative work under copyright law:
+ that is to say, a work containing the Program or a portion of it,
+ either verbatim or with modifications and/or translated into another
+ language. (Hereinafter, translation is included without limitation in
+ the term "modification".) Each licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope. The act of
+ running the Program is not restricted, and the output from the Program
+ is covered only if its contents constitute a work based on the
+ Program (independent of having been made by running the Program).
+ Whether that is true depends on what the Program does.
+
+
-
+
+ You may copy and distribute verbatim copies of the Program's
+ source code as you receive it, in any medium, provided that you
+ conspicuously and appropriately publish on each copy an appropriate
+ copyright notice and disclaimer of warranty; keep intact all the
+ notices that refer to this License and to the absence of any warranty;
+ and give any other recipients of the Program a copy of this License
+ along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and
+ you may at your option offer warranty protection in exchange for a fee.
+
+
-
+
+ You may modify your copy or copies of the Program or any portion
+ of it, thus forming a work based on the Program, and copy and
+ distribute such modifications or work under the terms of Section 1
+ above, provided that you also meet all of these conditions:
+
+
+
+ -
+
+ You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+
-
+
+ You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+
-
+
+ If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the Program,
+ and can be reasonably considered independent and separate works in
+ themselves, then this License, and its terms, do not apply to those
+ sections when you distribute them as separate works. But when you
+ distribute the same sections as part of a whole which is a work based
+ on the Program, the distribution of the whole must be on the terms of
+ this License, whose permissions for other licensees extend to the
+ entire whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the Program
+ with the Program (or with a work based on the Program) on a volume of
+ a storage or distribution medium does not bring the other work under
+ the scope of this License.
+
+ -
+
+ You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms of
+ Sections 1 and 2 above provided that you also do one of the following:
+
+
+
+ -
+
+ Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+
-
+
+ Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+
-
+
+ Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+
+ The source code for a work means the preferred form of the work for
+ making modifications to it. For an executable work, complete source
+ code means all the source code for all modules it contains, plus any
+ associated interface definition files, plus the scripts used to
+ control compilation and installation of the executable. However, as a
+ special exception, the source code distributed need not include
+ anything that is normally distributed (in either source or binary
+ form) with the major components (compiler, kernel, and so on) of the
+ operating system on which the executable runs, unless that component
+ itself accompanies the executable.
+
+ If distribution of executable or object code is made by offering
+ access to copy from a designated place, then offering equivalent
+ access to copy the source code from the same place counts as
+ distribution of the source code, even though third parties are not
+ compelled to copy the source along with the object code.
+
+ -
+
+ You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License. Any attempt
+ otherwise to copy, modify, sublicense or distribute the Program is
+ void, and will automatically terminate your rights under this License.
+ However, parties who have received copies, or rights, from you under
+ this License will not have their licenses terminated so long as such
+ parties remain in full compliance.
+
+
-
+
+ You are not required to accept this License, since you have not
+ signed it. However, nothing else grants you permission to modify or
+ distribute the Program or its derivative works. These actions are
+ prohibited by law if you do not accept this License. Therefore, by
+ modifying or distributing the Program (or any work based on the
+ Program), you indicate your acceptance of this License to do so, and
+ all its terms and conditions for copying, distributing or modifying
+ the Program or works based on it.
+
+
-
+
+ Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject to
+ these terms and conditions. You may not impose any further
+ restrictions on the recipients' exercise of the rights granted herein.
+ You are not responsible for enforcing compliance by third parties to
+ this License.
+
+
-
+
+ If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot
+ distribute so as to satisfy simultaneously your obligations under this
+ License and any other pertinent obligations, then as a consequence you
+ may not distribute the Program at all. For example, if a patent
+ license would not permit royalty-free redistribution of the Program by
+ all those who receive copies directly or indirectly through you, then
+ the only way you could satisfy both it and this License would be to
+ refrain entirely from distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under
+ any particular circumstance, the balance of the section is intended to
+ apply and the section as a whole is intended to apply in other
+ circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system, which is
+ implemented by public license practices. Many people have made
+ generous contributions to the wide range of software distributed
+ through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is willing
+ to distribute software through any other system and a licensee cannot
+ impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to
+ be a consequence of the rest of this License.
+
+
-
+
+ If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Program under this License
+ may add an explicit geographical distribution limitation excluding
+ those countries, so that distribution is permitted only in or among
+ countries not thus excluded. In such case, this License incorporates
+ the limitation as if written in the body of this License.
+
+
-
+
+ The Free Software Foundation may publish revised and/or new versions
+ of the General Public License from time to time. Such new versions will
+ be similar in spirit to the present version, but may differ in detail to
+ address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Program
+ specifies a version number of this License which applies to it and "any
+ later version", you have the option of following the terms and conditions
+ either of that version or of any later version published by the Free
+ Software Foundation. If the Program does not specify a version number of
+ this License, you may choose any version ever published by the Free Software
+ Foundation.
+
+
-
+
+ If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the author
+ to ask for permission. For software which is copyrighted by the Free
+ Software Foundation, write to the Free Software Foundation; we sometimes
+ make exceptions for this. Our decision will be guided by the two goals
+ of preserving the free status of all derivatives of our free software and
+ of promoting the sharing and reuse of software generally.
+
+
+
+
NO WARRANTY
+
+ -
+
+ BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+ REPAIR OR CORRECTION.
+
+
-
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES.
+
+
+
+ END OF TERMS AND CONDITIONS
+
+
+
+
+
+
+ If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.
+
+
+
+ To do so, attach the following notices to the program. It is safest
+ to attach them to the start of each source file to most effectively
+ convey the exclusion of warranty; and each file should have at least
+ the "copyright" line and a pointer to where the full notice is found.
+
+
+
+
+ one line to give the program's name and a brief idea of what it does.
+ Copyright (C) 19yy name of author
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+
+ Also add information on how to contact you by electronic and paper mail.
+
+
+
+ If the program is interactive, make it output a short notice like this
+ when it starts in an interactive mode:
+
+
+
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+
+
+ The hypothetical commands `show w' and `show c' should show
+ the appropriate parts of the General Public License. Of course, the
+ commands you use may be called something other than `show w' and
+ `show c'; they could even be mouse-clicks or menu items--whatever
+ suits your program.
+
+
+
+ You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a "copyright disclaimer" for the program, if
+ necessary. Here is a sample; alter the names:
+
+
+
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ signature of Ty Coon, 1 April 1989
+ Ty Coon, President of Vice
+
+
+
+ This General Public License does not permit incorporating your program into
+ proprietary programs. If your program is a subroutine library, you may
+ consider it more useful to permit linking proprietary applications with the
+ library. If this is what you want to do, use the GNU Library General
+ Public License instead of this License.
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_3.html octave-2.0.14/doc/liboctave/liboctave_3.html
*** octave-2.0.13/doc/liboctave/liboctave_3.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_3.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,24 ----
+
+
+
+
+ Octave C++ Classes - A Brief Introduction to Octave
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+ This manual documents how to run, install and port Octave's C++ classes,
+ and how to report bugs.
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_4.html octave-2.0.14/doc/liboctave/liboctave_4.html
*** octave-2.0.13/doc/liboctave/liboctave_4.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_4.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,528 ----
+
+
+
+
+ Octave C++ Classes - Arrays
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Constructor: Array<T>::Array (void)
+
-
+ Create an array with no elements.
+
+
+
+
+
+ - Constructor: Array<T>::Array (int n [, const T &val])
+
-
+ Create an array with n elements. If the optional argument
+ val is supplied, the elements are initialized to val;
+ otherwise, they are left uninitialized. If n is less than zero,
+ the current error handler is invoked (see section Error Handling).
+
+
+
+
+
+ - Constructor: Array<T>::Array (const Array<T> &a)
+
-
+ Create a copy of the Array<T> object a. Memory for the
+ Array<T> class is managed using a reference counting scheme, so
+ the cost of this operation is independent of the size of the array.
+
+
+
+
+
+ - Operator: Array<T>& Array<T>::operator = (const Array<T> &a)
+
-
+ Assignment operator. Memory for the Array<T> class is managed
+ using a reference counting scheme, so the cost of this operation is
+ independent of the size of the array.
+
+
+
+
+
+ - Method: int Array<T>::capacity (void) const
+
-
+
- Method: int Array<T>::length (void) const
+
-
+ Return the length of the array.
+
+
+
+
+
+ - Method: T& Array<T>::elem (int n)
+
-
+
- Method: T& Array<T>::checkelem (int n)
+
-
+
- Method: T& Array<T>::operator () (int n)
+
-
+ If n is within the bounds of the array, return a reference to the
+ element indexed by n; otherwise, the current error handler is
+ invoked (see section Error Handling).
+
+
+
+
+
+ - Method: T Array<T>::elem (int n) const
+
-
+
- Method: T Array<T>::checkelem (int n) const
+
-
+
- Method: T Array<T>::operator () (int n) const
+
-
+ If n is within the bounds of the array, return the value indexed
+ by n; otherwise, call the current error handler.
+ See section Error Handling.
+
+
+
+
+
+ - Method: T& Array<T>::xelem (int n)
+
-
+
- Method: T Array<T>::xelem (int n) const
+
-
+ Return a reference to, or the value of, the element indexed by n.
+ These methods never perform bounds checking.
+
+
+
+
+
+ - Method: void Array<T>::resize (int n [, const T &val])
+
-
+ Change the size of the array to be n elements. All elements are
+ unchanged, except that if n is greater than the current size and
+ the optional argument val is provided, the additional elements are
+ initialized to val; otherwise, any additional elements are left
+ uninitialized. In the current implementation, if n is less than
+ the current size, the length is updated but no memory is released.
+
+
+
+
+
+ - Method: const T* Array<T>::data (void) const
+
-
+
+
+
+
+
+
+ - : Array2 (void)
+
-
+
- : Array2 (int n, int m)
+
-
+
- : Array2 (int n, int m, const T &val)
+
-
+
- : Array2 (const Array2<T> &a)
+
-
+
- : Array2 (const DiagArray<T> &a)
+
-
+
+
+
+
+
+ - : Array2<T>& operator = (const Array2<T> &a)
+
-
+
+
+
+
+
+ - : int dim1 (void) const
+
-
+
- : int rows (void) const
+
-
+
+
+
+
+
+ - : int dim2 (void) const
+
-
+
- : int cols (void) const
+
-
+
- : int columns (void) const
+
-
+
+
+
+
+
+ - : T& elem (int i, int j)
+
-
+
- : T& checkelem (int i, int j)
+
-
+
- : T& operator () (int i, int j)
+
-
+
+
+
+
+
+
+ - : void resize (int n, int m)
+
-
+
- : void resize (int n, int m, const T &val)
+
-
+
+
+
+
+
+ - : Array3 (void)
+
-
+
- : Array3 (int n, int m, int k)
+
-
+
- : Array3 (int n, int m, int k, const T &val)
+
-
+
- : Array3 (const Array3<T> &a)
+
-
+
+
+
+
+
+ - : Array3<T>& operator = (const Array3<T> &a)
+
-
+
+
+
+
+
+ - : int dim1 (void) const
+
-
+
- : int dim2 (void) const
+
-
+
- : int dim3 (void) const
+
-
+
+
+
+
+
+ - : T& elem (int i, int j, int k)
+
-
+
- : T& checkelem (int i, int j, int k)
+
-
+
- : T& operator () (int i, int j, int k)
+
-
+
+
+
+
+
+
+ - : void resize (int n, int m, int k)
+
-
+
- : void resize (int n, int m, int k, const T &val)
+
-
+
+
+
+
+
+ - : {}DiagArray (void)
+
-
+
- : {}DiagArray (int n)
+
-
+
- : {}DiagArray (int n, const T &val)
+
-
+
- : {}DiagArray (int r, int c)
+
-
+
- : {}DiagArray (int r, int c, const T &val)
+
-
+
- : {}DiagArray (const Array<T> &a)
+
-
+
- : {}DiagArray (const DiagArray<T> &a)
+
-
+
+
+
+
+
+ - : DiagArray<T>& operator = (const DiagArray<T> &a)
+
-
+
+
+
+
+
+ - : int dim1 (void) const
+
-
+
- : int rows (void) const
+
-
+
+
+
+
+
+ - : int dim2 (void) const
+
-
+
- : int cols (void) const
+
-
+
- : int columns (void) const
+
-
+
+
+
+
+
+ - : T& elem (int r, int c)
+
-
+
- : T& checkelem (int r, int c)
+
-
+
- : T& operator () (int r, int c)
+
-
+
+
+
+
+
+
+ - : void resize (int n, int m)
+
-
+
- : void resize (int n, int m, const T &val)
+
-
+
+ The real and complex ColumnVector
and RowVector
classes
+ all have the following functions. These will eventually be part of an
+ MArray<T>
class, derived from the Array<T>
class. Then
+ the ColumnVector
and RowVector
classes will be derived
+ from the MArray<T>
class.
+
+
+
+ Element by element vector by scalar ops.
+
+
+
+
+ - : RowVector operator + (const RowVector &a, const double &s)
+
-
+
- : RowVector operator - (const RowVector &a, const double &s)
+
-
+
- : RowVector operator * (const RowVector &a, const double &s)
+
-
+
- : RowVector operator / (const RowVector &a, const double &s)
+
-
+
+
+
+
+ Element by element scalar by vector ops.
+
+
+
+
+ - : RowVector operator + (const double &s, const RowVector &a)
+
-
+
- : RowVector operator - (const double &s, const RowVector &a)
+
-
+
- : RowVector operator * (const double &s, const RowVector &a)
+
-
+
- : RowVector operator / (const double &s, const RowVector &a)
+
-
+
+
+
+
+ Element by element vector by vector ops.
+
+
+
+
+ - : RowVector operator + (const RowVector &a, const RowVector &b)
+
-
+
- : RowVector operator - (const RowVector &a, const RowVector &b)
+
-
+
+
+
+
+
+ - : RowVector product (const RowVector &a, const RowVector &b)
+
-
+
- : RowVector quotient (const RowVector &a, const RowVector &b)
+
-
+
+
+
+
+ Unary MArray ops.
+
+
+
+
+ - : RowVector operator - (const RowVector &a)
+
-
+
+
+
+
+
+ The Matrix
classes share the following functions. These will
+ eventually be part of an MArray2<T>
class, derived from the
+ Array2<T>
class. Then the Matrix
class will be derived
+ from the MArray<T>
class.
+
+
+
+ Element by element matrix by scalar ops.
+
+
+
+
+ - : Matrix operator + (const Matrix &a, const double &s)
+
-
+
- : Matrix operator - (const Matrix &a, const double &s)
+
-
+
- : Matrix operator * (const Matrix &a, const double &s)
+
-
+
- : Matrix operator / (const Matrix &a, const double &s)
+
-
+
+
+
+
+ Element by element scalar by matrix ops.
+
+
+
+
+ - : Matrix operator + (const double &s, const Matrix &a)
+
-
+
- : Matrix operator - (const double &s, const Matrix &a)
+
-
+
- : Matrix operator * (const double &s, const Matrix &a)
+
-
+
- : Matrix operator / (const double &s, const Matrix &a)
+
-
+
+
+
+
+ Element by element matrix by matrix ops.
+
+
+
+
+ - : Matrix operator + (const Matrix &a, const Matrix &b)
+
-
+
- : Matrix operator - (const Matrix &a, const Matrix &b)
+
-
+
+
+
+
+
+ - : Matrix product (const Matrix &a, const Matrix &b)
+
-
+
- : Matrix quotient (const Matrix &a, const Matrix &b)
+
-
+
+
+
+
+ Unary matrix ops.
+
+
+
+
+ - : Matrix operator - (const Matrix &a)
+
-
+
+
+
+
+
+ The DiagMatrix
classes share the following functions. These will
+ eventually be part of an MDiagArray<T>
class, derived from the
+ DiagArray<T>
class. Then the DiagMatrix
class will be
+ derived from the MDiagArray<T>
class.
+
+
+
+ Element by element MDiagArray by scalar ops.
+
+
+
+
+ - : DiagMatrix operator * (const DiagMatrix &a, const double &s)
+
-
+
- : DiagMatrix operator / (const DiagMatrix &a, const double &s)
+
-
+
+
+
+
+ Element by element scalar by MDiagArray ops.
+
+
+
+
+ - : DiagMatrix operator * (const double &s, const DiagMatrix &a)
+
-
+
+
+
+
+ Element by element MDiagArray by MDiagArray ops.
+
+
+
+
+ - : DiagMatrix operator + (const DiagMatrix &a, const DiagMatrix &b)
+
-
+
- : DiagMatrix operator - (const DiagMatrix &a, const DiagMatrix &b)
+
-
+
+
+
+
+
+ - : DiagMatrix product (const DiagMatrix &a, const DiagMatrix &b)
+
-
+
+
+
+
+ Unary MDiagArray ops.
+
+
+
+
+ - : DiagMatrix operator - (const DiagMatrix &a)
+
-
+
+
+
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_5.html octave-2.0.14/doc/liboctave/liboctave_5.html
*** octave-2.0.13/doc/liboctave/liboctave_5.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_5.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,2148 ----
+
+
+
+
+ Octave C++ Classes - Matrix and Vector Operations
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+ - : {}Matrix (void)
+
-
+
- : {}Matrix (int r, int c)
+
-
+
- : {}Matrix (int r, int c, double val)
+
-
+
- : {}Matrix (const Array2<double> &a)
+
-
+
- : {}Matrix (const Matrix &a)
+
-
+
- : {}Matrix (const DiagArray<double> &a)
+
-
+
- : {}Matrix (const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : Matrix& operator = (const Matrix &a)
+
-
+
+
+
+
+
+ - : int operator == (const Matrix &a) const
+
-
+
- : int operator != (const Matrix &a) const
+
-
+
+
+
+
+
+ - : Matrix& insert (const Matrix &a, int r, int c)
+
-
+
- : Matrix& insert (const RowVector &a, int r, int c)
+
-
+
- : Matrix& insert (const ColumnVector &a, int r, int c)
+
-
+
- : Matrix& insert (const DiagMatrix &a, int r, int c)
+
-
+
+
+
+
+
+ - : Matrix& fill (double val)
+
-
+
- : Matrix& fill (double val, int r1, int c1, int r2, int c2)
+
-
+
+
+
+
+
+ - : Matrix append (const Matrix &a) const
+
-
+
- : Matrix append (const RowVector &a) const
+
-
+
- : Matrix append (const ColumnVector &a) const
+
-
+
- : Matrix append (const DiagMatrix &a) const
+
-
+
+
+
+
+
+ - : Matrix stack (const Matrix &a) const
+
-
+
- : Matrix stack (const RowVector &a) const
+
-
+
- : Matrix stack (const ColumnVector &a) const
+
-
+
- : Matrix stack (const DiagMatrix &a) const
+
-
+
+
+
+
+
+ - : Matrix transpose (void) const
+
-
+
+
+
+
+
+ - : Matrix extract (int r1, int c1, int r2, int c2) const
+
-
+
+
+
+
+
+ - : RowVector row (int i) const
+
-
+
- : RowVector row (char *s) const
+
-
+
+
+
+
+
+ - : ColumnVector column (int i) const
+
-
+
- : ColumnVector column (char *s) const
+
-
+
+
+
+
+
+ - : Matrix inverse (void) const
+
-
+
- : Matrix inverse (int &info) const
+
-
+
- : Matrix inverse (int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : ComplexMatrix fourier (void) const
+
-
+
- : ComplexMatrix ifourier (void) const
+
-
+
+
+
+
+
+ - : DET determinant (void) const
+
-
+
- : DET determinant (int &info) const
+
-
+
- : DET determinant (int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : Matrix solve (const Matrix &b) const
+
-
+
- : Matrix solve (const Matrix &b, int &info) const
+
-
+
- : Matrix solve (const Matrix &b, int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : ComplexMatrix solve (const ComplexMatrix &b) const
+
-
+
- : ComplexMatrix solve (const ComplexMatrix &b, int &info) const
+
-
+
- : ComplexMatrix solve (const ComplexMatrix &b, int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : ColumnVector solve (const ColumnVector &b) const
+
-
+
- : ColumnVector solve (const ColumnVector &b, int &info) const
+
-
+
- : ColumnVector solve (const ColumnVector &b, int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector solve (const ComplexColumnVector &b) const
+
-
+
- : ComplexColumnVector solve (const ComplexColumnVector &b, int &info) const
+
-
+
- : ComplexColumnVector solve (const ComplexColumnVector &b, int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : Matrix lssolve (const Matrix &b) const
+
-
+
- : Matrix lssolve (const Matrix &b, int &info) const
+
-
+
- : Matrix lssolve (const Matrix &b, int &info, int &rank) const
+
-
+
+
+
+
+
+ - : ComplexMatrix lssolve (const ComplexMatrix &b) const
+
-
+
- : ComplexMatrix lssolve (const ComplexMatrix &b, int &info) const
+
-
+
- : ComplexMatrix lssolve (const ComplexMatrix &b, int &info, int &rank) const
+
-
+
+
+
+
+
+ - : ColumnVector lssolve (const ColumnVector &b) const
+
-
+
- : ColumnVector lssolve (const ColumnVector &b, int &info) const
+
-
+
- : ColumnVector lssolve (const ColumnVector &b, int &info, int &rank) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector lssolve (const ComplexColumnVector &b) const
+
-
+
- : ComplexColumnVector lssolve (const ComplexColumnVector &b, int &info) const
+
-
+
- : ComplexColumnVector lssolve (const ComplexColumnVector &b, int &info, int &rank) const
+
-
+
+
+
+
+
+ - : Matrix& operator += (const Matrix &a)
+
-
+
- : Matrix& operator -= (const Matrix &a)
+
-
+
+
+
+
+
+ - : Matrix& operator += (const DiagMatrix &a)
+
-
+
- : Matrix& operator -= (const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : Matrix operator ! (void) const
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const Matrix &a, const Complex &s)
+
-
+
- : ComplexMatrix operator - (const Matrix &a, const Complex &s)
+
-
+
- : ComplexMatrix operator * (const Matrix &a, const Complex &s)
+
-
+
- : ComplexMatrix operator / (const Matrix &a, const Complex &s)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const Complex &s, const Matrix &a)
+
-
+
- : ComplexMatrix operator - (const Complex &s, const Matrix &a)
+
-
+
- : ComplexMatrix operator * (const Complex &s, const Matrix &a)
+
-
+
- : ComplexMatrix operator / (const Complex &s, const Matrix &a)
+
-
+
+
+
+
+
+ - : ColumnVector operator * (const Matrix &a, const ColumnVector &b)
+
-
+
- : ComplexColumnVector operator * (const Matrix &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : Matrix operator + (const Matrix &a, const DiagMatrix &b)
+
-
+
- : Matrix operator - (const Matrix &a, const DiagMatrix &b)
+
-
+
- : Matrix operator * (const Matrix &a, const DiagMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const Matrix &a, const ComplexDiagMatrix &b)
+
-
+
- : ComplexMatrix operator - (const Matrix &a, const ComplexDiagMatrix &b)
+
-
+
- : ComplexMatrix operator * (const Matrix &a, const ComplexDiagMatrix &b)
+
-
+
+
+
+
+
+ - : Matrix operator * (const Matrix &a, const Matrix &b)
+
-
+
- : ComplexMatrix operator * (const Matrix &a, const ComplexMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const Matrix &a, const ComplexMatrix &b)
+
-
+
- : ComplexMatrix operator - (const Matrix &a, const ComplexMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix product (const Matrix &a, const ComplexMatrix &b)
+
-
+
- : ComplexMatrix quotient (const Matrix &a, const ComplexMatrix &b)
+
-
+
+
+
+
+
+ - : Matrix map (d_d_Mapper f, const Matrix &a)
+
-
+
- : void map (d_d_Mapper f)
+
-
+
+
+
+
+
+ - : Matrix all (void) const
+
-
+
- : Matrix any (void) const
+
-
+
+
+
+
+
+ - : Matrix cumprod (void) const
+
-
+
- : Matrix cumsum (void) const
+
-
+
- : Matrix prod (void) const
+
-
+
- : Matrix sum (void) const
+
-
+
- : Matrix sumsq (void) const
+
-
+
+
+
+
+
+ - : ColumnVector diag (void) const
+
-
+
- : ColumnVector diag (int k) const
+
-
+
+
+
+
+
+ - : ColumnVector row_min (void) const
+
-
+
- : ColumnVector row_min_loc (void) const
+
-
+
+
+
+
+
+ - : ColumnVector row_max (void) const
+
-
+
- : ColumnVector row_max_loc (void) const
+
-
+
+
+
+
+
+ - : RowVector column_min (void) const
+
-
+
- : RowVector column_min_loc (void) const
+
-
+
+
+
+
+
+ - : RowVector column_max (void) const
+
-
+
- : RowVector column_max_loc (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const Matrix &a)
+
-
+
- : istream& operator >> (istream &is, Matrix &a)
+
-
+
+
+
+
+
+ - : {}ColumnVector (void)
+
-
+
- : {}ColumnVector (int n)
+
-
+
- : {}ColumnVector (int n, double val)
+
-
+
- : {}ColumnVector (const Array<double> &a)
+
-
+
- : {}ColumnVector (const ColumnVector &a)
+
-
+
+
+
+
+
+ - : ColumnVector& operator = (const ColumnVector &a)
+
-
+
+
+
+
+
+ - : int operator == (const ColumnVector &a) const
+
-
+
- : int operator != (const ColumnVector &a) const
+
-
+
+
+
+
+
+ - : ColumnVector& insert (const ColumnVector &a, int r)
+
-
+
+
+
+
+
+ - : ColumnVector& fill (double val)
+
-
+
- : ColumnVector& fill (double val, int r1, int r2)
+
-
+
+
+
+
+
+ - : ColumnVector stack (const ColumnVector &a) const
+
-
+
+
+
+
+
+ - : RowVector transpose (void) const
+
-
+
+
+
+
+
+ - : ColumnVector extract (int r1, int r2) const
+
-
+
+
+
+
+
+ - : ColumnVector& operator += (const ColumnVector &a)
+
-
+
- : ColumnVector& operator -= (const ColumnVector &a)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator + (const ColumnVector &a, const Complex &s)
+
-
+
- : ComplexColumnVector operator - (const ColumnVector &a, const Complex &s)
+
-
+
- : ComplexColumnVector operator * (const ColumnVector &a, const Complex &s)
+
-
+
- : ComplexColumnVector operator / (const ColumnVector &a, const Complex &s)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator + (const Complex &s, const ColumnVector &a)
+
-
+
- : ComplexColumnVector operator - (const Complex &s, const ColumnVector &a)
+
-
+
- : ComplexColumnVector operator * (const Complex &s, const ColumnVector &a)
+
-
+
- : ComplexColumnVector operator / (const Complex &s, const ColumnVector &a)
+
-
+
+
+
+
+
+ - : Matrix operator * (const ColumnVector &a, const RowVector &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator * (const ColumnVector &a, const ComplexRowVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator + (const ComplexColumnVector &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator - (const ComplexColumnVector &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector product (const ComplexColumnVector &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector quotient (const ComplexColumnVector &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : ColumnVector map (d_d_Mapper f, const ColumnVector &a)
+
-
+
- : void map (d_d_Mapper f)
+
-
+
+
+
+
+
+ - : double min (void) const
+
-
+
- : double max (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ColumnVector &a)
+
-
+
+
+
+
+
+ - : {}RowVector (void)
+
-
+
- : {}RowVector (int n)
+
-
+
- : {}RowVector (int n, double val)
+
-
+
- : {}RowVector (const Array<double> &a)
+
-
+
- : {}RowVector (const RowVector &a)
+
-
+
+
+
+
+
+ - : RowVector& operator = (const RowVector &a)
+
-
+
+
+
+
+
+ - : int operator == (const RowVector &a) const
+
-
+
- : int operator != (const RowVector &a) const
+
-
+
+
+
+
+
+ - : RowVector& insert (const RowVector &a, int c)
+
-
+
+
+
+
+
+ - : RowVector& fill (double val)
+
-
+
- : RowVector& fill (double val, int c1, int c2)
+
-
+
+
+
+
+
+ - : RowVector append (const RowVector &a) const
+
-
+
+
+
+
+
+ - : ColumnVector transpose (void) const
+
-
+
+
+
+
+
+ - : RowVector extract (int c1, int c2) const
+
-
+
+
+
+
+
+ - : RowVector& operator += (const RowVector &a)
+
-
+
- : RowVector& operator -= (const RowVector &a)
+
-
+
+
+
+
+
+ - : ComplexRowVector operator + (const RowVector &a, const Complex &s)
+
-
+
- : ComplexRowVector operator - (const RowVector &a, const Complex &s)
+
-
+
- : ComplexRowVector operator * (const RowVector &a, const Complex &s)
+
-
+
- : ComplexRowVector operator / (const RowVector &a, const Complex &s)
+
-
+
+
+
+
+
+ - : ComplexRowVector operator + (const Complex &s, const RowVector &a)
+
-
+
- : ComplexRowVector operator - (const Complex &s, const RowVector &a)
+
-
+
- : ComplexRowVector operator * (const Complex &s, const RowVector &a)
+
-
+
- : ComplexRowVector operator / (const Complex &s, const RowVector &a)
+
-
+
+
+
+
+
+ - : double operator * (const RowVector &a, ColumnVector &b)
+
-
+
+
+
+
+
+ - : Complex operator * (const RowVector &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : RowVector operator * (const RowVector &a, const Matrix &b)
+
-
+
+
+
+
+
+ - : ComplexRowVector operator * (const RowVector &a, const ComplexMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexRowVector operator + (const RowVector &a, const ComplexRowVector &b)
+
-
+
- : ComplexRowVector operator - (const RowVector &a, const ComplexRowVector &b)
+
-
+
+
+
+
+
+ - : ComplexRowVector product (const RowVector &a, const ComplexRowVector &b)
+
-
+
- : ComplexRowVector quotient (const RowVector &a, const ComplexRowVector &b)
+
-
+
+
+
+
+
+ - : RowVector map (d_d_Mapper f, const RowVector &a)
+
-
+
- : void map (d_d_Mapper f)
+
-
+
+
+
+
+
+ - : double min (void) const
+
-
+
- : double max (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const RowVector &a)
+
-
+
+
+
+
+
+ - : {}DiagMatrix (void)
+
-
+
- : {}DiagMatrix (int n)
+
-
+
- : {}DiagMatrix (int n, double val)
+
-
+
- : {}DiagMatrix (int r, int c)
+
-
+
- : {}DiagMatrix (int r, int c, double val)
+
-
+
- : {}DiagMatrix (const RowVector &a)
+
-
+
- : {}DiagMatrix (const ColumnVector &a)
+
-
+
- : {}DiagMatrix (const DiagArray<double> &a)
+
-
+
- : {}DiagMatrix (const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : DiagMatrix& operator = (const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : int operator == (const DiagMatrix &a) const
+
-
+
- : int operator != (const DiagMatrix &a) const
+
-
+
+
+
+
+
+ - : DiagMatrix& fill (double val)
+
-
+
- : DiagMatrix& fill (double val, int beg, int end)
+
-
+
- : DiagMatrix& fill (const ColumnVector &a)
+
-
+
- : DiagMatrix& fill (const RowVector &a)
+
-
+
- : DiagMatrix& fill (const ColumnVector &a, int beg)
+
-
+
- : DiagMatrix& fill (const RowVector &a, int beg)
+
-
+
+
+
+
+
+ - : DiagMatrix transpose (void) const
+
-
+
+
+
+
+
+ - : Matrix extract (int r1, int c1, int r2, int c2) const
+
-
+
+
+
+
+
+ - : RowVector row (int i) const
+
-
+
- : RowVector row (char *s) const
+
-
+
+
+
+
+
+ - : ColumnVector column (int i) const
+
-
+
- : ColumnVector column (char *s) const
+
-
+
+
+
+
+
+ - : DiagMatrix inverse (void) const
+
-
+
- : DiagMatrix inverse (int &info) const
+
-
+
+
+
+
+
+ - : DiagMatrix& operator += (const DiagMatrix &a)
+
-
+
- : DiagMatrix& operator -= (const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : Matrix operator + (const DiagMatrix &a, double s)
+
-
+
- : Matrix operator - (const DiagMatrix &a, double s)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const DiagMatrix &a, const Complex &s)
+
-
+
- : ComplexMatrix operator - (const DiagMatrix &a, const Complex &s)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix operator * (const DiagMatrix &a, const Complex &s)
+
-
+
- : ComplexDiagMatrix operator / (const DiagMatrix &a, const Complex &s)
+
-
+
+
+
+
+
+ - : Matrix operator + (double s, const DiagMatrix &a)
+
-
+
- : Matrix operator - (double s, const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const Complex &s, const DiagMatrix &a)
+
-
+
- : ComplexMatrix operator - (const Complex &s, const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix operator * (const Complex &s, const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : ColumnVector operator * (const DiagMatrix &a, const ColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator * (const DiagMatrix &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix operator + (const DiagMatrix &a, const ComplexDiagMatrix &b)
+
-
+
- : ComplexDiagMatrix operator - (const DiagMatrix &a, const ComplexDiagMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix product (const DiagMatrix &a, const ComplexDiagMatrix &b)
+
-
+
+
+
+
+
+ - : Matrix operator + (const DiagMatrix &a, const Matrix &b)
+
-
+
- : Matrix operator - (const DiagMatrix &a, const Matrix &b)
+
-
+
- : Matrix operator * (const DiagMatrix &a, const Matrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const DiagMatrix &a, const ComplexMatrix &b)
+
-
+
- : ComplexMatrix operator - (const DiagMatrix &a, const ComplexMatrix &b)
+
-
+
- : ComplexMatrix operator * (const DiagMatrix &a, const ComplexMatrix &b)
+
-
+
+
+
+
+
+ - : ColumnVector diag (void) const
+
-
+
- : ColumnVector diag (int k) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : {}ComplexMatrix (void)
+
-
+
- : {}ComplexMatrix (int r, int c)
+
-
+
- : {}ComplexMatrix (int r, int c, const Complex &val)
+
-
+
- : {}ComplexMatrix (const Matrix &a)
+
-
+
- : {}ComplexMatrix (const Array2<Complex> &a)
+
-
+
- : {}ComplexMatrix (const ComplexMatrix &a)
+
-
+
- : {}ComplexMatrix (const DiagMatrix &a)
+
-
+
- : {}ComplexMatrix (const DiagArray<Complex> &a)
+
-
+
- : {}ComplexMatrix (const ComplexDiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix& operator = (const ComplexMatrix &a)
+
-
+
+
+
+
+
+ - : int operator == (const ComplexMatrix &a) const
+
-
+
- : int operator != (const ComplexMatrix &a) const
+
-
+
+
+
+
+
+ - : ComplexMatrix& insert (const Matrix &a, int r, int c)
+
-
+
- : ComplexMatrix& insert (const RowVector &a, int r, int c)
+
-
+
- : ComplexMatrix& insert (const ColumnVector &a, int r, int c)
+
-
+
- : ComplexMatrix& insert (const DiagMatrix &a, int r, int c)
+
-
+
+
+
+
+
+ - : ComplexMatrix& insert (const ComplexMatrix &a, int r, int c)
+
-
+
- : ComplexMatrix& insert (const ComplexRowVector &a, int r, int c)
+
-
+
- : ComplexMatrix& insert (const ComplexColumnVector &a, int r, int c)
+
-
+
- : ComplexMatrix& insert (const ComplexDiagMatrix &a, int r, int c)
+
-
+
+
+
+
+
+ - : ComplexMatrix& fill (double val)
+
-
+
- : ComplexMatrix& fill (const Complex &val)
+
-
+
- : ComplexMatrix& fill (double val, int r1, int c1, int r2, int c2)
+
-
+
- : ComplexMatrix& fill (const Complex &val, int r1, int c1, int r2, int c2)
+
-
+
+
+
+
+
+ - : ComplexMatrix append (const Matrix &a) const
+
-
+
- : ComplexMatrix append (const RowVector &a) const
+
-
+
- : ComplexMatrix append (const ColumnVector &a) const
+
-
+
- : ComplexMatrix append (const DiagMatrix &a) const
+
-
+
+
+
+
+
+ - : ComplexMatrix append (const ComplexMatrix &a) const
+
-
+
- : ComplexMatrix append (const ComplexRowVector &a) const
+
-
+
- : ComplexMatrix append (const ComplexColumnVector &a) const
+
-
+
- : ComplexMatrix append (const ComplexDiagMatrix &a) const
+
-
+
+
+
+
+
+ - : ComplexMatrix stack (const Matrix &a) const
+
-
+
- : ComplexMatrix stack (const RowVector &a) const
+
-
+
- : ComplexMatrix stack (const ColumnVector &a) const
+
-
+
- : ComplexMatrix stack (const DiagMatrix &a) const
+
-
+
+
+
+
+
+ - : ComplexMatrix stack (const ComplexMatrix &a) const
+
-
+
- : ComplexMatrix stack (const ComplexRowVector &a) const
+
-
+
- : ComplexMatrix stack (const ComplexColumnVector &a) const
+
-
+
- : ComplexMatrix stack (const ComplexDiagMatrix &a) const
+
-
+
+
+
+
+
+ - : ComplexMatrix transpose (void) const
+
-
+
+
+
+
+
+ - : Matrix real (const ComplexMatrix &a)
+
-
+
- : Matrix imag (const ComplexMatrix &a)
+
-
+
- : ComplexMatrix conj (const ComplexMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix extract (int r1, int c1, int r2, int c2) const
+
-
+
+
+
+
+
+ - : ComplexRowVector row (int i) const
+
-
+
- : ComplexRowVector row (char *s) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector column (int i) const
+
-
+
- : ComplexColumnVector column (char *s) const
+
-
+
+
+
+
+
+ - : ComplexMatrix inverse (void) const
+
-
+
- : ComplexMatrix inverse (int &info) const
+
-
+
- : ComplexMatrix inverse (int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : ComplexMatrix fourier (void) const
+
-
+
- : ComplexMatrix ifourier (void) const
+
-
+
+
+
+
+
+ - : ComplexDET determinant (void) const
+
-
+
- : ComplexDET determinant (int &info) const
+
-
+
- : ComplexDET determinant (int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : ComplexMatrix solve (const Matrix &b) const
+
-
+
- : ComplexMatrix solve (const Matrix &b, int &info) const
+
-
+
- : ComplexMatrix solve (const Matrix &b, int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : ComplexMatrix solve (const ComplexMatrix &b) const
+
-
+
- : ComplexMatrix solve (const ComplexMatrix &b, int &info) const
+
-
+
- : ComplexMatrix solve (const ComplexMatrix &b, int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector solve (const ComplexColumnVector &b) const
+
-
+
- : ComplexColumnVector solve (const ComplexColumnVector &b, int &info) const
+
-
+
- : ComplexColumnVector solve (const ComplexColumnVector &b, int &info, double &rcond) const
+
-
+
+
+
+
+
+ - : ComplexMatrix lssolve (const ComplexMatrix &b) const
+
-
+
- : ComplexMatrix lssolve (const ComplexMatrix &b, int &info) const
+
-
+
- : ComplexMatrix lssolve (const ComplexMatrix &b, int &info, int &rank) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector lssolve (const ComplexColumnVector &b) const
+
-
+
- : ComplexColumnVector lssolve (const ComplexColumnVector &b, int &info) const
+
-
+
- : ComplexColumnVector lssolve (const ComplexColumnVector &b, int &info, int &rank) const
+
-
+
+
+
+
+
+ - : ComplexMatrix& operator += (const DiagMatrix &a)
+
-
+
- : ComplexMatrix& operator -= (const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix& operator += (const ComplexDiagMatrix &a)
+
-
+
- : ComplexMatrix& operator -= (const ComplexDiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix& operator += (const Matrix &a)
+
-
+
- : ComplexMatrix& operator -= (const Matrix &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix& operator += (const ComplexMatrix &a)
+
-
+
- : ComplexMatrix& operator -= (const ComplexMatrix &a)
+
-
+
+
+
+
+
+ - : Matrix operator ! (void) const
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const ComplexMatrix &a, double s)
+
-
+
- : ComplexMatrix operator - (const ComplexMatrix &a, double s)
+
-
+
- : ComplexMatrix operator * (const ComplexMatrix &a, double s)
+
-
+
- : ComplexMatrix operator / (const ComplexMatrix &a, double s)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (double s, const ComplexMatrix &a)
+
-
+
- : ComplexMatrix operator - (double s, const ComplexMatrix &a)
+
-
+
- : ComplexMatrix operator * (double s, const ComplexMatrix &a)
+
-
+
- : ComplexMatrix operator / (double s, const ComplexMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator * (const ComplexMatrix &a, const ColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator * (const ComplexMatrix &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const ComplexMatrix &a, const DiagMatrix &b)
+
-
+
- : ComplexMatrix operator - (const ComplexMatrix &a, const DiagMatrix &b)
+
-
+
- : ComplexMatrix operator * (const ComplexMatrix &a, const DiagMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const ComplexMatrix &a, const ComplexDiagMatrix &b)
+
-
+
- : ComplexMatrix operator - (const ComplexMatrix &a, const ComplexDiagMatrix &b)
+
-
+
- : ComplexMatrix operator * (const ComplexMatrix &a, const ComplexDiagMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const ComplexMatrix &a, const Matrix &b)
+
-
+
- : ComplexMatrix operator - (const ComplexMatrix &a, const Matrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator * (const ComplexMatrix &a, const Matrix &b)
+
-
+
- : ComplexMatrix operator * (const ComplexMatrix &a, const ComplexMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix product (const ComplexMatrix &a, const Matrix &b)
+
-
+
- : ComplexMatrix quotient (const ComplexMatrix &a, const Matrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix map (c_c_Mapper f, const ComplexMatrix &a)
+
-
+
- : Matrix map (d_c_Mapper f, const ComplexMatrix &a)
+
-
+
- : void map (c_c_Mapper f)
+
-
+
+
+
+
+
+ - : Matrix all (void) const
+
-
+
- : Matrix any (void) const
+
-
+
+
+
+
+
+ - : ComplexMatrix cumprod (void) const
+
-
+
- : ComplexMatrix cumsum (void) const
+
-
+
- : ComplexMatrix prod (void) const
+
-
+
- : ComplexMatrix sum (void) const
+
-
+
- : ComplexMatrix sumsq (void) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector diag (void) const
+
-
+
- : ComplexColumnVector diag (int k) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector row_min (void) const
+
-
+
- : ComplexColumnVector row_min_loc (void) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector row_max (void) const
+
-
+
- : ComplexColumnVector row_max_loc (void) const
+
-
+
+
+
+
+
+ - : ComplexRowVector column_min (void) const
+
-
+
- : ComplexRowVector column_min_loc (void) const
+
-
+
+
+
+
+
+ - : ComplexRowVector column_max (void) const
+
-
+
- : ComplexRowVector column_max_loc (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexMatrix &a)
+
-
+
- : istream& operator >> (istream &is, ComplexMatrix &a)
+
-
+
+
+
+
+
+ - : {}ComplexColumnVector (void)
+
-
+
- : {}ComplexColumnVector (int n)
+
-
+
- : {}ComplexColumnVector (int n, const Complex &val)
+
-
+
- : {}ComplexColumnVector (const ColumnVector &a)
+
-
+
- : {}ComplexColumnVector (const Array<Complex> &a)
+
-
+
- : {}ComplexColumnVector (const ComplexColumnVector &a)
+
-
+
+
+
+
+
+ - : ComplexColumnVector& operator = (const ComplexColumnVector &a)
+
-
+
+
+
+
+
+ - : int operator == (const ComplexColumnVector &a) const
+
-
+
- : int operator != (const ComplexColumnVector &a) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector& insert (const ColumnVector &a, int r)
+
-
+
- : ComplexColumnVector& insert (const ComplexColumnVector &a, int r)
+
-
+
+
+
+
+
+ - : ComplexColumnVector& fill (double val)
+
-
+
- : ComplexColumnVector& fill (const Complex &val)
+
-
+
- : ComplexColumnVector& fill (double val, int r1, int r2)
+
-
+
- : ComplexColumnVector& fill (const Complex &val, int r1, int r2)
+
-
+
+
+
+
+
+ - : ComplexColumnVector stack (const ColumnVector &a) const
+
-
+
- : ComplexColumnVector stack (const ComplexColumnVector &a) const
+
-
+
+
+
+
+
+ - : ComplexRowVector transpose (void) const
+
-
+
+
+
+
+
+ - : ColumnVector real (const ComplexColumnVector &a)
+
-
+
- : ColumnVector imag (const ComplexColumnVector &a)
+
-
+
- : ComplexColumnVector conj (const ComplexColumnVector &a)
+
-
+
+
+
+
+
+ - : ComplexColumnVector extract (int r1, int r2) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector& operator += (const ColumnVector &a)
+
-
+
- : ComplexColumnVector& operator -= (const ColumnVector &a)
+
-
+
+
+
+
+
+ - : ComplexColumnVector& operator += (const ComplexColumnVector &a)
+
-
+
- : ComplexColumnVector& operator -= (const ComplexColumnVector &a)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator + (const ComplexColumnVector &a, double s)
+
-
+
- : ComplexColumnVector operator - (const ComplexColumnVector &a, double s)
+
-
+
- : ComplexColumnVector operator * (const ComplexColumnVector &a, double s)
+
-
+
- : ComplexColumnVector operator / (const ComplexColumnVector &a, double s)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator + (double s, const ComplexColumnVector &a)
+
-
+
- : ComplexColumnVector operator - (double s, const ComplexColumnVector &a)
+
-
+
- : ComplexColumnVector operator * (double s, const ComplexColumnVector &a)
+
-
+
- : ComplexColumnVector operator / (double s, const ComplexColumnVector &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator * (const ComplexColumnVector &a, const ComplexRowVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator + (const ComplexColumnVector &a, const ColumnVector &b)
+
-
+
- : ComplexColumnVector operator - (const ComplexColumnVector &a, const ColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector product (const ComplexColumnVector &a, const ColumnVector &b)
+
-
+
- : ComplexColumnVector quotient (const ComplexColumnVector &a, const ColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector map (c_c_Mapper f, const ComplexColumnVector &a)
+
-
+
- : ColumnVector map (d_c_Mapper f, const ComplexColumnVector &a)
+
-
+
- : void map (c_c_Mapper f)
+
-
+
+
+
+
+
+ - : Complex min (void) const
+
-
+
- : Complex max (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexColumnVector &a)
+
-
+
+
+
+
+
+ - : {}ComplexRowVector (void)
+
-
+
- : {}ComplexRowVector (int n)
+
-
+
- : {}ComplexRowVector (int n, const Complex &val)
+
-
+
- : {}ComplexRowVector (const RowVector &a)
+
-
+
- : {}ComplexRowVector (const Array<Complex> &a)
+
-
+
- : {}ComplexRowVector (const ComplexRowVector &a)
+
-
+
+
+
+
+
+ - : ComplexRowVector& operator = (const ComplexRowVector &a)
+
-
+
+
+
+
+
+ - : int operator == (const ComplexRowVector &a) const
+
-
+
- : int operator != (const ComplexRowVector &a) const
+
-
+
+
+
+
+
+ - : ComplexRowVector& insert (const RowVector &a, int c)
+
-
+
- : ComplexRowVector& insert (const ComplexRowVector &a, int c)
+
-
+
+
+
+
+
+ - : ComplexRowVector& fill (double val)
+
-
+
- : ComplexRowVector& fill (const Complex &val)
+
-
+
- : ComplexRowVector& fill (double val, int c1, int c2)
+
-
+
- : ComplexRowVector& fill (const Complex &val, int c1, int c2)
+
-
+
+
+
+
+
+ - : ComplexRowVector append (const RowVector &a) const
+
-
+
- : ComplexRowVector append (const ComplexRowVector &a) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector transpose (void) const
+
-
+
+
+
+
+
+ - : RowVector real (const ComplexRowVector &a)
+
-
+
- : RowVector imag (const ComplexRowVector &a)
+
-
+
- : ComplexRowVector conj (const ComplexRowVector &a)
+
-
+
+
+
+
+
+ - : ComplexRowVector extract (int c1, int c2) const
+
-
+
+
+
+
+
+ - : ComplexRowVector& operator += (const RowVector &a)
+
-
+
- : ComplexRowVector& operator -= (const RowVector &a)
+
-
+
+
+
+
+
+ - : ComplexRowVector& operator += (const ComplexRowVector &a)
+
-
+
- : ComplexRowVector& operator -= (const ComplexRowVector &a)
+
-
+
+
+
+
+
+ - : ComplexRowVector operator + (const ComplexRowVector &a, double s)
+
-
+
- : ComplexRowVector operator - (const ComplexRowVector &a, double s)
+
-
+
- : ComplexRowVector operator * (const ComplexRowVector &a, double s)
+
-
+
- : ComplexRowVector operator / (const ComplexRowVector &a, double s)
+
-
+
+
+
+
+
+ - : ComplexRowVector operator + (double s, const ComplexRowVector &a)
+
-
+
- : ComplexRowVector operator - (double s, const ComplexRowVector &a)
+
-
+
- : ComplexRowVector operator * (double s, const ComplexRowVector &a)
+
-
+
- : ComplexRowVector operator / (double s, const ComplexRowVector &a)
+
-
+
+
+
+
+
+ - : Complex operator * (const ComplexRowVector &a, const ColumnVector &b)
+
-
+
+
+
+
+
+ - : Complex operator * (const ComplexRowVector &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexRowVector operator * (const ComplexRowVector &a, const ComplexMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexRowVector operator + (const ComplexRowVector &a, const RowVector &b)
+
-
+
- : ComplexRowVector operator - (const ComplexRowVector &a, const RowVector &b)
+
-
+
+
+
+
+
+ - : ComplexRowVector product (const ComplexRowVector &a, const RowVector &b)
+
-
+
- : ComplexRowVector quotient (const ComplexRowVector &a, const RowVector &b)
+
-
+
+
+
+
+
+ - : ComplexRowVector map (c_c_Mapper f, const ComplexRowVector &a)
+
-
+
- : RowVector map (d_c_Mapper f, const ComplexRowVector &a)
+
-
+
- : void map (c_c_Mapper f)
+
-
+
+
+
+
+
+ - : Complex min (void) const
+
-
+
- : Complex max (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexRowVector &a)
+
-
+
+
+
+
+
+ - : {}ComplexDiagMatrix (void)
+
-
+
- : {}ComplexDiagMatrix (int n)
+
-
+
- : {}ComplexDiagMatrix (int n, const Complex &val)
+
-
+
- : {}ComplexDiagMatrix (int r, int c)
+
-
+
- : {}ComplexDiagMatrix (int r, int c, const Complex &val)
+
-
+
- : {}ComplexDiagMatrix (const RowVector &a)
+
-
+
- : {}ComplexDiagMatrix (const ComplexRowVector &a)
+
-
+
- : {}ComplexDiagMatrix (const ColumnVector &a)
+
-
+
- : {}ComplexDiagMatrix (const ComplexColumnVector &a)
+
-
+
- : {}ComplexDiagMatrix (const DiagMatrix &a)
+
-
+
- : {}ComplexDiagMatrix (const DiagArray<Complex> &a)
+
-
+
- : {}ComplexDiagMatrix (const ComplexDiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix& operator = (const ComplexDiagMatrix &a)
+
-
+
+
+
+
+
+ - : int operator == (const ComplexDiagMatrix &a) const
+
-
+
- : int operator != (const ComplexDiagMatrix &a) const
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix& fill (double val)
+
-
+
- : ComplexDiagMatrix& fill (const Complex &val)
+
-
+
- : ComplexDiagMatrix& fill (double val, int beg, int end)
+
-
+
- : ComplexDiagMatrix& fill (const Complex &val, int beg, int end)
+
-
+
- : ComplexDiagMatrix& fill (const ColumnVector &a)
+
-
+
- : ComplexDiagMatrix& fill (const ComplexColumnVector &a)
+
-
+
- : ComplexDiagMatrix& fill (const RowVector &a)
+
-
+
- : ComplexDiagMatrix& fill (const ComplexRowVector &a)
+
-
+
- : ComplexDiagMatrix& fill (const ColumnVector &a, int beg)
+
-
+
- : ComplexDiagMatrix& fill (const ComplexColumnVector &a, int beg)
+
-
+
- : ComplexDiagMatrix& fill (const RowVector &a, int beg)
+
-
+
- : ComplexDiagMatrix& fill (const ComplexRowVector &a, int beg)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix transpose (void) const
+
-
+
+
+
+
+
+ - : DiagMatrix real (const ComplexDiagMatrix &a)
+
-
+
- : DiagMatrix imag (const ComplexDiagMatrix &a)
+
-
+
- : ComplexDiagMatrix conj (const ComplexDiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix extract (int r1, int c1, int r2, int c2) const
+
-
+
+
+
+
+
+ - : ComplexRowVector row (int i) const
+
-
+
- : ComplexRowVector row (char *s) const
+
-
+
+
+
+
+
+ - : ComplexColumnVector column (int i) const
+
-
+
- : ComplexColumnVector column (char *s) const
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix inverse (int &info) const
+
-
+
- : ComplexDiagMatrix inverse (void) const
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix& operator += (const DiagMatrix &a)
+
-
+
- : ComplexDiagMatrix& operator -= (const DiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix& operator += (const ComplexDiagMatrix &a)
+
-
+
- : ComplexDiagMatrix& operator -= (const ComplexDiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const ComplexDiagMatrix &a, double s)
+
-
+
- : ComplexMatrix operator - (const ComplexDiagMatrix &a, double s)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const ComplexDiagMatrix &a, const Complex &s)
+
-
+
- : ComplexMatrix operator - (const ComplexDiagMatrix &a, const Complex &s)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix operator * (const ComplexDiagMatrix &a, double s)
+
-
+
- : ComplexDiagMatrix operator / (const ComplexDiagMatrix &a, double s)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (double s, const ComplexDiagMatrix &a)
+
-
+
- : ComplexMatrix operator - (double s, const ComplexDiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const Complex &s, const ComplexDiagMatrix &a)
+
-
+
- : ComplexMatrix operator - (const Complex &s, const ComplexDiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix operator * (double s, const ComplexDiagMatrix &a)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator * (const ComplexDiagMatrix &a, const ColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector operator * (const ComplexDiagMatrix &a, const ComplexColumnVector &b)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix operator + (const ComplexDiagMatrix &a, const DiagMatrix &b)
+
-
+
- : ComplexDiagMatrix operator - (const ComplexDiagMatrix &a, const DiagMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexDiagMatrix product (const ComplexDiagMatrix &a, const DiagMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const ComplexDiagMatrix &a, const Matrix &b)
+
-
+
- : ComplexMatrix operator - (const ComplexDiagMatrix &a, const Matrix &b)
+
-
+
- : ComplexMatrix operator * (const ComplexDiagMatrix &a, const Matrix &b)
+
-
+
+
+
+
+
+ - : ComplexMatrix operator + (const ComplexDiagMatrix &a, const ComplexMatrix &b)
+
-
+
- : ComplexMatrix operator - (const ComplexDiagMatrix &a, const ComplexMatrix &b)
+
-
+
- : ComplexMatrix operator * (const ComplexDiagMatrix &a, const ComplexMatrix &b)
+
-
+
+
+
+
+
+ - : ComplexColumnVector diag (void) const
+
-
+
- : ComplexColumnVector diag (int k) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexDiagMatrix &a)
+
-
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_6.html octave-2.0.14/doc/liboctave/liboctave_6.html
*** octave-2.0.13/doc/liboctave/liboctave_6.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_6.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,685 ----
+
+
+
+
+ Octave C++ Classes - Matrix Factorizations
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+
+ - : {}AEPBALANCE (void)
+
-
+
- : {}AEPBALANCE (const Matrix &a, const char *balance_job)
+
-
+
- : {}AEPBALANCE (const AEPBALANCE &a)
+
-
+
+
+
+
+
+ - : AEPBALANCE& operator = (const AEPBALANCE &a)
+
-
+
+
+
+
+
+ - : Matrix balanced_matrix (void) const
+
-
+
- : Matrix balancing_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const AEPBALANCE &a)
+
-
+
+
+
+
+
+ - : ComplexAEPBALANCE (void)
+
-
+
- : ComplexAEPBALANCE (const ComplexMatrix &a, const char *balance_job)
+
-
+
- : ComplexAEPBALANCE (const ComplexAEPBALANCE &a)
+
-
+
+
+
+
+
+ - : ComplexAEPBALANCE& operator = (const ComplexAEPBALANCE &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix balanced_matrix (void) const
+
-
+
- : ComplexMatrix balancing_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexAEPBALANCE &a)
+
-
+
+
+
+
+
+ - : {}DET (void)
+
-
+
- : {}DET (const DET &a)
+
-
+
+
+
+
+
+ - : DET& operator = (const DET &a)
+
-
+
+
+
+
+
+ - : int value_will_overflow (void) const
+
-
+
- : int value_will_underflow (void) const
+
-
+
+
+
+
+
+ - : double coefficient (void) const
+
-
+
- : int exponent (void) const
+
-
+
- : double value (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const DET &a)
+
-
+
+
+
+
+
+ - : {}ComplexDET (void)
+
-
+
- : {}ComplexDET (const ComplexDET &a)
+
-
+
+
+
+
+
+ - : ComplexDET& operator = (const ComplexDET &a)
+
-
+
+
+
+
+
+ - : int value_will_overflow (void) const
+
-
+
- : int value_will_underflow (void) const
+
-
+
+
+
+
+
+ - : Complex coefficient (void) const
+
-
+
- : int exponent (void) const
+
-
+
- : Complex value (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexDET &a)
+
-
+
+
+
+
+
+ - : {}GEPBALANCE (void)
+
-
+
- : {}GEPBALANCE (const Matrix &a, const Matrix &, const char *balance_job)
+
-
+
- : {}GEPBALANCE (const GEPBALANCE &a)
+
-
+
+
+
+
+
+ - : GEPBALANCE& operator = (const GEPBALANCE &a)
+
-
+
+
+
+
+
+ - : Matrix balanced_a_matrix (void) const
+
-
+
- : Matrix balanced_b_matrix (void) const
+
-
+
- : Matrix left_balancing_matrix (void) const
+
-
+
- : Matrix right_balancing_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const GEPBALANCE &a)
+
-
+
+
+
+
+
+ - : {}CHOL (void)
+
-
+
- : {}CHOL (const Matrix &a)
+
-
+
- : {}CHOL (const Matrix &a, int &info)
+
-
+
- : {}CHOL (const CHOL &a)
+
-
+
+
+
+
+
+ - : CHOL& operator = (const CHOL &a)
+
-
+
+
+
+
+
+ - : Matrix chol_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const CHOL &a)
+
-
+
+
+
+
+
+ - : {}ComplexCHOL (void)
+
-
+
- : {}ComplexCHOL (const ComplexMatrix &a)
+
-
+
- : {}ComplexCHOL (const ComplexMatrix &a, int &info)
+
-
+
- : {}ComplexCHOL (const ComplexCHOL &a)
+
-
+
+
+
+
+
+ - : ComplexCHOL& operator = (const ComplexCHOL &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix chol_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexCHOL &a)
+
-
+
+
+
+
+
+ - : {}HESS (void)
+
-
+
- : {}HESS (const Matrix &a)
+
-
+
- : {}HESS (const Matrix&a, int &info)
+
-
+
- : {}HESS (const HESS &a)
+
-
+
+
+
+
+
+ - : HESS& operator = (const HESS &a)
+
-
+
+
+
+
+
+ - : Matrix hess_matrix (void) const
+
-
+
- : Matrix unitary_hess_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const HESS &a)
+
-
+
+
+
+
+
+ - : {}ComplexHESS (void)
+
-
+
- : {}ComplexHESS (const ComplexMatrix &a)
+
-
+
- : {}ComplexHESS (const ComplexMatrix &a, int &info)
+
-
+
- : {}ComplexHESS (const ComplexHESS &a)
+
-
+
+
+
+
+
+ - : ComplexHESS& operator = (const ComplexHESS &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix hess_matrix (void) const
+
-
+
- : ComplexMatrix unitary_hess_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexHESS &a)
+
-
+
+
+
+
+
+ - : {}SCHUR (void)
+
-
+
- : {}SCHUR (const Matrix &a, const char *ord)
+
-
+
- : {}SCHUR (const Matrix &a, const char *ord, int &info)
+
-
+
- : {}SCHUR (const SCHUR &a, const char *ord)
+
-
+
+
+
+
+
+ - : SCHUR& operator = (const SCHUR &a)
+
-
+
+
+
+
+
+ - : Matrix schur_matrix (void) const
+
-
+
- : Matrix unitary_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const SCHUR &a)
+
-
+
+
+
+
+
+ - : {}ComplexSCHUR (void)
+
-
+
- : {}ComplexSCHUR (const ComplexMatrix &a, const char *ord)
+
-
+
- : {}ComplexSCHUR (const ComplexMatrix &a, const char *ord, int &info)
+
-
+
- : {}ComplexSCHUR (const ComplexSCHUR &a, const char *ord)
+
-
+
+
+
+
+
+ - : ComplexSCHUR& operator = (const ComplexSCHUR &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix schur_matrix (void) const
+
-
+
- : ComplexMatrix unitary_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexSCHUR &a)
+
-
+
+
+
+
+
+ - : {}SVD (void)
+
-
+
- : {}SVD (const Matrix &a)
+
-
+
- : {}SVD (const Matrix &a, int &info)
+
-
+
- : {}SVD (const SVD &a)
+
-
+
+
+
+
+
+ - : SVD& operator = (const SVD &a)
+
-
+
+
+
+
+
+ - : DiagMatrix singular_values (void) const
+
-
+
- : Matrix left_singular_matrix (void) const
+
-
+
- : Matrix right_singular_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const SVD &a)
+
-
+
+
+
+
+
+ - : {}ComplexSVD (void)
+
-
+
- : {}ComplexSVD (const ComplexMatrix &a)
+
-
+
- : {}ComplexSVD (const ComplexMatrix &a, int &info)
+
-
+
- : {}ComplexSVD (const ComplexSVD &a)
+
-
+
+
+
+
+
+ - : ComplexSVD& operator = (const ComplexSVD &a)
+
-
+
+
+
+
+
+ - : DiagMatrix singular_values (void) const
+
-
+
- : ComplexMatrix left_singular_matrix (void) const
+
-
+
- : ComplexMatrix right_singular_matrix (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexSVD &a)
+
-
+
+
+
+
+
+ - : {}EIG (void)
+
-
+
- : {}EIG (const Matrix &a)
+
-
+
- : {}EIG (const Matrix &a, int &info)
+
-
+
- : {}EIG (const ComplexMatrix &a)
+
-
+
- : {}EIG (const ComplexMatrix &a, int &info)
+
-
+
- : {}EIG (const EIG &a)
+
-
+
+
+
+
+
+ - : EIG& operator = (const EIG &a)
+
-
+
+
+
+
+
+ - : ComplexColumnVector eigenvalues (void) const
+
-
+
+
+
+
+
+ - : ComplexMatrix eigenvectors (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const EIG &a)
+
-
+
+
+
+
+
+ - : {}LU (void)
+
-
+
- : {}LU (const Matrix &a)
+
-
+
- : {}LU (const LU &a)
+
-
+
+
+
+
+
+ - : LU& operator = (const LU &a)
+
-
+
+
+
+
+
+ - : Matrix L (void) const
+
-
+
- : Matrix U (void) const
+
-
+
- : Matrix P (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const LU &a)
+
-
+
+
+
+
+
+ - : {}ComplexLU (void)
+
-
+
- : {}ComplexLU (const ComplexMatrix &a)
+
-
+
- : {}ComplexLU (const ComplexLU &a)
+
-
+
+
+
+
+
+ - : ComplexLU& operator = (const ComplexLU &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix L (void) const
+
-
+
- : ComplexMatrix U (void) const
+
-
+
- : Matrix P (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexLU &a)
+
-
+
+
+
+
+
+ - : {}QR (void)
+
-
+
- : {}QR (const Matrix &A)
+
-
+
- : {}QR (const QR &a)
+
-
+
+
+
+
+
+ - : QR& operator = (const QR &a)
+
-
+
+
+
+
+
+ - : Matrix Q (void) const
+
-
+
- : Matrix R (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const QR &a)
+
-
+
+
+
+
+
+ - : {}ComplexQR (void)
+
-
+
- : {}ComplexQR (const ComplexMatrix &A)
+
-
+
- : {}ComplexQR (const ComplexQR &a)
+
-
+
+
+
+
+
+ - : ComplexQR& operator = (const ComplexQR &a)
+
-
+
+
+
+
+
+ - : ComplexMatrix Q (void) const
+
-
+
- : ComplexMatrix R (void) const
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const ComplexQR &a)
+
-
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_7.html octave-2.0.14/doc/liboctave/liboctave_7.html
*** octave-2.0.13/doc/liboctave/liboctave_7.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_7.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,93 ----
+
+
+
+
+ Octave C++ Classes - Ranges
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ - : {}Range (void)
+
-
+
- : {}Range (const Range &r)
+
-
+
- : {}Range (double b, double l)
+
-
+
- : {}Range (double b, double l, double i)
+
-
+
+
+
+
+
+ - : double base (void) const
+
-
+
- : double limit (void) const
+
-
+
- : double inc (void) const
+
-
+
+
+
+
+
+ - : void set_base (double b)
+
-
+
- : void set_limit (double l)
+
-
+
- : void set_inc (double i)
+
-
+
+
+
+
+
+ - : int nelem (void) const
+
-
+
+
+
+
+
+ - : double min (void) const
+
-
+
- : double max (void) const
+
-
+
+
+
+
+
+ - : void sort (void)
+
-
+
+
+
+
+
+ - : ostream& operator << (ostream &os, const Range &r)
+
-
+
- : istream& operator >> (istream &is, Range &r)
+
-
+
+
+
+
+
+ - : void print_range (void)
+
-
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_8.html octave-2.0.14/doc/liboctave/liboctave_8.html
*** octave-2.0.13/doc/liboctave/liboctave_8.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_8.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,67 ----
+
+
+
+
+ Octave C++ Classes - Nonlinear Functions
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ - : {}NLFunc (void)
+
-
+
- : {}NLFunc (const nonlinear_fcn)
+
-
+
- : {}NLFunc (const nonlinear_fcn, const jacobian_fcn)
+
-
+
- : {}NLFunc (const NLFunc &a)
+
-
+
+
+
+
+
+ - : NLFunc& operator = (const NLFunc &a)
+
-
+
+
+
+
+
+ - : nonlinear_fcn function (void) const;
+
-
+
+
+
+
+
+ - : NLFunc& set_function (const nonlinear_fcn f)
+
-
+
+
+
+
+
+ - : jacobian_fcn jacobian_function (void) const;
+
-
+
+
+
+
+
+ - : NLFunc& set_jacobian_function (const jacobian_fcn j)
+
-
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_9.html octave-2.0.14/doc/liboctave/liboctave_9.html
*** octave-2.0.13/doc/liboctave/liboctave_9.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_9.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,134 ----
+
+
+
+
+ Octave C++ Classes - Nonlinear Equations
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
+
+
+
+
+
+
+
+
+ - : {}NLEqn_options (void)
+
-
+
- : {}NLEqn_options (const NLEqn_options &opt)
+
-
+
+
+
+
+
+ - : NLEqn_options& operator = (const NLEqn_options &opt)
+
-
+
+
+
+
+
+ - : void init (void)
+
-
+
+
+
+
+
+ - : void copy (const NLEqn_options &opt)
+
-
+
+
+
+
+
+ - : void set_default_options (void)
+
-
+
+
+
+
+
+ - : void set_tolerance (double val)
+
-
+
+
+
+
+
+ - : double tolerance (void)
+
-
+
+
+
+
+
+ - : {}NLEqn (void)
+
-
+
- : {}NLEqn (const ColumnVector&, const NLFunc)
+
-
+
- : {}NLEqn (const NLEqn &a)
+
-
+
+
+
+
+
+ - : NLEqn& operator = (const NLEqn &a)
+
-
+
+
+
+
+
+ - : void resize (int n)
+
-
+
+
+
+
+
+ - : void set_states (const ColumnVector &x)
+
-
+
+
+
+
+
+ - : ColumnVector states (void) const
+
-
+
+
+
+
+
+ - : int size (void) const
+
-
+
+
+
+
+
+ - : ColumnVector solve (void)
+
-
+
- : ColumnVector solve (const ColumnVector &x)
+
-
+
+
+
+
+
+ - : ColumnVector solve (int &info)
+
-
+
- @deftypefnx{}: ColumnVector solve (const ColumnVector &x, int &info)
+
-
+
+
+ Go to the first, previous, next, last section, table of contents.
+
+
diff -cNr octave-2.0.13/doc/liboctave/liboctave_toc.html octave-2.0.14/doc/liboctave/liboctave_toc.html
*** octave-2.0.13/doc/liboctave/liboctave_toc.html Wed Dec 31 18:00:00 1969
--- octave-2.0.14/doc/liboctave/liboctave_toc.html Fri Oct 9 00:26:29 1998
***************
*** 0 ****
--- 1,59 ----
+
+
+
+
+ Octave C++ Classes - Table of Contents
+
+
+ Octave C++ Classes
+
+
+
+
+ This document was generated on 9 October 1998 using the
+ texi2html
+ translator version 1.51.
+
+
diff -cNr octave-2.0.13/doc/liboctave/matvec.texi octave-2.0.14/doc/liboctave/matvec.texi
*** octave-2.0.13/doc/liboctave/matvec.texi Tue May 20 14:42:48 1997
--- octave-2.0.14/doc/liboctave/matvec.texi Tue Aug 18 16:49:56 1998
***************
*** 107,113 ****
@c ------------------------------------------------------------------------
! @node Matrix and Vector @var{Operations}, Matrix Factorizations, Arrays, Top
@chapter Matrix and Vector Operations
@cindex matrix manipulations
@cindex vector manipulations
--- 107,113 ----
@c ------------------------------------------------------------------------
! @node Matrix and Vector Operations, Matrix Factorizations, Arrays, Top
@chapter Matrix and Vector Operations
@cindex matrix manipulations
@cindex vector manipulations
diff -cNr octave-2.0.13/emacs/Makefile.in octave-2.0.14/emacs/Makefile.in
*** octave-2.0.13/emacs/Makefile.in Mon May 19 17:02:59 1997
--- octave-2.0.14/emacs/Makefile.in Wed Nov 18 00:09:28 1998
***************
*** 16,38 ****
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
EL_FILES = octave-hlp.el octave-inf.el octave-mod.el
ELC_FILES = octave-hlp.elc octave-inf.elc octave-mod.elc
! SOURCES = $(EL_FILES)
! DISTFILES = Makefile.in $(EL_FILES) $(ELC_FILES) NEWS TODO
! BINDISTFILES = $(addprefix $(srcdir)/, $(EL_FILES) $(ELC_FILES) NEWS TODO)
all:
.PHONY: all
install:
.PHONY: install
tags:
ctags $(SOURCES)
--- 16,45 ----
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
EL_FILES = octave-hlp.el octave-inf.el octave-mod.el
ELC_FILES = octave-hlp.elc octave-inf.elc octave-mod.elc
! SOURCES = $(EL_FILES) otags
! DISTFILES = Makefile.in $(EL_FILES) $(ELC_FILES) otags NEWS TODO
! BINDISTFILES = \
! $(addprefix $(srcdir)/, $(EL_FILES) $(ELC_FILES) otags NEWS TODO)
all:
.PHONY: all
install:
+ $(INSTALL_PROGRAM) otags $(bindir)/otags
.PHONY: install
+
+ uninstall:
+ rm -f $(bindir)/otags
+ .PHONY: uninstall
tags:
ctags $(SOURCES)
diff -cNr octave-2.0.13/emacs/octave-inf.el octave-2.0.14/emacs/octave-inf.el
*** octave-2.0.13/emacs/octave-inf.el Fri Nov 28 13:33:48 1997
--- octave-2.0.14/emacs/octave-inf.el Fri Oct 2 14:25:07 1998
***************
*** 33,39 ****
"*Program invoked by `inferior-octave'.")
(defvar inferior-octave-prompt
! "\\(^octave\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ "
"*Regexp to match prompts for the inferior Octave process.")
(defvar inferior-octave-startup-file nil
--- 33,39 ----
"*Program invoked by `inferior-octave'.")
(defvar inferior-octave-prompt
! "\\(^octave\\(\\|.bin\\)\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ "
"*Regexp to match prompts for the inferior Octave process.")
(defvar inferior-octave-startup-file nil
diff -cNr octave-2.0.13/emacs/octave-mod.el octave-2.0.14/emacs/octave-mod.el
*** octave-2.0.13/emacs/octave-mod.el Mon May 4 12:09:20 1998
--- octave-2.0.14/emacs/octave-mod.el Fri Dec 4 11:09:06 1998
***************
*** 595,600 ****
--- 595,603 ----
(delete-horizontal-space)
(insert (concat " " octave-continuation-string))))
+ (defvar octave-xemacs-p
+ (string-match "XEmacs\\|Lucid" emacs-version))
+
;;; Comments
(defun octave-comment-region (beg end &optional arg)
"Comment or uncomment each line in the region as Octave code.
***************
*** 1306,1314 ****
(self-insert-command 1)
(let (c)
(insert last-command-char)
! (if (or (eq (setq c (read-event)) ??)
! (eq c help-char))
! (let ((abbrev-table-name-list '(octave-mode-abbrev-table)))
(list-abbrevs))
(setq unread-command-events (list c))))))
--- 1309,1320 ----
(self-insert-command 1)
(let (c)
(insert last-command-char)
! (if (if octave-xemacs-p
! (or (eq (event-to-character (setq c (next-event))) ??)
! (eq (event-to-character c) help-char))
! (or (eq (setq c (read-event)) ??)
! (eq c help-char)))
! (let ((abbrev-table-name-list '(octave-abbrev-table)))
(list-abbrevs))
(setq unread-command-events (list c))))))
diff -cNr octave-2.0.13/emacs/otags octave-2.0.14/emacs/otags
*** octave-2.0.13/emacs/otags Wed Dec 31 18:00:00 1969
--- octave-2.0.14/emacs/otags Thu Nov 12 11:43:32 1998
***************
*** 0 ****
--- 1,26 ----
+ #! /bin/sh
+
+ # Generate a TAGS file from a set of Octave .m files for use with Emacs.
+ #
+ # Run as '$ otags' in the given Octave directory to generate a
+ # TAGS file. If you want to include another directory, add a line
+ # prior to the "*.m" line containing something like
+ # `--include=/path/to/other/directory/TAGS" \'.
+
+ # Tags are generated for function names and for global variables. For
+ # global variables it doesn't work for more than one line global
+ # variables. :-(
+
+ # Tags are also created for lines of the form '###key foobar' so that
+ # you can jump to this specific place just by typing `M-. foobar'.
+ # Note that tags are not generated for scripts so that you have to add
+ # a line by yourself of the form `###key ' if you want to
+ # jump to it. :-(
+
+ # Author: Mario Storti
+
+ etags --lang=none \
+ --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/' \
+ --regex='/###key \(.*\)/\1/' \
+ --regex='/[ \t]*global[ \t].*/' \
+ *.m
diff -cNr octave-2.0.13/glob/configure octave-2.0.14/glob/configure
*** octave-2.0.13/glob/configure Thu May 21 13:16:31 1998
--- octave-2.0.14/glob/configure Wed Apr 14 12:58:11 1999
***************
*** 1,7 ****
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.12
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
--- 1,7 ----
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
***************
*** 49,54 ****
--- 49,55 ----
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
+ SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
***************
*** 332,338 ****
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
! echo "configure generated by autoconf version 2.12"
exit 0 ;;
-with-* | --with-*)
--- 333,339 ----
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
! echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
***************
*** 502,510 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
--- 503,513 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
+ ac_exeext=
+ ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
***************
*** 520,534 ****
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:524: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
--- 523,538 ----
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:527: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
***************
*** 549,564 ****
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:553: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
ac_prog_rejected=no
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
--- 553,569 ----
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:557: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
***************
*** 593,617 ****
echo "$ac_t""no" 1>&6
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:601: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
--- 598,658 ----
echo "$ac_t""no" 1>&6
fi
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+ set dummy cl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:608: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ fi
+ fi
+ CC="$ac_cv_prog_CC"
+ if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ ;;
+ esac
+ fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:640: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
! cat > conftest.$ac_ext << EOF
!
! #line 651 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
! if { (eval echo configure:656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
***************
*** 625,642 ****
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:635: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:640: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 666,689 ----
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:682: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:687: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 645,651 ****
yes;
#endif
EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
--- 692,698 ----
yes;
#endif
EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
***************
*** 656,666 ****
if test $ac_cv_prog_gcc = yes; then
GCC=yes
! ac_test_CFLAGS="${CFLAGS+set}"
! ac_save_CFLAGS="$CFLAGS"
! CFLAGS=
! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:664: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 703,717 ----
if test $ac_cv_prog_gcc = yes; then
GCC=yes
! else
! GCC=
! fi
!
! ac_test_CFLAGS="${CFLAGS+set}"
! ac_save_CFLAGS="$CFLAGS"
! CFLAGS=
! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:715: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 675,704 ****
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
! if test "$ac_test_CFLAGS" = set; then
! CFLAGS="$ac_save_CFLAGS"
! elif test $ac_cv_prog_cc_g = yes; then
CFLAGS="-g -O2"
else
! CFLAGS="-O2"
fi
else
! GCC=
! test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:694: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_AR="ar"
--- 726,760 ----
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
! if test "$ac_test_CFLAGS" = set; then
! CFLAGS="$ac_save_CFLAGS"
! elif test $ac_cv_prog_cc_g = yes; then
! if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
! CFLAGS="-g"
fi
else
! if test "$GCC" = yes; then
! CFLAGS="-O2"
! else
! CFLAGS=
! fi
fi
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:749: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_AR="ar"
***************
*** 719,733 ****
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:723: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
--- 775,790 ----
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:779: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
***************
*** 746,752 ****
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:750: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
--- 803,809 ----
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:807: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
***************
*** 761,774 ****
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
--- 818,831 ----
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
***************
*** 778,791 ****
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
--- 835,865 ----
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <
! Syntax Error
! EOF
! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
! if test -z "$ac_err"; then
! :
! else
! echo "$ac_err" >&5
! echo "configure: failed program was:" >&5
! cat conftest.$ac_ext >&5
! rm -rf conftest*
! CPP="${CC-cc} -nologo -E"
! cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
***************
*** 798,803 ****
--- 872,879 ----
rm -f conftest*
fi
rm -f conftest*
+ fi
+ rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
***************
*** 806,814 ****
fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
! echo "configure:810: checking for AIX" >&5
cat > conftest.$ac_ext <&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
! echo "configure:886: checking for AIX" >&5
cat > conftest.$ac_ext <&6
! echo "configure:835: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
--- 907,924 ----
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
! echo "configure:911: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
***************
*** 879,885 ****
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
! echo "configure:883: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
--- 955,961 ----
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
! echo "configure:959: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
***************
*** 900,911 ****
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
! echo "configure:904: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:980: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
--- 1030,1036 ----
; return 0; }
EOF
! if { (eval echo configure:1034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
***************
*** 975,986 ****
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:979: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 1051,1062 ----
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1055: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 988,995 ****
#include
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
--- 1064,1071 ----
#include
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
***************
*** 1005,1011 ****
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
--- 1081,1087 ----
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
***************
*** 1023,1029 ****
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
--- 1099,1105 ----
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
***************
*** 1044,1050 ****
:
else
cat > conftest.$ac_ext <
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 1120,1126 ----
:
else
cat > conftest.$ac_ext <
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 1055,1061 ****
exit (0); }
EOF
! if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
--- 1131,1137 ----
exit (0); }
EOF
! if { (eval echo configure:1135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
***************
*** 1082,1099 ****
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1086: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
--- 1158,1175 ----
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1162: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
***************
*** 1123,1134 ****
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
! echo "configure:1127: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_hdr>
--- 1199,1210 ----
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
! echo "configure:1203: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_hdr>
***************
*** 1136,1142 ****
DIR *dirp = 0;
; return 0; }
EOF
! if { (eval echo configure:1140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
--- 1212,1218 ----
DIR *dirp = 0;
; return 0; }
EOF
! if { (eval echo configure:1216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
***************
*** 1161,1167 ****
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
! echo "configure:1165: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 1237,1243 ----
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
! echo "configure:1241: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 1169,1175 ****
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 1256,1262 ----
opendir()
; return 0; }
EOF
! if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 1202,1208 ****
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
! echo "configure:1206: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 1278,1284 ----
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
! echo "configure:1282: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 1210,1216 ****
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 1297,1303 ----
opendir()
; return 0; }
EOF
! if { (eval echo configure:1301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 1244,1250 ****
fi
echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
! echo "configure:1248: checking whether closedir returns void" >&5
if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1320,1326 ----
fi
echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
! echo "configure:1324: checking whether closedir returns void" >&5
if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1252,1264 ****
ac_cv_func_closedir_void=yes
else
cat > conftest.$ac_ext <
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
! if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_closedir_void=no
else
--- 1328,1340 ----
ac_cv_func_closedir_void=yes
else
cat > conftest.$ac_ext <
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
! if { (eval echo configure:1338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_closedir_void=no
else
***************
*** 1283,1301 ****
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:1287: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
! if { (eval echo configure:1299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
--- 1359,1377 ----
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:1363: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
! if { (eval echo configure:1375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
***************
*** 1316,1340 ****
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:1320: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
# else
! # ifdef _AIX
! #pragma alloca
# else
! # ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
--- 1392,1421 ----
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:1396: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
! # define alloca _alloca
# else
! # if HAVE_ALLOCA_H
! # include
# else
! # ifdef _AIX
! #pragma alloca
! # else
! # ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
+ # endif
# endif
# endif
# endif
***************
*** 1344,1350 ****
char *p = (char *) alloca(1);
; return 0; }
EOF
! if { (eval echo configure:1348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
--- 1425,1431 ----
char *p = (char *) alloca(1);
; return 0; }
EOF
! if { (eval echo configure:1429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
***************
*** 1369,1387 ****
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
! ALLOCA=alloca.o
cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:1380: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:1461: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:1410: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:1491: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 1515,1521 ----
; return 0; }
EOF
! if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 1461,1467 ****
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:1465: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1542,1548 ----
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:1546: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1469,1475 ****
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
--- 1569,1575 ----
exit (find_stack_direction() < 0);
}
EOF
! if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
***************
*** 1510,1516 ****
fi
echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
! echo "configure:1514: checking for working strcoll" >&5
if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1591,1597 ----
fi
echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
! echo "configure:1595: checking for working strcoll" >&5
if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1518,1524 ****
ac_cv_func_strcoll_works=no
else
cat > conftest.$ac_ext <
main ()
--- 1599,1605 ----
ac_cv_func_strcoll_works=no
else
cat > conftest.$ac_ext <
main ()
***************
*** 1528,1534 ****
strcoll ("123", "456") >= 0);
}
EOF
! if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_strcoll_works=yes
else
--- 1609,1615 ----
strcoll ("123", "456") >= 0);
}
EOF
! if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_strcoll_works=yes
else
***************
*** 1573,1579 ****
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
! case `(ac_space=' '; set) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
--- 1654,1660 ----
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
! case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
***************
*** 1652,1658 ****
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
! echo "$CONFIG_STATUS generated by autoconf version 2.12"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
--- 1733,1739 ----
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
! echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
***************
*** 1671,1679 ****
--- 1752,1762 ----
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
+ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+ s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
diff -cNr octave-2.0.13/install-octave.in octave-2.0.14/install-octave.in
*** octave-2.0.13/install-octave.in Fri May 15 00:34:37 1998
--- octave-2.0.14/install-octave.in Thu May 21 14:22:22 1998
***************
*** 248,255 ****
cp $f $octfiledir/$file
chmod 755 $octfiledir/$file
done
! if test -f links-to-make; then
! cat links-to-make | while read src dest
do
if test -n "$src" && test -n "$dest"; then
cd $octfiledir
--- 248,255 ----
cp $f $octfiledir/$file
chmod 755 $octfiledir/$file
done
! if test -f src/links-to-make; then
! cat src/links-to-make | while read src dest
do
if test -n "$src" && test -n "$dest"; then
cd $octfiledir
diff -cNr octave-2.0.13/kpathsea/ChangeLog octave-2.0.14/kpathsea/ChangeLog
*** octave-2.0.13/kpathsea/ChangeLog Thu May 14 12:20:11 1998
--- octave-2.0.14/kpathsea/ChangeLog Fri Nov 13 08:26:16 1998
***************
*** 1,3 ****
--- 1,25 ----
+ Fri Nov 13 08:24:34 1998 John W. Eaton
+
+ * kdefault.c (kpse_expand_default): In loop that checks for
+ doubled colon, just break out of the inner loop when a match is
+ found. Don't check for expansion == path because we've already
+ duplicated path to avoid memory problems (see previous change).
+ From Rafael Laboissiere .
+
+ Fri Oct 23 22:05:46 1998 John W. Eaton
+
+ * kdefault.c (kpse_expand_default): Always return newly allocated
+ storage.
+
+ Fri Sep 25 13:28:54 1998 John W. Eaton
+
+ * elt-dirs.c (kpse_clear_dir_cache): New function.
+ * pathsearch.h (kpse_clear_dir_cache): Provide declaration.
+
+ Mon Aug 31 12:07:02 1998 John W. Eaton
+
+ * config.sub: Accept armv4 everywhere arm is allowed.
+
Thu May 14 12:19:47 1998 John W. Eaton
* acklibtool.m4: For use with Octave, disable support for shared
diff -cNr octave-2.0.13/kpathsea/config.sub octave-2.0.14/kpathsea/config.sub
*** octave-2.0.13/kpathsea/config.sub Fri Apr 24 01:42:43 1998
--- octave-2.0.14/kpathsea/config.sub Mon Aug 31 12:06:14 1998
***************
*** 150,156 ****
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
! | arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
--- 150,156 ----
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
! | armv4* | arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
***************
*** 172,178 ****
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
! | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
--- 172,179 ----
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
! | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* \
! | armv4-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
diff -cNr octave-2.0.13/kpathsea/configure octave-2.0.14/kpathsea/configure
*** octave-2.0.13/kpathsea/configure Thu May 21 13:16:30 1998
--- octave-2.0.14/kpathsea/configure Wed Apr 14 12:58:09 1999
***************
*** 1,7 ****
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.12
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
--- 1,7 ----
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
***************
*** 61,66 ****
--- 61,67 ----
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
+ SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
***************
*** 344,350 ****
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
! echo "configure generated by autoconf version 2.12"
exit 0 ;;
-with-* | --with-*)
--- 345,351 ----
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
! echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
***************
*** 514,522 ****
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
--- 515,525 ----
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
+ ac_exeext=
+ ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
***************
*** 546,560 ****
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:550: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
--- 549,564 ----
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:553: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
***************
*** 575,590 ****
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:579: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
ac_prog_rejected=no
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
--- 579,595 ----
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:583: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
***************
*** 619,643 ****
echo "$ac_t""no" 1>&6
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:627: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
--- 624,684 ----
echo "$ac_t""no" 1>&6
fi
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+ set dummy cl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:634: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ fi
+ fi
+ CC="$ac_cv_prog_CC"
+ if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ ;;
+ esac
+ fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:666: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
! cat > conftest.$ac_ext << EOF
!
! #line 677 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
! if { (eval echo configure:682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
***************
*** 651,668 ****
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:661: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:666: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 692,715 ----
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:708: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:713: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 671,677 ****
yes;
#endif
EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
--- 718,724 ----
yes;
#endif
EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
***************
*** 682,692 ****
if test $ac_cv_prog_gcc = yes; then
GCC=yes
! ac_test_CFLAGS="${CFLAGS+set}"
! ac_save_CFLAGS="$CFLAGS"
! CFLAGS=
! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:690: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 729,743 ----
if test $ac_cv_prog_gcc = yes; then
GCC=yes
! else
! GCC=
! fi
!
! ac_test_CFLAGS="${CFLAGS+set}"
! ac_save_CFLAGS="$CFLAGS"
! CFLAGS=
! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:741: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 701,716 ****
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
! if test "$ac_test_CFLAGS" = set; then
! CFLAGS="$ac_save_CFLAGS"
! elif test $ac_cv_prog_cc_g = yes; then
CFLAGS="-g -O2"
else
! CFLAGS="-O2"
fi
else
! GCC=
! test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
ac_aux_dir=
--- 752,771 ----
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
! if test "$ac_test_CFLAGS" = set; then
! CFLAGS="$ac_save_CFLAGS"
! elif test $ac_cv_prog_cc_g = yes; then
! if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
! CFLAGS="-g"
fi
else
! if test "$GCC" = yes; then
! CFLAGS="-O2"
! else
! CFLAGS=
! fi
fi
ac_aux_dir=
***************
*** 739,766 ****
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:747: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
! for ac_prog in ginstall installbsd scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
- # OSF/1 installbsd also uses dspmsg, but is usable.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
--- 794,823 ----
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+ # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:803: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
! # Don't use installbsd from OSF since it installs stuff as root
! # by default.
! for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
***************
*** 790,799 ****
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:797: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 847,858 ----
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:856: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 814,820 ****
fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
! echo "configure:818: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 873,879 ----
fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
! echo "configure:877: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 846,857 ****
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
! echo "configure:850: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_hdr>
--- 905,916 ----
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
! echo "configure:909: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include <$ac_hdr>
***************
*** 859,865 ****
DIR *dirp = 0;
; return 0; }
EOF
! if { (eval echo configure:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
--- 918,924 ----
DIR *dirp = 0;
; return 0; }
EOF
! if { (eval echo configure:922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
***************
*** 884,890 ****
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
! echo "configure:888: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 943,949 ----
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
! echo "configure:947: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 892,898 ****
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 962,968 ----
opendir()
; return 0; }
EOF
! if { (eval echo configure:966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 925,931 ****
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
! echo "configure:929: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 984,990 ----
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
! echo "configure:988: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 933,939 ****
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
--- 1003,1009 ----
opendir()
; return 0; }
EOF
! if { (eval echo configure:1007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
***************
*** 967,973 ****
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:971: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
--- 1026,1032 ----
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1030: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
***************
*** 982,995 ****
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
--- 1041,1054 ----
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
***************
*** 999,1012 ****
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
--- 1058,1088 ----
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <
! Syntax Error
! EOF
! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
! if test -z "$ac_err"; then
! :
! else
! echo "$ac_err" >&5
! echo "configure: failed program was:" >&5
! cat conftest.$ac_ext >&5
! rm -rf conftest*
! CPP="${CC-cc} -nologo -E"
! cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
***************
*** 1019,1024 ****
--- 1095,1102 ----
rm -f conftest*
fi
rm -f conftest*
+ fi
+ rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
***************
*** 1028,1039 ****
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1032: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
--- 1106,1117 ----
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1110: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
#include
***************
*** 1041,1048 ****
#include
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
--- 1119,1126 ----
#include
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
***************
*** 1058,1064 ****
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
--- 1136,1142 ----
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
***************
*** 1076,1082 ****
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
--- 1154,1160 ----
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <
EOF
***************
*** 1097,1103 ****
:
else
cat > conftest.$ac_ext <
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 1175,1181 ----
:
else
cat > conftest.$ac_ext <
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 1108,1114 ****
exit (0); }
EOF
! if { (eval echo configure:1112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
--- 1186,1192 ----
exit (0); }
EOF
! if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
***************
*** 1132,1138 ****
fi
echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
! echo "configure:1136: checking whether closedir returns void" >&5
if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1210,1216 ----
fi
echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
! echo "configure:1214: checking whether closedir returns void" >&5
if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1140,1152 ****
ac_cv_func_closedir_void=yes
else
cat > conftest.$ac_ext <
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
! if { (eval echo configure:1150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_closedir_void=no
else
--- 1218,1230 ----
ac_cv_func_closedir_void=yes
else
cat > conftest.$ac_ext <
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
! if { (eval echo configure:1228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_closedir_void=no
else
***************
*** 1173,1190 ****
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1177: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
--- 1251,1268 ----
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1255: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
***************
*** 1215,1229 ****
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1219: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
! for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
--- 1293,1308 ----
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1297: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
! ac_dummy="$PATH"
! for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
***************
*** 1243,1268 ****
# Make sure we can run config.sub.
! if $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:1252: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
! if host_alias=`$ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
! host=`$ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
--- 1322,1347 ----
# Make sure we can run config.sub.
! if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:1331: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
! if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
! host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
***************
*** 1272,1278 ****
#
echo $ac_n "checking for libtool object types""... $ac_c" 1>&6
! echo "configure:1276: checking for libtool object types" >&5
#
## Check that the klibtool script is in ac_aux_dir. Don't bother to
# scan PATH. For one thing, if we found it somewhere there, we couldn't
--- 1351,1357 ----
#
echo $ac_n "checking for libtool object types""... $ac_c" 1>&6
! echo "configure:1355: checking for libtool object types" >&5
#
## Check that the klibtool script is in ac_aux_dir. Don't bother to
# scan PATH. For one thing, if we found it somewhere there, we couldn't
***************
*** 1318,1329 ****
for ac_func in basename putenv strcasecmp strtol strstr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1322: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:1401: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 1425,1431 ----
; return 0; }
EOF
! if { (eval echo configure:1429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 1376,1387 ****
for ac_func in bcopy getcwd getwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1380: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:1459: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 1483,1489 ----
; return 0; }
EOF
! if { (eval echo configure:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 1430,1441 ****
echo $ac_n "checking for working const""... $ac_c" 1>&6
! echo "configure:1434: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&6
! echo "configure:1513: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
--- 1563,1569 ----
; return 0; }
EOF
! if { (eval echo configure:1567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
***************
*** 1507,1525 ****
# Check whether prototypes work.
echo $ac_n "checking whether the compiler accepts prototypes""... $ac_c" 1>&6
! echo "configure:1511: checking whether the compiler accepts prototypes" >&5
if eval "test \"`echo '$''{'kb_cv_c_prototypes'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
extern void foo(int i,...);
; return 0; }
EOF
! if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
kb_cv_c_prototypes=yes
else
--- 1586,1604 ----
# Check whether prototypes work.
echo $ac_n "checking whether the compiler accepts prototypes""... $ac_c" 1>&6
! echo "configure:1590: checking whether the compiler accepts prototypes" >&5
if eval "test \"`echo '$''{'kb_cv_c_prototypes'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int main() {
extern void foo(int i,...);
; return 0; }
EOF
! if { (eval echo configure:1602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
kb_cv_c_prototypes=yes
else
***************
*** 1540,1558 ****
# This is a GNU libc invention.
echo $ac_n "checking whether program_invocation_name is predefined""... $ac_c" 1>&6
! echo "configure:1544: checking whether program_invocation_name is predefined" >&5
if eval "test \"`echo '$''{'kb_cv_var_program_inv_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
kb_cv_var_program_inv_name=yes
else
--- 1619,1637 ----
# This is a GNU libc invention.
echo $ac_n "checking whether program_invocation_name is predefined""... $ac_c" 1>&6
! echo "configure:1623: checking whether program_invocation_name is predefined" >&5
if eval "test \"`echo '$''{'kb_cv_var_program_inv_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
kb_cv_var_program_inv_name=yes
else
***************
*** 1576,1582 ****
# We don't actually need to run this if we don't have putenv, but it
# doesn't hurt.
echo $ac_n "checking whether putenv uses malloc""... $ac_c" 1>&6
! echo "configure:1580: checking whether putenv uses malloc" >&5
if eval "test \"`echo '$''{'kb_cv_func_putenv_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1655,1661 ----
# We don't actually need to run this if we don't have putenv, but it
# doesn't hurt.
echo $ac_n "checking whether putenv uses malloc""... $ac_c" 1>&6
! echo "configure:1659: checking whether putenv uses malloc" >&5
if eval "test \"`echo '$''{'kb_cv_func_putenv_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1584,1590 ****
kb_cv_func_putenv_malloc=no
else
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
kb_cv_func_putenv_malloc=yes
else
--- 1716,1722 ----
exit (rstr1 == rstr2 ? 0 : 1);
}
EOF
! if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
kb_cv_func_putenv_malloc=yes
else
***************
*** 1661,1667 ****
if test $ac_cv_func_getcwd = yes; then
# We only need to run this if we have getcwd.
echo $ac_n "checking whether getcwd uses fork or vfork""... $ac_c" 1>&6
! echo "configure:1665: checking whether getcwd uses fork or vfork" >&5
if eval "test \"`echo '$''{'kb_cv_func_getcwd_forks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1740,1746 ----
if test $ac_cv_func_getcwd = yes; then
# We only need to run this if we have getcwd.
echo $ac_n "checking whether getcwd uses fork or vfork""... $ac_c" 1>&6
! echo "configure:1744: checking whether getcwd uses fork or vfork" >&5
if eval "test \"`echo '$''{'kb_cv_func_getcwd_forks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1669,1675 ****
kb_cv_func_getcwd_forks=no
else
cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
kb_cv_func_getcwd_forks=no
else
--- 1760,1766 ----
return 0;
}
EOF
! if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
kb_cv_func_getcwd_forks=no
else
***************
*** 1778,1803 ****
# Make sure we can run config.sub.
! if $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:1787: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
! if host_alias=`$ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
! host=`$ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
--- 1857,1882 ----
# Make sure we can run config.sub.
! if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:1866: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
! if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
! host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
***************
*** 1815,1821 ****
echo $ac_n "checking where the main texmf tree is located""... $ac_c" 1>&6
! echo "configure:1819: checking where the main texmf tree is located" >&5
texmfmain=
if test "x$datadir" != 'x${prefix}/share'; then
# First case, datadir is defined...
--- 1894,1900 ----
echo $ac_n "checking where the main texmf tree is located""... $ac_c" 1>&6
! echo "configure:1898: checking where the main texmf tree is located" >&5
texmfmain=
if test "x$datadir" != 'x${prefix}/share'; then
# First case, datadir is defined...
***************
*** 1870,1876 ****
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
! case `(ac_space=' '; set) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
--- 1949,1955 ----
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
! case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
***************
*** 1937,1943 ****
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
! echo "$CONFIG_STATUS generated by autoconf version 2.12"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
--- 2016,2022 ----
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
! echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
***************
*** 1957,1965 ****
--- 2036,2046 ----
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
+ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+ s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
***************
*** 1981,1986 ****
--- 2062,2068 ----
s%@KPSEVERSION@%$KPSEVERSION%g
s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@LN_S@%$LN_S%g
s%@SET_MAKE@%$SET_MAKE%g
diff -cNr octave-2.0.13/kpathsea/elt-dirs.c octave-2.0.14/kpathsea/elt-dirs.c
*** octave-2.0.13/kpathsea/elt-dirs.c Fri Feb 6 19:02:18 1998
--- octave-2.0.14/kpathsea/elt-dirs.c Fri Sep 25 14:12:38 1998
***************
*** 68,73 ****
--- 68,100 ----
static cache_entry *the_cache = NULL;
static unsigned cache_length = 0;
+ void
+ kpse_clear_dir_cache P1H(void)
+ {
+ while (cache_length > 0)
+ {
+ str_llist_type elt = *the_cache[--cache_length].value;
+
+ while (elt)
+ {
+ str_llist_type next = STR_LLIST_NEXT (*elt);
+
+ string s = STR_LLIST (*elt);
+
+ if (s)
+ free (s);
+
+ free (elt);
+
+ elt = next;
+ }
+ }
+
+ if (the_cache)
+ free (the_cache);
+
+ the_cache = NULL;
+ }
/* Associate KEY with VALUE. We implement the cache as a simple linear
list, since it's unlikely to ever be more than a dozen or so elements
diff -cNr octave-2.0.13/kpathsea/kdefault.c octave-2.0.14/kpathsea/kdefault.c
*** octave-2.0.13/kpathsea/kdefault.c Fri Oct 17 04:17:53 1997
--- octave-2.0.14/kpathsea/kdefault.c Fri Nov 13 08:24:33 1998
***************
*** 26,32 ****
/* Check for leading colon first, then trailing, then doubled, since
! that is fastest. Usually it will be leading or trailing. */
string
kpse_expand_default P2C(const_string, path, const_string, fallback)
--- 26,33 ----
/* Check for leading colon first, then trailing, then doubled, since
! that is fastest. Usually it will be leading or trailing.
! Always returns a pointer to newly allocated storage. */
string
kpse_expand_default P2C(const_string, path, const_string, fallback)
***************
*** 38,49 ****
assert (fallback);
if (path == NULL)
! expansion = (string) fallback;
/* Solitary or leading :? */
else if (IS_ENV_SEP (*path))
{
! expansion = path[1] == 0 ? (string) fallback : concat (fallback, path);
}
/* Sorry about the assignment in the middle of the expression, but
--- 39,50 ----
assert (fallback);
if (path == NULL)
! expansion = xstrdup (fallback);
/* Solitary or leading :? */
else if (IS_ENV_SEP (*path))
{
! expansion = path[1] == 0 ? xstrdup (fallback) : concat (fallback, path);
}
/* Sorry about the assignment in the middle of the expression, but
***************
*** 60,68 ****
const_string loc;
/* What we'll return if we find none. */
! expansion = (string) path;
! for (loc = path; *loc && expansion == path; loc++)
{
if (IS_ENV_SEP (loc[0]) && IS_ENV_SEP (loc[1]))
{ /* We have a doubled colon. */
--- 61,69 ----
const_string loc;
/* What we'll return if we find none. */
! expansion = xstrdup (path);
! for (loc = path; *loc; loc++)
{
if (IS_ENV_SEP (loc[0]) && IS_ENV_SEP (loc[1]))
{ /* We have a doubled colon. */
***************
*** 75,80 ****
--- 76,83 ----
/* Copy in FALLBACK, and then the rest of PATH. */
strcat (expansion, fallback);
strcat (expansion, loc + 1);
+
+ break;
}
}
}
diff -cNr octave-2.0.13/kpathsea/pathsearch.h octave-2.0.14/kpathsea/pathsearch.h
*** octave-2.0.13/kpathsea/pathsearch.h Fri Jan 3 17:00:01 1997
--- octave-2.0.14/kpathsea/pathsearch.h Fri Sep 25 13:28:51 1998
***************
*** 72,76 ****
--- 72,79 ----
all the filenames (or NULL if none), instead of taking the first. */
extern string *kpse_all_path_search P2H(const_string path, const_string name);
+ /* Clear the directory cache. */
+ extern void kpse_clear_dir_cache P1H(void);
+
#endif /* not KPATHSEA_PATHSEARCH_H */
diff -cNr octave-2.0.13/kpathsea/stamp-auto octave-2.0.14/kpathsea/stamp-auto
*** octave-2.0.13/kpathsea/stamp-auto Thu May 21 13:17:06 1998
--- octave-2.0.14/kpathsea/stamp-auto Fri Jan 22 21:50:35 1999
***************
*** 1 ****
! Thu May 21 13:17:06 CDT 1998
--- 1 ----
! Fri Jan 22 21:50:35 CST 1999
diff -cNr octave-2.0.13/libcruft/ChangeLog octave-2.0.14/libcruft/ChangeLog
*** octave-2.0.13/libcruft/ChangeLog Thu May 21 13:15:59 1998
--- octave-2.0.14/libcruft/ChangeLog Wed Apr 14 12:55:57 1999
***************
*** 1,3 ****
--- 1,28 ----
+ Wed Apr 14 12:55:42 1999 John W. Eaton
+
+ * Version 2.0.14 released.
+
+ Fri Mar 26 01:19:04 1999 John W. Eaton
+
+ * Makerules.in (all): Don't try to use a special rule for making
+ the archive. The default rules may be slower, but they are also
+ correct.
+
+ Wed Nov 11 17:27:35 1998 John W. Eaton
+
+ * Makefile.in (CRUFT_DIRS): Add amos. Delete specfun.
+ * specfun: Delete directory.
+ * amos: New directory
+
+ Thu Oct 15 00:43:13 1998 John W. Eaton
+
+ * ranlib: Update to newer version of randlib.
+ * ranlib/Makefile.in (SPECIAL): Update list.
+
+ Tue Jun 2 09:57:52 1998 John W. Eaton
+
+ * specfun/rybesl.f (rybesl): Don't access by(2) unless nb .gt. 1.
+
Thu May 21 13:15:36 1998 John W. Eaton
* Version 2.0.13 released.
diff -cNr octave-2.0.13/libcruft/Makefile.in octave-2.0.14/libcruft/Makefile.in
*** octave-2.0.13/libcruft/Makefile.in Mon Feb 2 23:33:31 1998
--- octave-2.0.14/libcruft/Makefile.in Wed Nov 11 17:27:35 1998
***************
*** 24,31 ****
# generate a new configure script in the top-level directory (edit
# configure.in and run autoconf).
! CRUFT_DIRS = balgen blas dassl eispack fftpack lapack linpack \
! minpack misc odepack quadpack ranlib specfun slatec-err \
slatec-fn villad
SUBDIRS = $(CRUFT_DIRS)
--- 24,31 ----
# generate a new configure script in the top-level directory (edit
# configure.in and run autoconf).
! CRUFT_DIRS = amos balgen blas dassl eispack fftpack lapack linpack \
! minpack misc odepack quadpack ranlib slatec-err \
slatec-fn villad
SUBDIRS = $(CRUFT_DIRS)
diff -cNr octave-2.0.13/libcruft/Makerules.in octave-2.0.14/libcruft/Makerules.in
*** octave-2.0.13/libcruft/Makerules.in Wed Dec 10 01:17:44 1997
--- octave-2.0.14/libcruft/Makerules.in Fri Mar 26 01:21:19 1999
***************
*** 33,55 ****
LIBCRUFT_DEPS = $(LIBCRUFT)($(LIBCRUFT_OBJS))
! all: pic $(LIBCRUFT) $(CRUFT_PICOBJ) $(SPECIAL_PICDEPEND)
.PHONY: all
-
- # Cancel the default action for when an archive member is out of
- # date. Instead of inserting the out of date members individually, we
- # will insert them in batches, even if some of them are up to date.
- # This is much faster for a large archive like libcruft.a.
-
- (%) : %
- @true
-
- $(LIBCRUFT): $(LIBCRUFT_DEPS)
- $(AR) $(ARFLAGS) $(LIBCRUFT) $(LIBCRUFT_OBJS)
- $(RANLIB) $(LIBCRUFT)
-
- # This is necessary, otherwise we won't have any .o files left when it
- # comes time to insert them in the archive.
.PRECIOUS: $(LIBCRUFT_OBJS)
--- 33,40 ----
LIBCRUFT_DEPS = $(LIBCRUFT)($(LIBCRUFT_OBJS))
! all: pic $(LIBCRUFT_DEPS) $(CRUFT_PICOBJ) $(SPECIAL_PICDEPEND)
.PHONY: all
.PRECIOUS: $(LIBCRUFT_OBJS)
diff -cNr octave-2.0.13/libcruft/amos/Makefile.in octave-2.0.14/libcruft/amos/Makefile.in
*** octave-2.0.13/libcruft/amos/Makefile.in Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/Makefile.in Wed Nov 11 17:34:40 1998
***************
*** 0 ****
--- 1,19 ----
+ #
+ # Makefile for octave's libcruft/amos directory
+ #
+ # John W. Eaton
+ # jwe@bevo.che.wisc.edu
+ # University of Wisconsin-Madison
+ # Department of Chemical Engineering
+
+ TOPDIR = ../..
+
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+
+ EXTERNAL_DISTFILES = $(DISTFILES)
+
+ include $(TOPDIR)/Makeconf
+
+ include ../Makerules
diff -cNr octave-2.0.13/libcruft/amos/dgamln.f octave-2.0.14/libcruft/amos/dgamln.f
*** octave-2.0.13/libcruft/amos/dgamln.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/dgamln.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,189 ----
+ DOUBLE PRECISION FUNCTION DGAMLN(Z,IERR)
+ C***BEGIN PROLOGUE DGAMLN
+ C***DATE WRITTEN 830501 (YYMMDD)
+ C***REVISION DATE 830501 (YYMMDD)
+ C***CATEGORY NO. B5F
+ C***KEYWORDS GAMMA FUNCTION,LOGARITHM OF GAMMA FUNCTION
+ C***AUTHOR AMOS, DONALD E., SANDIA NATIONAL LABORATORIES
+ C***PURPOSE TO COMPUTE THE LOGARITHM OF THE GAMMA FUNCTION
+ C***DESCRIPTION
+ C
+ C **** A DOUBLE PRECISION ROUTINE ****
+ C DGAMLN COMPUTES THE NATURAL LOG OF THE GAMMA FUNCTION FOR
+ C Z.GT.0. THE ASYMPTOTIC EXPANSION IS USED TO GENERATE VALUES
+ C GREATER THAN ZMIN WHICH ARE ADJUSTED BY THE RECURSION
+ C G(Z+1)=Z*G(Z) FOR Z.LE.ZMIN. THE FUNCTION WAS MADE AS
+ C PORTABLE AS POSSIBLE BY COMPUTIMG ZMIN FROM THE NUMBER OF BASE
+ C 10 DIGITS IN A WORD, RLN=AMAX1(-ALOG10(R1MACH(4)),0.5E-18)
+ C LIMITED TO 18 DIGITS OF (RELATIVE) ACCURACY.
+ C
+ C SINCE INTEGER ARGUMENTS ARE COMMON, A TABLE LOOK UP ON 100
+ C VALUES IS USED FOR SPEED OF EXECUTION.
+ C
+ C DESCRIPTION OF ARGUMENTS
+ C
+ C INPUT Z IS D0UBLE PRECISION
+ C Z - ARGUMENT, Z.GT.0.0D0
+ C
+ C OUTPUT DGAMLN IS DOUBLE PRECISION
+ C DGAMLN - NATURAL LOG OF THE GAMMA FUNCTION AT Z.NE.0.0D0
+ C IERR - ERROR FLAG
+ C IERR=0, NORMAL RETURN, COMPUTATION COMPLETED
+ C IERR=1, Z.LE.0.0D0, NO COMPUTATION
+ C
+ C
+ C***REFERENCES COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C BY D. E. AMOS, SAND83-0083, MAY, 1983.
+ C***ROUTINES CALLED I1MACH,D1MACH
+ C***END PROLOGUE DGAMLN
+ DOUBLE PRECISION CF, CON, FLN, FZ, GLN, RLN, S, TLG, TRM, TST,
+ * T1, WDTOL, Z, ZDMY, ZINC, ZM, ZMIN, ZP, ZSQ, D1MACH
+ INTEGER I, IERR, I1M, K, MZ, NZ, I1MACH
+ DIMENSION CF(22), GLN(100)
+ C LNGAMMA(N), N=1,100
+ DATA GLN(1), GLN(2), GLN(3), GLN(4), GLN(5), GLN(6), GLN(7),
+ 1 GLN(8), GLN(9), GLN(10), GLN(11), GLN(12), GLN(13), GLN(14),
+ 2 GLN(15), GLN(16), GLN(17), GLN(18), GLN(19), GLN(20),
+ 3 GLN(21), GLN(22)/
+ 4 0.00000000000000000D+00, 0.00000000000000000D+00,
+ 5 6.93147180559945309D-01, 1.79175946922805500D+00,
+ 6 3.17805383034794562D+00, 4.78749174278204599D+00,
+ 7 6.57925121201010100D+00, 8.52516136106541430D+00,
+ 8 1.06046029027452502D+01, 1.28018274800814696D+01,
+ 9 1.51044125730755153D+01, 1.75023078458738858D+01,
+ A 1.99872144956618861D+01, 2.25521638531234229D+01,
+ B 2.51912211827386815D+01, 2.78992713838408916D+01,
+ C 3.06718601060806728D+01, 3.35050734501368889D+01,
+ D 3.63954452080330536D+01, 3.93398841871994940D+01,
+ E 4.23356164607534850D+01, 4.53801388984769080D+01/
+ DATA GLN(23), GLN(24), GLN(25), GLN(26), GLN(27), GLN(28),
+ 1 GLN(29), GLN(30), GLN(31), GLN(32), GLN(33), GLN(34),
+ 2 GLN(35), GLN(36), GLN(37), GLN(38), GLN(39), GLN(40),
+ 3 GLN(41), GLN(42), GLN(43), GLN(44)/
+ 4 4.84711813518352239D+01, 5.16066755677643736D+01,
+ 5 5.47847293981123192D+01, 5.80036052229805199D+01,
+ 6 6.12617017610020020D+01, 6.45575386270063311D+01,
+ 7 6.78897431371815350D+01, 7.12570389671680090D+01,
+ 8 7.46582363488301644D+01, 7.80922235533153106D+01,
+ 9 8.15579594561150372D+01, 8.50544670175815174D+01,
+ A 8.85808275421976788D+01, 9.21361756036870925D+01,
+ B 9.57196945421432025D+01, 9.93306124547874269D+01,
+ C 1.02968198614513813D+02, 1.06631760260643459D+02,
+ D 1.10320639714757395D+02, 1.14034211781461703D+02,
+ E 1.17771881399745072D+02, 1.21533081515438634D+02/
+ DATA GLN(45), GLN(46), GLN(47), GLN(48), GLN(49), GLN(50),
+ 1 GLN(51), GLN(52), GLN(53), GLN(54), GLN(55), GLN(56),
+ 2 GLN(57), GLN(58), GLN(59), GLN(60), GLN(61), GLN(62),
+ 3 GLN(63), GLN(64), GLN(65), GLN(66)/
+ 4 1.25317271149356895D+02, 1.29123933639127215D+02,
+ 5 1.32952575035616310D+02, 1.36802722637326368D+02,
+ 6 1.40673923648234259D+02, 1.44565743946344886D+02,
+ 7 1.48477766951773032D+02, 1.52409592584497358D+02,
+ 8 1.56360836303078785D+02, 1.60331128216630907D+02,
+ 9 1.64320112263195181D+02, 1.68327445448427652D+02,
+ A 1.72352797139162802D+02, 1.76395848406997352D+02,
+ B 1.80456291417543771D+02, 1.84533828861449491D+02,
+ C 1.88628173423671591D+02, 1.92739047287844902D+02,
+ D 1.96866181672889994D+02, 2.01009316399281527D+02,
+ E 2.05168199482641199D+02, 2.09342586752536836D+02/
+ DATA GLN(67), GLN(68), GLN(69), GLN(70), GLN(71), GLN(72),
+ 1 GLN(73), GLN(74), GLN(75), GLN(76), GLN(77), GLN(78),
+ 2 GLN(79), GLN(80), GLN(81), GLN(82), GLN(83), GLN(84),
+ 3 GLN(85), GLN(86), GLN(87), GLN(88)/
+ 4 2.13532241494563261D+02, 2.17736934113954227D+02,
+ 5 2.21956441819130334D+02, 2.26190548323727593D+02,
+ 6 2.30439043565776952D+02, 2.34701723442818268D+02,
+ 7 2.38978389561834323D+02, 2.43268849002982714D+02,
+ 8 2.47572914096186884D+02, 2.51890402209723194D+02,
+ 9 2.56221135550009525D+02, 2.60564940971863209D+02,
+ A 2.64921649798552801D+02, 2.69291097651019823D+02,
+ B 2.73673124285693704D+02, 2.78067573440366143D+02,
+ C 2.82474292687630396D+02, 2.86893133295426994D+02,
+ D 2.91323950094270308D+02, 2.95766601350760624D+02,
+ E 3.00220948647014132D+02, 3.04686856765668715D+02/
+ DATA GLN(89), GLN(90), GLN(91), GLN(92), GLN(93), GLN(94),
+ 1 GLN(95), GLN(96), GLN(97), GLN(98), GLN(99), GLN(100)/
+ 2 3.09164193580146922D+02, 3.13652829949879062D+02,
+ 3 3.18152639620209327D+02, 3.22663499126726177D+02,
+ 4 3.27185287703775217D+02, 3.31717887196928473D+02,
+ 5 3.36261181979198477D+02, 3.40815058870799018D+02,
+ 6 3.45379407062266854D+02, 3.49954118040770237D+02,
+ 7 3.54539085519440809D+02, 3.59134205369575399D+02/
+ C COEFFICIENTS OF ASYMPTOTIC EXPANSION
+ DATA CF(1), CF(2), CF(3), CF(4), CF(5), CF(6), CF(7), CF(8),
+ 1 CF(9), CF(10), CF(11), CF(12), CF(13), CF(14), CF(15),
+ 2 CF(16), CF(17), CF(18), CF(19), CF(20), CF(21), CF(22)/
+ 3 8.33333333333333333D-02, -2.77777777777777778D-03,
+ 4 7.93650793650793651D-04, -5.95238095238095238D-04,
+ 5 8.41750841750841751D-04, -1.91752691752691753D-03,
+ 6 6.41025641025641026D-03, -2.95506535947712418D-02,
+ 7 1.79644372368830573D-01, -1.39243221690590112D+00,
+ 8 1.34028640441683920D+01, -1.56848284626002017D+02,
+ 9 2.19310333333333333D+03, -3.61087712537249894D+04,
+ A 6.91472268851313067D+05, -1.52382215394074162D+07,
+ B 3.82900751391414141D+08, -1.08822660357843911D+10,
+ C 3.47320283765002252D+11, -1.23696021422692745D+13,
+ D 4.88788064793079335D+14, -2.13203339609193739D+16/
+ C
+ C LN(2*PI)
+ DATA CON / 1.83787706640934548D+00/
+ C
+ C***FIRST EXECUTABLE STATEMENT DGAMLN
+ IERR=0
+ IF (Z.LE.0.0D0) GO TO 70
+ IF (Z.GT.101.0D0) GO TO 10
+ NZ = INT(SNGL(Z))
+ FZ = Z - FLOAT(NZ)
+ IF (FZ.GT.0.0D0) GO TO 10
+ IF (NZ.GT.100) GO TO 10
+ DGAMLN = GLN(NZ)
+ RETURN
+ 10 CONTINUE
+ WDTOL = D1MACH(4)
+ WDTOL = DMAX1(WDTOL,0.5D-18)
+ I1M = I1MACH(14)
+ RLN = D1MACH(5)*FLOAT(I1M)
+ FLN = DMIN1(RLN,20.0D0)
+ FLN = DMAX1(FLN,3.0D0)
+ FLN = FLN - 3.0D0
+ ZM = 1.8000D0 + 0.3875D0*FLN
+ MZ = INT(SNGL(ZM)) + 1
+ ZMIN = FLOAT(MZ)
+ ZDMY = Z
+ ZINC = 0.0D0
+ IF (Z.GE.ZMIN) GO TO 20
+ ZINC = ZMIN - FLOAT(NZ)
+ ZDMY = Z + ZINC
+ 20 CONTINUE
+ ZP = 1.0D0/ZDMY
+ T1 = CF(1)*ZP
+ S = T1
+ IF (ZP.LT.WDTOL) GO TO 40
+ ZSQ = ZP*ZP
+ TST = T1*WDTOL
+ DO 30 K=2,22
+ ZP = ZP*ZSQ
+ TRM = CF(K)*ZP
+ IF (DABS(TRM).LT.TST) GO TO 40
+ S = S + TRM
+ 30 CONTINUE
+ 40 CONTINUE
+ IF (ZINC.NE.0.0D0) GO TO 50
+ TLG = DLOG(Z)
+ DGAMLN = Z*(TLG-1.0D0) + 0.5D0*(CON-TLG) + S
+ RETURN
+ 50 CONTINUE
+ ZP = 1.0D0
+ NZ = INT(SNGL(ZINC))
+ DO 60 I=1,NZ
+ ZP = ZP*(Z+FLOAT(I-1))
+ 60 CONTINUE
+ TLG = DLOG(ZDMY)
+ DGAMLN = ZDMY*(TLG-1.0D0) - DLOG(ZP) + 0.5D0*(CON-TLG) + S
+ RETURN
+ C
+ C
+ 70 CONTINUE
+ IERR=1
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/xzabs.f octave-2.0.14/libcruft/amos/xzabs.f
*** octave-2.0.13/libcruft/amos/xzabs.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/xzabs.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,29 ----
+ DOUBLE PRECISION FUNCTION XZABS(ZR, ZI)
+ C***BEGIN PROLOGUE XZABS
+ C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY
+ C
+ C XZABS COMPUTES THE ABSOLUTE VALUE OR MAGNITUDE OF A DOUBLE
+ C PRECISION COMPLEX VARIABLE CMPLX(ZR,ZI)
+ C
+ C***ROUTINES CALLED (NONE)
+ C***END PROLOGUE XZABS
+ DOUBLE PRECISION ZR, ZI, U, V, Q, S
+ U = DABS(ZR)
+ V = DABS(ZI)
+ S = U + V
+ C-----------------------------------------------------------------------
+ C S*1.0D0 MAKES AN UNNORMALIZED UNDERFLOW ON CDC MACHINES INTO A
+ C TRUE FLOATING ZERO
+ C-----------------------------------------------------------------------
+ S = S*1.0D+0
+ IF (S.EQ.0.0D+0) GO TO 20
+ IF (U.GT.V) GO TO 10
+ Q = U/V
+ XZABS = V*DSQRT(1.D+0+Q*Q)
+ RETURN
+ 10 Q = V/U
+ XZABS = U*DSQRT(1.D+0+Q*Q)
+ RETURN
+ 20 XZABS = 0.0D+0
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/xzexp.f octave-2.0.14/libcruft/amos/xzexp.f
*** octave-2.0.13/libcruft/amos/xzexp.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/xzexp.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,16 ----
+ SUBROUTINE XZEXP(AR, AI, BR, BI)
+ C***BEGIN PROLOGUE XZEXP
+ C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY
+ C
+ C DOUBLE PRECISION COMPLEX EXPONENTIAL FUNCTION B=EXP(A)
+ C
+ C***ROUTINES CALLED (NONE)
+ C***END PROLOGUE XZEXP
+ DOUBLE PRECISION AR, AI, BR, BI, ZM, CA, CB
+ ZM = DEXP(AR)
+ CA = ZM*DCOS(AI)
+ CB = ZM*DSIN(AI)
+ BR = CA
+ BI = CB
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/xzlog.f octave-2.0.14/libcruft/amos/xzlog.f
*** octave-2.0.13/libcruft/amos/xzlog.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/xzlog.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,41 ----
+ SUBROUTINE XZLOG(AR, AI, BR, BI, IERR)
+ C***BEGIN PROLOGUE XZLOG
+ C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY
+ C
+ C DOUBLE PRECISION COMPLEX LOGARITHM B=CLOG(A)
+ C IERR=0,NORMAL RETURN IERR=1, Z=CMPLX(0.0,0.0)
+ C***ROUTINES CALLED XZABS
+ C***END PROLOGUE XZLOG
+ DOUBLE PRECISION AR, AI, BR, BI, ZM, DTHETA, DPI, DHPI
+ DOUBLE PRECISION XZABS
+ DATA DPI , DHPI / 3.141592653589793238462643383D+0,
+ 1 1.570796326794896619231321696D+0/
+ C
+ IERR=0
+ IF (AR.EQ.0.0D+0) GO TO 10
+ IF (AI.EQ.0.0D+0) GO TO 20
+ DTHETA = DATAN(AI/AR)
+ IF (DTHETA.LE.0.0D+0) GO TO 40
+ IF (AR.LT.0.0D+0) DTHETA = DTHETA - DPI
+ GO TO 50
+ 10 IF (AI.EQ.0.0D+0) GO TO 60
+ BI = DHPI
+ BR = DLOG(DABS(AI))
+ IF (AI.LT.0.0D+0) BI = -BI
+ RETURN
+ 20 IF (AR.GT.0.0D+0) GO TO 30
+ BR = DLOG(DABS(AR))
+ BI = DPI
+ RETURN
+ 30 BR = DLOG(AR)
+ BI = 0.0D+0
+ RETURN
+ 40 IF (AR.LT.0.0D+0) DTHETA = DTHETA + DPI
+ 50 ZM = XZABS(AR,AI)
+ BR = DLOG(ZM)
+ BI = DTHETA
+ RETURN
+ 60 CONTINUE
+ IERR=1
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/xzsqrt.f octave-2.0.14/libcruft/amos/xzsqrt.f
*** octave-2.0.13/libcruft/amos/xzsqrt.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/xzsqrt.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,44 ----
+ SUBROUTINE XZSQRT(AR, AI, BR, BI)
+ C***BEGIN PROLOGUE XZSQRT
+ C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY
+ C
+ C DOUBLE PRECISION COMPLEX SQUARE ROOT, B=CSQRT(A)
+ C
+ C***ROUTINES CALLED XZABS
+ C***END PROLOGUE XZSQRT
+ DOUBLE PRECISION AR, AI, BR, BI, ZM, DTHETA, DPI, DRT
+ DOUBLE PRECISION XZABS
+ DATA DRT , DPI / 7.071067811865475244008443621D-1,
+ 1 3.141592653589793238462643383D+0/
+ ZM = XZABS(AR,AI)
+ ZM = DSQRT(ZM)
+ IF (AR.EQ.0.0D+0) GO TO 10
+ IF (AI.EQ.0.0D+0) GO TO 20
+ DTHETA = DATAN(AI/AR)
+ IF (DTHETA.LE.0.0D+0) GO TO 40
+ IF (AR.LT.0.0D+0) DTHETA = DTHETA - DPI
+ GO TO 50
+ 10 IF (AI.GT.0.0D+0) GO TO 60
+ IF (AI.LT.0.0D+0) GO TO 70
+ BR = 0.0D+0
+ BI = 0.0D+0
+ RETURN
+ 20 IF (AR.GT.0.0D+0) GO TO 30
+ BR = 0.0D+0
+ BI = DSQRT(DABS(AR))
+ RETURN
+ 30 BR = DSQRT(AR)
+ BI = 0.0D+0
+ RETURN
+ 40 IF (AR.LT.0.0D+0) DTHETA = DTHETA + DPI
+ 50 DTHETA = DTHETA*0.5D+0
+ BR = ZM*DCOS(DTHETA)
+ BI = ZM*DSIN(DTHETA)
+ RETURN
+ 60 BR = ZM*DRT
+ BI = ZM*DRT
+ RETURN
+ 70 BR = ZM*DRT
+ BI = -ZM*DRT
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zacai.f octave-2.0.14/libcruft/amos/zacai.f
*** octave-2.0.13/libcruft/amos/zacai.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zacai.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,99 ----
+ SUBROUTINE ZACAI(ZR, ZI, FNU, KODE, MR, N, YR, YI, NZ, RL, TOL,
+ * ELIM, ALIM)
+ C***BEGIN PROLOGUE ZACAI
+ C***REFER TO ZAIRY
+ C
+ C ZACAI APPLIES THE ANALYTIC CONTINUATION FORMULA
+ C
+ C K(FNU,ZN*EXP(MP))=K(FNU,ZN)*EXP(-MP*FNU) - MP*I(FNU,ZN)
+ C MP=PI*MR*CMPLX(0.0,1.0)
+ C
+ C TO CONTINUE THE K FUNCTION FROM THE RIGHT HALF TO THE LEFT
+ C HALF Z PLANE FOR USE WITH ZAIRY WHERE FNU=1/3 OR 2/3 AND N=1.
+ C ZACAI IS THE SAME AS ZACON WITH THE PARTS FOR LARGER ORDERS AND
+ C RECURRENCE REMOVED. A RECURSIVE CALL TO ZACON CAN RESULT IF ZACON
+ C IS CALLED FROM ZAIRY.
+ C
+ C***ROUTINES CALLED ZASYI,ZBKNU,ZMLRI,ZSERI,ZS1S2,D1MACH,XZABS
+ C***END PROLOGUE ZACAI
+ C COMPLEX CSGN,CSPN,C1,C2,Y,Z,ZN,CY
+ DOUBLE PRECISION ALIM, ARG, ASCLE, AZ, CSGNR, CSGNI, CSPNR,
+ * CSPNI, C1R, C1I, C2R, C2I, CYR, CYI, DFNU, ELIM, FMR, FNU, PI,
+ * RL, SGN, TOL, YY, YR, YI, ZR, ZI, ZNR, ZNI, D1MACH, XZABS
+ INTEGER INU, IUF, KODE, MR, N, NN, NW, NZ
+ DIMENSION YR(N), YI(N), CYR(2), CYI(2)
+ DATA PI / 3.14159265358979324D0 /
+ NZ = 0
+ ZNR = -ZR
+ ZNI = -ZI
+ AZ = XZABS(ZR,ZI)
+ NN = N
+ DFNU = FNU + DBLE(FLOAT(N-1))
+ IF (AZ.LE.2.0D0) GO TO 10
+ IF (AZ*AZ*0.25D0.GT.DFNU+1.0D0) GO TO 20
+ 10 CONTINUE
+ C-----------------------------------------------------------------------
+ C POWER SERIES FOR THE I FUNCTION
+ C-----------------------------------------------------------------------
+ CALL ZSERI(ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, TOL, ELIM, ALIM)
+ GO TO 40
+ 20 CONTINUE
+ IF (AZ.LT.RL) GO TO 30
+ C-----------------------------------------------------------------------
+ C ASYMPTOTIC EXPANSION FOR LARGE Z FOR THE I FUNCTION
+ C-----------------------------------------------------------------------
+ CALL ZASYI(ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, RL, TOL, ELIM,
+ * ALIM)
+ IF (NW.LT.0) GO TO 80
+ GO TO 40
+ 30 CONTINUE
+ C-----------------------------------------------------------------------
+ C MILLER ALGORITHM NORMALIZED BY THE SERIES FOR THE I FUNCTION
+ C-----------------------------------------------------------------------
+ CALL ZMLRI(ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, TOL)
+ IF(NW.LT.0) GO TO 80
+ 40 CONTINUE
+ C-----------------------------------------------------------------------
+ C ANALYTIC CONTINUATION TO THE LEFT HALF PLANE FOR THE K FUNCTION
+ C-----------------------------------------------------------------------
+ CALL ZBKNU(ZNR, ZNI, FNU, KODE, 1, CYR, CYI, NW, TOL, ELIM, ALIM)
+ IF (NW.NE.0) GO TO 80
+ FMR = DBLE(FLOAT(MR))
+ SGN = -DSIGN(PI,FMR)
+ CSGNR = 0.0D0
+ CSGNI = SGN
+ IF (KODE.EQ.1) GO TO 50
+ YY = -ZNI
+ CSGNR = -CSGNI*DSIN(YY)
+ CSGNI = CSGNI*DCOS(YY)
+ 50 CONTINUE
+ C-----------------------------------------------------------------------
+ C CALCULATE CSPN=EXP(FNU*PI*I) TO MINIMIZE LOSSES OF SIGNIFICANCE
+ C WHEN FNU IS LARGE
+ C-----------------------------------------------------------------------
+ INU = INT(SNGL(FNU))
+ ARG = (FNU-DBLE(FLOAT(INU)))*SGN
+ CSPNR = DCOS(ARG)
+ CSPNI = DSIN(ARG)
+ IF (MOD(INU,2).EQ.0) GO TO 60
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ 60 CONTINUE
+ C1R = CYR(1)
+ C1I = CYI(1)
+ C2R = YR(1)
+ C2I = YI(1)
+ IF (KODE.EQ.1) GO TO 70
+ IUF = 0
+ ASCLE = 1.0D+3*D1MACH(1)/TOL
+ CALL ZS1S2(ZNR, ZNI, C1R, C1I, C2R, C2I, NW, ASCLE, ALIM, IUF)
+ NZ = NZ + NW
+ 70 CONTINUE
+ YR(1) = CSPNR*C1R - CSPNI*C1I + CSGNR*C2R - CSGNI*C2I
+ YI(1) = CSPNR*C1I + CSPNI*C1R + CSGNR*C2I + CSGNI*C2R
+ RETURN
+ 80 CONTINUE
+ NZ = -1
+ IF(NW.EQ.(-2)) NZ=-2
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zacon.f octave-2.0.14/libcruft/amos/zacon.f
*** octave-2.0.13/libcruft/amos/zacon.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zacon.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,203 ----
+ SUBROUTINE ZACON(ZR, ZI, FNU, KODE, MR, N, YR, YI, NZ, RL, FNUL,
+ * TOL, ELIM, ALIM)
+ C***BEGIN PROLOGUE ZACON
+ C***REFER TO ZBESK,ZBESH
+ C
+ C ZACON APPLIES THE ANALYTIC CONTINUATION FORMULA
+ C
+ C K(FNU,ZN*EXP(MP))=K(FNU,ZN)*EXP(-MP*FNU) - MP*I(FNU,ZN)
+ C MP=PI*MR*CMPLX(0.0,1.0)
+ C
+ C TO CONTINUE THE K FUNCTION FROM THE RIGHT HALF TO THE LEFT
+ C HALF Z PLANE
+ C
+ C***ROUTINES CALLED ZBINU,ZBKNU,ZS1S2,D1MACH,XZABS,ZMLT
+ C***END PROLOGUE ZACON
+ C COMPLEX CK,CONE,CSCL,CSCR,CSGN,CSPN,CY,CZERO,C1,C2,RZ,SC1,SC2,ST,
+ C *S1,S2,Y,Z,ZN
+ DOUBLE PRECISION ALIM, ARG, ASCLE, AS2, AZN, BRY, BSCLE, CKI,
+ * CKR, CONER, CPN, CSCL, CSCR, CSGNI, CSGNR, CSPNI, CSPNR,
+ * CSR, CSRR, CSSR, CYI, CYR, C1I, C1M, C1R, C2I, C2R, ELIM, FMR,
+ * FN, FNU, FNUL, PI, PTI, PTR, RAZN, RL, RZI, RZR, SC1I, SC1R,
+ * SC2I, SC2R, SGN, SPN, STI, STR, S1I, S1R, S2I, S2R, TOL, YI, YR,
+ * YY, ZEROR, ZI, ZNI, ZNR, ZR, D1MACH, XZABS
+ INTEGER I, INU, IUF, KFLAG, KODE, MR, N, NN, NW, NZ
+ DIMENSION YR(N), YI(N), CYR(2), CYI(2), CSSR(3), CSRR(3), BRY(3)
+ DATA PI / 3.14159265358979324D0 /
+ DATA ZEROR,CONER / 0.0D0,1.0D0 /
+ NZ = 0
+ ZNR = -ZR
+ ZNI = -ZI
+ NN = N
+ CALL ZBINU(ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, RL, FNUL, TOL,
+ * ELIM, ALIM)
+ IF (NW.LT.0) GO TO 90
+ C-----------------------------------------------------------------------
+ C ANALYTIC CONTINUATION TO THE LEFT HALF PLANE FOR THE K FUNCTION
+ C-----------------------------------------------------------------------
+ NN = MIN0(2,N)
+ CALL ZBKNU(ZNR, ZNI, FNU, KODE, NN, CYR, CYI, NW, TOL, ELIM, ALIM)
+ IF (NW.NE.0) GO TO 90
+ S1R = CYR(1)
+ S1I = CYI(1)
+ FMR = DBLE(FLOAT(MR))
+ SGN = -DSIGN(PI,FMR)
+ CSGNR = ZEROR
+ CSGNI = SGN
+ IF (KODE.EQ.1) GO TO 10
+ YY = -ZNI
+ CPN = DCOS(YY)
+ SPN = DSIN(YY)
+ CALL ZMLT(CSGNR, CSGNI, CPN, SPN, CSGNR, CSGNI)
+ 10 CONTINUE
+ C-----------------------------------------------------------------------
+ C CALCULATE CSPN=EXP(FNU*PI*I) TO MINIMIZE LOSSES OF SIGNIFICANCE
+ C WHEN FNU IS LARGE
+ C-----------------------------------------------------------------------
+ INU = INT(SNGL(FNU))
+ ARG = (FNU-DBLE(FLOAT(INU)))*SGN
+ CPN = DCOS(ARG)
+ SPN = DSIN(ARG)
+ CSPNR = CPN
+ CSPNI = SPN
+ IF (MOD(INU,2).EQ.0) GO TO 20
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ 20 CONTINUE
+ IUF = 0
+ C1R = S1R
+ C1I = S1I
+ C2R = YR(1)
+ C2I = YI(1)
+ ASCLE = 1.0D+3*D1MACH(1)/TOL
+ IF (KODE.EQ.1) GO TO 30
+ CALL ZS1S2(ZNR, ZNI, C1R, C1I, C2R, C2I, NW, ASCLE, ALIM, IUF)
+ NZ = NZ + NW
+ SC1R = C1R
+ SC1I = C1I
+ 30 CONTINUE
+ CALL ZMLT(CSPNR, CSPNI, C1R, C1I, STR, STI)
+ CALL ZMLT(CSGNR, CSGNI, C2R, C2I, PTR, PTI)
+ YR(1) = STR + PTR
+ YI(1) = STI + PTI
+ IF (N.EQ.1) RETURN
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ S2R = CYR(2)
+ S2I = CYI(2)
+ C1R = S2R
+ C1I = S2I
+ C2R = YR(2)
+ C2I = YI(2)
+ IF (KODE.EQ.1) GO TO 40
+ CALL ZS1S2(ZNR, ZNI, C1R, C1I, C2R, C2I, NW, ASCLE, ALIM, IUF)
+ NZ = NZ + NW
+ SC2R = C1R
+ SC2I = C1I
+ 40 CONTINUE
+ CALL ZMLT(CSPNR, CSPNI, C1R, C1I, STR, STI)
+ CALL ZMLT(CSGNR, CSGNI, C2R, C2I, PTR, PTI)
+ YR(2) = STR + PTR
+ YI(2) = STI + PTI
+ IF (N.EQ.2) RETURN
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ AZN = XZABS(ZNR,ZNI)
+ RAZN = 1.0D0/AZN
+ STR = ZNR*RAZN
+ STI = -ZNI*RAZN
+ RZR = (STR+STR)*RAZN
+ RZI = (STI+STI)*RAZN
+ FN = FNU + 1.0D0
+ CKR = FN*RZR
+ CKI = FN*RZI
+ C-----------------------------------------------------------------------
+ C SCALE NEAR EXPONENT EXTREMES DURING RECURRENCE ON K FUNCTIONS
+ C-----------------------------------------------------------------------
+ CSCL = 1.0D0/TOL
+ CSCR = TOL
+ CSSR(1) = CSCL
+ CSSR(2) = CONER
+ CSSR(3) = CSCR
+ CSRR(1) = CSCR
+ CSRR(2) = CONER
+ CSRR(3) = CSCL
+ BRY(1) = ASCLE
+ BRY(2) = 1.0D0/ASCLE
+ BRY(3) = D1MACH(2)
+ AS2 = XZABS(S2R,S2I)
+ KFLAG = 2
+ IF (AS2.GT.BRY(1)) GO TO 50
+ KFLAG = 1
+ GO TO 60
+ 50 CONTINUE
+ IF (AS2.LT.BRY(2)) GO TO 60
+ KFLAG = 3
+ 60 CONTINUE
+ BSCLE = BRY(KFLAG)
+ S1R = S1R*CSSR(KFLAG)
+ S1I = S1I*CSSR(KFLAG)
+ S2R = S2R*CSSR(KFLAG)
+ S2I = S2I*CSSR(KFLAG)
+ CSR = CSRR(KFLAG)
+ DO 80 I=3,N
+ STR = S2R
+ STI = S2I
+ S2R = CKR*STR - CKI*STI + S1R
+ S2I = CKR*STI + CKI*STR + S1I
+ S1R = STR
+ S1I = STI
+ C1R = S2R*CSR
+ C1I = S2I*CSR
+ STR = C1R
+ STI = C1I
+ C2R = YR(I)
+ C2I = YI(I)
+ IF (KODE.EQ.1) GO TO 70
+ IF (IUF.LT.0) GO TO 70
+ CALL ZS1S2(ZNR, ZNI, C1R, C1I, C2R, C2I, NW, ASCLE, ALIM, IUF)
+ NZ = NZ + NW
+ SC1R = SC2R
+ SC1I = SC2I
+ SC2R = C1R
+ SC2I = C1I
+ IF (IUF.NE.3) GO TO 70
+ IUF = -4
+ S1R = SC1R*CSSR(KFLAG)
+ S1I = SC1I*CSSR(KFLAG)
+ S2R = SC2R*CSSR(KFLAG)
+ S2I = SC2I*CSSR(KFLAG)
+ STR = SC2R
+ STI = SC2I
+ 70 CONTINUE
+ PTR = CSPNR*C1R - CSPNI*C1I
+ PTI = CSPNR*C1I + CSPNI*C1R
+ YR(I) = PTR + CSGNR*C2R - CSGNI*C2I
+ YI(I) = PTI + CSGNR*C2I + CSGNI*C2R
+ CKR = CKR + RZR
+ CKI = CKI + RZI
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ IF (KFLAG.GE.3) GO TO 80
+ PTR = DABS(C1R)
+ PTI = DABS(C1I)
+ C1M = DMAX1(PTR,PTI)
+ IF (C1M.LE.BSCLE) GO TO 80
+ KFLAG = KFLAG + 1
+ BSCLE = BRY(KFLAG)
+ S1R = S1R*CSR
+ S1I = S1I*CSR
+ S2R = STR
+ S2I = STI
+ S1R = S1R*CSSR(KFLAG)
+ S1I = S1I*CSSR(KFLAG)
+ S2R = S2R*CSSR(KFLAG)
+ S2I = S2I*CSSR(KFLAG)
+ CSR = CSRR(KFLAG)
+ 80 CONTINUE
+ RETURN
+ 90 CONTINUE
+ NZ = -1
+ IF(NW.EQ.(-2)) NZ=-2
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zairy.f octave-2.0.14/libcruft/amos/zairy.f
*** octave-2.0.13/libcruft/amos/zairy.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zairy.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,393 ----
+ SUBROUTINE ZAIRY(ZR, ZI, ID, KODE, AIR, AII, NZ, IERR)
+ C***BEGIN PROLOGUE ZAIRY
+ C***DATE WRITTEN 830501 (YYMMDD)
+ C***REVISION DATE 890801 (YYMMDD)
+ C***CATEGORY NO. B5K
+ C***KEYWORDS AIRY FUNCTION,BESSEL FUNCTIONS OF ORDER ONE THIRD
+ C***AUTHOR AMOS, DONALD E., SANDIA NATIONAL LABORATORIES
+ C***PURPOSE TO COMPUTE AIRY FUNCTIONS AI(Z) AND DAI(Z) FOR COMPLEX Z
+ C***DESCRIPTION
+ C
+ C ***A DOUBLE PRECISION ROUTINE***
+ C ON KODE=1, ZAIRY COMPUTES THE COMPLEX AIRY FUNCTION AI(Z) OR
+ C ITS DERIVATIVE DAI(Z)/DZ ON ID=0 OR ID=1 RESPECTIVELY. ON
+ C KODE=2, A SCALING OPTION CEXP(ZTA)*AI(Z) OR CEXP(ZTA)*
+ C DAI(Z)/DZ IS PROVIDED TO REMOVE THE EXPONENTIAL DECAY IN
+ C -PI/3.LT.ARG(Z).LT.PI/3 AND THE EXPONENTIAL GROWTH IN
+ C PI/3.LT.ABS(ARG(Z)).LT.PI WHERE ZTA=(2/3)*Z*CSQRT(Z).
+ C
+ C WHILE THE AIRY FUNCTIONS AI(Z) AND DAI(Z)/DZ ARE ANALYTIC IN
+ C THE WHOLE Z PLANE, THE CORRESPONDING SCALED FUNCTIONS DEFINED
+ C FOR KODE=2 HAVE A CUT ALONG THE NEGATIVE REAL AXIS.
+ C DEFINTIONS AND NOTATION ARE FOUND IN THE NBS HANDBOOK OF
+ C MATHEMATICAL FUNCTIONS (REF. 1).
+ C
+ C INPUT ZR,ZI ARE DOUBLE PRECISION
+ C ZR,ZI - Z=CMPLX(ZR,ZI)
+ C ID - ORDER OF DERIVATIVE, ID=0 OR ID=1
+ C KODE - A PARAMETER TO INDICATE THE SCALING OPTION
+ C KODE= 1 RETURNS
+ C AI=AI(Z) ON ID=0 OR
+ C AI=DAI(Z)/DZ ON ID=1
+ C = 2 RETURNS
+ C AI=CEXP(ZTA)*AI(Z) ON ID=0 OR
+ C AI=CEXP(ZTA)*DAI(Z)/DZ ON ID=1 WHERE
+ C ZTA=(2/3)*Z*CSQRT(Z)
+ C
+ C OUTPUT AIR,AII ARE DOUBLE PRECISION
+ C AIR,AII- COMPLEX ANSWER DEPENDING ON THE CHOICES FOR ID AND
+ C KODE
+ C NZ - UNDERFLOW INDICATOR
+ C NZ= 0 , NORMAL RETURN
+ C NZ= 1 , AI=CMPLX(0.0D0,0.0D0) DUE TO UNDERFLOW IN
+ C -PI/3.LT.ARG(Z).LT.PI/3 ON KODE=1
+ C IERR - ERROR FLAG
+ C IERR=0, NORMAL RETURN - COMPUTATION COMPLETED
+ C IERR=1, INPUT ERROR - NO COMPUTATION
+ C IERR=2, OVERFLOW - NO COMPUTATION, REAL(ZTA)
+ C TOO LARGE ON KODE=1
+ C IERR=3, CABS(Z) LARGE - COMPUTATION COMPLETED
+ C LOSSES OF SIGNIFCANCE BY ARGUMENT REDUCTION
+ C PRODUCE LESS THAN HALF OF MACHINE ACCURACY
+ C IERR=4, CABS(Z) TOO LARGE - NO COMPUTATION
+ C COMPLETE LOSS OF ACCURACY BY ARGUMENT
+ C REDUCTION
+ C IERR=5, ERROR - NO COMPUTATION,
+ C ALGORITHM TERMINATION CONDITION NOT MET
+ C
+ C***LONG DESCRIPTION
+ C
+ C AI AND DAI ARE COMPUTED FOR CABS(Z).GT.1.0 FROM THE K BESSEL
+ C FUNCTIONS BY
+ C
+ C AI(Z)=C*SQRT(Z)*K(1/3,ZTA) , DAI(Z)=-C*Z*K(2/3,ZTA)
+ C C=1.0/(PI*SQRT(3.0))
+ C ZTA=(2/3)*Z**(3/2)
+ C
+ C WITH THE POWER SERIES FOR CABS(Z).LE.1.0.
+ C
+ C IN MOST COMPLEX VARIABLE COMPUTATION, ONE MUST EVALUATE ELE-
+ C MENTARY FUNCTIONS. WHEN THE MAGNITUDE OF Z IS LARGE, LOSSES
+ C OF SIGNIFICANCE BY ARGUMENT REDUCTION OCCUR. CONSEQUENTLY, IF
+ C THE MAGNITUDE OF ZETA=(2/3)*Z**1.5 EXCEEDS U1=SQRT(0.5/UR),
+ C THEN LOSSES EXCEEDING HALF PRECISION ARE LIKELY AND AN ERROR
+ C FLAG IERR=3 IS TRIGGERED WHERE UR=DMAX1(D1MACH(4),1.0D-18) IS
+ C DOUBLE PRECISION UNIT ROUNDOFF LIMITED TO 18 DIGITS PRECISION.
+ C ALSO, IF THE MAGNITUDE OF ZETA IS LARGER THAN U2=0.5/UR, THEN
+ C ALL SIGNIFICANCE IS LOST AND IERR=4. IN ORDER TO USE THE INT
+ C FUNCTION, ZETA MUST BE FURTHER RESTRICTED NOT TO EXCEED THE
+ C LARGEST INTEGER, U3=I1MACH(9). THUS, THE MAGNITUDE OF ZETA
+ C MUST BE RESTRICTED BY MIN(U2,U3). ON 32 BIT MACHINES, U1,U2,
+ C AND U3 ARE APPROXIMATELY 2.0E+3, 4.2E+6, 2.1E+9 IN SINGLE
+ C PRECISION ARITHMETIC AND 1.3E+8, 1.8E+16, 2.1E+9 IN DOUBLE
+ C PRECISION ARITHMETIC RESPECTIVELY. THIS MAKES U2 AND U3 LIMIT-
+ C ING IN THEIR RESPECTIVE ARITHMETICS. THIS MEANS THAT THE MAG-
+ C NITUDE OF Z CANNOT EXCEED 3.1E+4 IN SINGLE AND 2.1E+6 IN
+ C DOUBLE PRECISION ARITHMETIC. THIS ALSO MEANS THAT ONE CAN
+ C EXPECT TO RETAIN, IN THE WORST CASES ON 32 BIT MACHINES,
+ C NO DIGITS IN SINGLE PRECISION AND ONLY 7 DIGITS IN DOUBLE
+ C PRECISION ARITHMETIC. SIMILAR CONSIDERATIONS HOLD FOR OTHER
+ C MACHINES.
+ C
+ C THE APPROXIMATE RELATIVE ERROR IN THE MAGNITUDE OF A COMPLEX
+ C BESSEL FUNCTION CAN BE EXPRESSED BY P*10**S WHERE P=MAX(UNIT
+ C ROUNDOFF,1.0E-18) IS THE NOMINAL PRECISION AND 10**S REPRE-
+ C SENTS THE INCREASE IN ERROR DUE TO ARGUMENT REDUCTION IN THE
+ C ELEMENTARY FUNCTIONS. HERE, S=MAX(1,ABS(LOG10(CABS(Z))),
+ C ABS(LOG10(FNU))) APPROXIMATELY (I.E. S=MAX(1,ABS(EXPONENT OF
+ C CABS(Z),ABS(EXPONENT OF FNU)) ). HOWEVER, THE PHASE ANGLE MAY
+ C HAVE ONLY ABSOLUTE ACCURACY. THIS IS MOST LIKELY TO OCCUR WHEN
+ C ONE COMPONENT (IN ABSOLUTE VALUE) IS LARGER THAN THE OTHER BY
+ C SEVERAL ORDERS OF MAGNITUDE. IF ONE COMPONENT IS 10**K LARGER
+ C THAN THE OTHER, THEN ONE CAN EXPECT ONLY MAX(ABS(LOG10(P))-K,
+ C 0) SIGNIFICANT DIGITS; OR, STATED ANOTHER WAY, WHEN K EXCEEDS
+ C THE EXPONENT OF P, NO SIGNIFICANT DIGITS REMAIN IN THE SMALLER
+ C COMPONENT. HOWEVER, THE PHASE ANGLE RETAINS ABSOLUTE ACCURACY
+ C BECAUSE, IN COMPLEX ARITHMETIC WITH PRECISION P, THE SMALLER
+ C COMPONENT WILL NOT (AS A RULE) DECREASE BELOW P TIMES THE
+ C MAGNITUDE OF THE LARGER COMPONENT. IN THESE EXTREME CASES,
+ C THE PRINCIPAL PHASE ANGLE IS ON THE ORDER OF +P, -P, PI/2-P,
+ C OR -PI/2+P.
+ C
+ C***REFERENCES HANDBOOK OF MATHEMATICAL FUNCTIONS BY M. ABRAMOWITZ
+ C AND I. A. STEGUN, NBS AMS SERIES 55, U.S. DEPT. OF
+ C COMMERCE, 1955.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C AND LARGE ORDER BY D. E. AMOS, SAND83-0643, MAY, 1983
+ C
+ C A SUBROUTINE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, SAND85-
+ C 1018, MAY, 1985
+ C
+ C A PORTABLE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, TRANS.
+ C MATH. SOFTWARE, 1986
+ C
+ C***ROUTINES CALLED ZACAI,ZBKNU,XZEXP,XZSQRT,I1MACH,D1MACH
+ C***END PROLOGUE ZAIRY
+ C COMPLEX AI,CONE,CSQ,CY,S1,S2,TRM1,TRM2,Z,ZTA,Z3
+ DOUBLE PRECISION AA, AD, AII, AIR, AK, ALIM, ATRM, AZ, AZ3, BK,
+ * CC, CK, COEF, CONEI, CONER, CSQI, CSQR, CYI, CYR, C1, C2, DIG,
+ * DK, D1, D2, ELIM, FID, FNU, PTR, RL, R1M5, SFAC, STI, STR,
+ * S1I, S1R, S2I, S2R, TOL, TRM1I, TRM1R, TRM2I, TRM2R, TTH, ZEROI,
+ * ZEROR, ZI, ZR, ZTAI, ZTAR, Z3I, Z3R, D1MACH, XZABS, ALAZ, BB
+ INTEGER ID, IERR, IFLAG, K, KODE, K1, K2, MR, NN, NZ, I1MACH
+ DIMENSION CYR(1), CYI(1)
+ DATA TTH, C1, C2, COEF /6.66666666666666667D-01,
+ * 3.55028053887817240D-01,2.58819403792806799D-01,
+ * 1.83776298473930683D-01/
+ DATA ZEROR, ZEROI, CONER, CONEI /0.0D0,0.0D0,1.0D0,0.0D0/
+ C***FIRST EXECUTABLE STATEMENT ZAIRY
+ IERR = 0
+ NZ=0
+ IF (ID.LT.0 .OR. ID.GT.1) IERR=1
+ IF (KODE.LT.1 .OR. KODE.GT.2) IERR=1
+ IF (IERR.NE.0) RETURN
+ AZ = XZABS(ZR,ZI)
+ TOL = DMAX1(D1MACH(4),1.0D-18)
+ FID = DBLE(FLOAT(ID))
+ IF (AZ.GT.1.0D0) GO TO 70
+ C-----------------------------------------------------------------------
+ C POWER SERIES FOR CABS(Z).LE.1.
+ C-----------------------------------------------------------------------
+ S1R = CONER
+ S1I = CONEI
+ S2R = CONER
+ S2I = CONEI
+ IF (AZ.LT.TOL) GO TO 170
+ AA = AZ*AZ
+ IF (AA.LT.TOL/AZ) GO TO 40
+ TRM1R = CONER
+ TRM1I = CONEI
+ TRM2R = CONER
+ TRM2I = CONEI
+ ATRM = 1.0D0
+ STR = ZR*ZR - ZI*ZI
+ STI = ZR*ZI + ZI*ZR
+ Z3R = STR*ZR - STI*ZI
+ Z3I = STR*ZI + STI*ZR
+ AZ3 = AZ*AA
+ AK = 2.0D0 + FID
+ BK = 3.0D0 - FID - FID
+ CK = 4.0D0 - FID
+ DK = 3.0D0 + FID + FID
+ D1 = AK*DK
+ D2 = BK*CK
+ AD = DMIN1(D1,D2)
+ AK = 24.0D0 + 9.0D0*FID
+ BK = 30.0D0 - 9.0D0*FID
+ DO 30 K=1,25
+ STR = (TRM1R*Z3R-TRM1I*Z3I)/D1
+ TRM1I = (TRM1R*Z3I+TRM1I*Z3R)/D1
+ TRM1R = STR
+ S1R = S1R + TRM1R
+ S1I = S1I + TRM1I
+ STR = (TRM2R*Z3R-TRM2I*Z3I)/D2
+ TRM2I = (TRM2R*Z3I+TRM2I*Z3R)/D2
+ TRM2R = STR
+ S2R = S2R + TRM2R
+ S2I = S2I + TRM2I
+ ATRM = ATRM*AZ3/AD
+ D1 = D1 + AK
+ D2 = D2 + BK
+ AD = DMIN1(D1,D2)
+ IF (ATRM.LT.TOL*AD) GO TO 40
+ AK = AK + 18.0D0
+ BK = BK + 18.0D0
+ 30 CONTINUE
+ 40 CONTINUE
+ IF (ID.EQ.1) GO TO 50
+ AIR = S1R*C1 - C2*(ZR*S2R-ZI*S2I)
+ AII = S1I*C1 - C2*(ZR*S2I+ZI*S2R)
+ IF (KODE.EQ.1) RETURN
+ CALL XZSQRT(ZR, ZI, STR, STI)
+ ZTAR = TTH*(ZR*STR-ZI*STI)
+ ZTAI = TTH*(ZR*STI+ZI*STR)
+ CALL XZEXP(ZTAR, ZTAI, STR, STI)
+ PTR = AIR*STR - AII*STI
+ AII = AIR*STI + AII*STR
+ AIR = PTR
+ RETURN
+ 50 CONTINUE
+ AIR = -S2R*C2
+ AII = -S2I*C2
+ IF (AZ.LE.TOL) GO TO 60
+ STR = ZR*S1R - ZI*S1I
+ STI = ZR*S1I + ZI*S1R
+ CC = C1/(1.0D0+FID)
+ AIR = AIR + CC*(STR*ZR-STI*ZI)
+ AII = AII + CC*(STR*ZI+STI*ZR)
+ 60 CONTINUE
+ IF (KODE.EQ.1) RETURN
+ CALL XZSQRT(ZR, ZI, STR, STI)
+ ZTAR = TTH*(ZR*STR-ZI*STI)
+ ZTAI = TTH*(ZR*STI+ZI*STR)
+ CALL XZEXP(ZTAR, ZTAI, STR, STI)
+ PTR = STR*AIR - STI*AII
+ AII = STR*AII + STI*AIR
+ AIR = PTR
+ RETURN
+ C-----------------------------------------------------------------------
+ C CASE FOR CABS(Z).GT.1.0
+ C-----------------------------------------------------------------------
+ 70 CONTINUE
+ FNU = (1.0D0+FID)/3.0D0
+ C-----------------------------------------------------------------------
+ C SET PARAMETERS RELATED TO MACHINE CONSTANTS.
+ C TOL IS THE APPROXIMATE UNIT ROUNDOFF LIMITED TO 1.0D-18.
+ C ELIM IS THE APPROXIMATE EXPONENTIAL OVER- AND UNDERFLOW LIMIT.
+ C EXP(-ELIM).LT.EXP(-ALIM)=EXP(-ELIM)/TOL AND
+ C EXP(ELIM).GT.EXP(ALIM)=EXP(ELIM)*TOL ARE INTERVALS NEAR
+ C UNDERFLOW AND OVERFLOW LIMITS WHERE SCALED ARITHMETIC IS DONE.
+ C RL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC EXPANSION FOR LARGE Z.
+ C DIG = NUMBER OF BASE 10 DIGITS IN TOL = 10**(-DIG).
+ C-----------------------------------------------------------------------
+ K1 = I1MACH(15)
+ K2 = I1MACH(16)
+ R1M5 = D1MACH(5)
+ K = MIN0(IABS(K1),IABS(K2))
+ ELIM = 2.303D0*(DBLE(FLOAT(K))*R1M5-3.0D0)
+ K1 = I1MACH(14) - 1
+ AA = R1M5*DBLE(FLOAT(K1))
+ DIG = DMIN1(AA,18.0D0)
+ AA = AA*2.303D0
+ ALIM = ELIM + DMAX1(-AA,-41.45D0)
+ RL = 1.2D0*DIG + 3.0D0
+ ALAZ = DLOG(AZ)
+ C--------------------------------------------------------------------------
+ C TEST FOR PROPER RANGE
+ C-----------------------------------------------------------------------
+ AA=0.5D0/TOL
+ BB=DBLE(FLOAT(I1MACH(9)))*0.5D0
+ AA=DMIN1(AA,BB)
+ AA=AA**TTH
+ IF (AZ.GT.AA) GO TO 260
+ AA=DSQRT(AA)
+ IF (AZ.GT.AA) IERR=3
+ CALL XZSQRT(ZR, ZI, CSQR, CSQI)
+ ZTAR = TTH*(ZR*CSQR-ZI*CSQI)
+ ZTAI = TTH*(ZR*CSQI+ZI*CSQR)
+ C-----------------------------------------------------------------------
+ C RE(ZTA).LE.0 WHEN RE(Z).LT.0, ESPECIALLY WHEN IM(Z) IS SMALL
+ C-----------------------------------------------------------------------
+ IFLAG = 0
+ SFAC = 1.0D0
+ AK = ZTAI
+ IF (ZR.GE.0.0D0) GO TO 80
+ BK = ZTAR
+ CK = -DABS(BK)
+ ZTAR = CK
+ ZTAI = AK
+ 80 CONTINUE
+ IF (ZI.NE.0.0D0) GO TO 90
+ IF (ZR.GT.0.0D0) GO TO 90
+ ZTAR = 0.0D0
+ ZTAI = AK
+ 90 CONTINUE
+ AA = ZTAR
+ IF (AA.GE.0.0D0 .AND. ZR.GT.0.0D0) GO TO 110
+ IF (KODE.EQ.2) GO TO 100
+ C-----------------------------------------------------------------------
+ C OVERFLOW TEST
+ C-----------------------------------------------------------------------
+ IF (AA.GT.(-ALIM)) GO TO 100
+ AA = -AA + 0.25D0*ALAZ
+ IFLAG = 1
+ SFAC = TOL
+ IF (AA.GT.ELIM) GO TO 270
+ 100 CONTINUE
+ C-----------------------------------------------------------------------
+ C CBKNU AND CACON RETURN EXP(ZTA)*K(FNU,ZTA) ON KODE=2
+ C-----------------------------------------------------------------------
+ MR = 1
+ IF (ZI.LT.0.0D0) MR = -1
+ CALL ZACAI(ZTAR, ZTAI, FNU, KODE, MR, 1, CYR, CYI, NN, RL, TOL,
+ * ELIM, ALIM)
+ IF (NN.LT.0) GO TO 280
+ NZ = NZ + NN
+ GO TO 130
+ 110 CONTINUE
+ IF (KODE.EQ.2) GO TO 120
+ C-----------------------------------------------------------------------
+ C UNDERFLOW TEST
+ C-----------------------------------------------------------------------
+ IF (AA.LT.ALIM) GO TO 120
+ AA = -AA - 0.25D0*ALAZ
+ IFLAG = 2
+ SFAC = 1.0D0/TOL
+ IF (AA.LT.(-ELIM)) GO TO 210
+ 120 CONTINUE
+ CALL ZBKNU(ZTAR, ZTAI, FNU, KODE, 1, CYR, CYI, NZ, TOL, ELIM,
+ * ALIM)
+ 130 CONTINUE
+ S1R = CYR(1)*COEF
+ S1I = CYI(1)*COEF
+ IF (IFLAG.NE.0) GO TO 150
+ IF (ID.EQ.1) GO TO 140
+ AIR = CSQR*S1R - CSQI*S1I
+ AII = CSQR*S1I + CSQI*S1R
+ RETURN
+ 140 CONTINUE
+ AIR = -(ZR*S1R-ZI*S1I)
+ AII = -(ZR*S1I+ZI*S1R)
+ RETURN
+ 150 CONTINUE
+ S1R = S1R*SFAC
+ S1I = S1I*SFAC
+ IF (ID.EQ.1) GO TO 160
+ STR = S1R*CSQR - S1I*CSQI
+ S1I = S1R*CSQI + S1I*CSQR
+ S1R = STR
+ AIR = S1R/SFAC
+ AII = S1I/SFAC
+ RETURN
+ 160 CONTINUE
+ STR = -(S1R*ZR-S1I*ZI)
+ S1I = -(S1R*ZI+S1I*ZR)
+ S1R = STR
+ AIR = S1R/SFAC
+ AII = S1I/SFAC
+ RETURN
+ 170 CONTINUE
+ AA = 1.0D+3*D1MACH(1)
+ S1R = ZEROR
+ S1I = ZEROI
+ IF (ID.EQ.1) GO TO 190
+ IF (AZ.LE.AA) GO TO 180
+ S1R = C2*ZR
+ S1I = C2*ZI
+ 180 CONTINUE
+ AIR = C1 - S1R
+ AII = -S1I
+ RETURN
+ 190 CONTINUE
+ AIR = -C2
+ AII = 0.0D0
+ AA = DSQRT(AA)
+ IF (AZ.LE.AA) GO TO 200
+ S1R = 0.5D0*(ZR*ZR-ZI*ZI)
+ S1I = ZR*ZI
+ 200 CONTINUE
+ AIR = AIR + C1*S1R
+ AII = AII + C1*S1I
+ RETURN
+ 210 CONTINUE
+ NZ = 1
+ AIR = ZEROR
+ AII = ZEROI
+ RETURN
+ 270 CONTINUE
+ NZ = 0
+ IERR=2
+ RETURN
+ 280 CONTINUE
+ IF(NN.EQ.(-1)) GO TO 270
+ NZ=0
+ IERR=5
+ RETURN
+ 260 CONTINUE
+ IERR=4
+ NZ=0
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zasyi.f octave-2.0.14/libcruft/amos/zasyi.f
*** octave-2.0.13/libcruft/amos/zasyi.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zasyi.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,165 ----
+ SUBROUTINE ZASYI(ZR, ZI, FNU, KODE, N, YR, YI, NZ, RL, TOL, ELIM,
+ * ALIM)
+ C***BEGIN PROLOGUE ZASYI
+ C***REFER TO ZBESI,ZBESK
+ C
+ C ZASYI COMPUTES THE I BESSEL FUNCTION FOR REAL(Z).GE.0.0 BY
+ C MEANS OF THE ASYMPTOTIC EXPANSION FOR LARGE CABS(Z) IN THE
+ C REGION CABS(Z).GT.MAX(RL,FNU*FNU/2). NZ=0 IS A NORMAL RETURN.
+ C NZ.LT.0 INDICATES AN OVERFLOW ON KODE=1.
+ C
+ C***ROUTINES CALLED D1MACH,XZABS,ZDIV,XZEXP,ZMLT,XZSQRT
+ C***END PROLOGUE ZASYI
+ C COMPLEX AK1,CK,CONE,CS1,CS2,CZ,CZERO,DK,EZ,P1,RZ,S2,Y,Z
+ DOUBLE PRECISION AA, AEZ, AK, AK1I, AK1R, ALIM, ARG, ARM, ATOL,
+ * AZ, BB, BK, CKI, CKR, CONEI, CONER, CS1I, CS1R, CS2I, CS2R, CZI,
+ * CZR, DFNU, DKI, DKR, DNU2, ELIM, EZI, EZR, FDN, FNU, PI, P1I,
+ * P1R, RAZ, RL, RTPI, RTR1, RZI, RZR, S, SGN, SQK, STI, STR, S2I,
+ * S2R, TOL, TZI, TZR, YI, YR, ZEROI, ZEROR, ZI, ZR, D1MACH, XZABS
+ INTEGER I, IB, IL, INU, J, JL, K, KODE, KODED, M, N, NN, NZ
+ DIMENSION YR(N), YI(N)
+ DATA PI, RTPI /3.14159265358979324D0 , 0.159154943091895336D0 /
+ DATA ZEROR,ZEROI,CONER,CONEI / 0.0D0, 0.0D0, 1.0D0, 0.0D0 /
+ C
+ NZ = 0
+ AZ = XZABS(ZR,ZI)
+ ARM = 1.0D+3*D1MACH(1)
+ RTR1 = DSQRT(ARM)
+ IL = MIN0(2,N)
+ DFNU = FNU + DBLE(FLOAT(N-IL))
+ C-----------------------------------------------------------------------
+ C OVERFLOW TEST
+ C-----------------------------------------------------------------------
+ RAZ = 1.0D0/AZ
+ STR = ZR*RAZ
+ STI = -ZI*RAZ
+ AK1R = RTPI*STR*RAZ
+ AK1I = RTPI*STI*RAZ
+ CALL XZSQRT(AK1R, AK1I, AK1R, AK1I)
+ CZR = ZR
+ CZI = ZI
+ IF (KODE.NE.2) GO TO 10
+ CZR = ZEROR
+ CZI = ZI
+ 10 CONTINUE
+ IF (DABS(CZR).GT.ELIM) GO TO 100
+ DNU2 = DFNU + DFNU
+ KODED = 1
+ IF ((DABS(CZR).GT.ALIM) .AND. (N.GT.2)) GO TO 20
+ KODED = 0
+ CALL XZEXP(CZR, CZI, STR, STI)
+ CALL ZMLT(AK1R, AK1I, STR, STI, AK1R, AK1I)
+ 20 CONTINUE
+ FDN = 0.0D0
+ IF (DNU2.GT.RTR1) FDN = DNU2*DNU2
+ EZR = ZR*8.0D0
+ EZI = ZI*8.0D0
+ C-----------------------------------------------------------------------
+ C WHEN Z IS IMAGINARY, THE ERROR TEST MUST BE MADE RELATIVE TO THE
+ C FIRST RECIPROCAL POWER SINCE THIS IS THE LEADING TERM OF THE
+ C EXPANSION FOR THE IMAGINARY PART.
+ C-----------------------------------------------------------------------
+ AEZ = 8.0D0*AZ
+ S = TOL/AEZ
+ JL = INT(SNGL(RL+RL)) + 2
+ P1R = ZEROR
+ P1I = ZEROI
+ IF (ZI.EQ.0.0D0) GO TO 30
+ C-----------------------------------------------------------------------
+ C CALCULATE EXP(PI*(0.5+FNU+N-IL)*I) TO MINIMIZE LOSSES OF
+ C SIGNIFICANCE WHEN FNU OR N IS LARGE
+ C-----------------------------------------------------------------------
+ INU = INT(SNGL(FNU))
+ ARG = (FNU-DBLE(FLOAT(INU)))*PI
+ INU = INU + N - IL
+ AK = -DSIN(ARG)
+ BK = DCOS(ARG)
+ IF (ZI.LT.0.0D0) BK = -BK
+ P1R = AK
+ P1I = BK
+ IF (MOD(INU,2).EQ.0) GO TO 30
+ P1R = -P1R
+ P1I = -P1I
+ 30 CONTINUE
+ DO 70 K=1,IL
+ SQK = FDN - 1.0D0
+ ATOL = S*DABS(SQK)
+ SGN = 1.0D0
+ CS1R = CONER
+ CS1I = CONEI
+ CS2R = CONER
+ CS2I = CONEI
+ CKR = CONER
+ CKI = CONEI
+ AK = 0.0D0
+ AA = 1.0D0
+ BB = AEZ
+ DKR = EZR
+ DKI = EZI
+ DO 40 J=1,JL
+ CALL ZDIV(CKR, CKI, DKR, DKI, STR, STI)
+ CKR = STR*SQK
+ CKI = STI*SQK
+ CS2R = CS2R + CKR
+ CS2I = CS2I + CKI
+ SGN = -SGN
+ CS1R = CS1R + CKR*SGN
+ CS1I = CS1I + CKI*SGN
+ DKR = DKR + EZR
+ DKI = DKI + EZI
+ AA = AA*DABS(SQK)/BB
+ BB = BB + AEZ
+ AK = AK + 8.0D0
+ SQK = SQK - AK
+ IF (AA.LE.ATOL) GO TO 50
+ 40 CONTINUE
+ GO TO 110
+ 50 CONTINUE
+ S2R = CS1R
+ S2I = CS1I
+ IF (ZR+ZR.GE.ELIM) GO TO 60
+ TZR = ZR + ZR
+ TZI = ZI + ZI
+ CALL XZEXP(-TZR, -TZI, STR, STI)
+ CALL ZMLT(STR, STI, P1R, P1I, STR, STI)
+ CALL ZMLT(STR, STI, CS2R, CS2I, STR, STI)
+ S2R = S2R + STR
+ S2I = S2I + STI
+ 60 CONTINUE
+ FDN = FDN + 8.0D0*DFNU + 4.0D0
+ P1R = -P1R
+ P1I = -P1I
+ M = N - IL + K
+ YR(M) = S2R*AK1R - S2I*AK1I
+ YI(M) = S2R*AK1I + S2I*AK1R
+ 70 CONTINUE
+ IF (N.LE.2) RETURN
+ NN = N
+ K = NN - 2
+ AK = DBLE(FLOAT(K))
+ STR = ZR*RAZ
+ STI = -ZI*RAZ
+ RZR = (STR+STR)*RAZ
+ RZI = (STI+STI)*RAZ
+ IB = 3
+ DO 80 I=IB,NN
+ YR(K) = (AK+FNU)*(RZR*YR(K+1)-RZI*YI(K+1)) + YR(K+2)
+ YI(K) = (AK+FNU)*(RZR*YI(K+1)+RZI*YR(K+1)) + YI(K+2)
+ AK = AK - 1.0D0
+ K = K - 1
+ 80 CONTINUE
+ IF (KODED.EQ.0) RETURN
+ CALL XZEXP(CZR, CZI, CKR, CKI)
+ DO 90 I=1,NN
+ STR = YR(I)*CKR - YI(I)*CKI
+ YI(I) = YR(I)*CKI + YI(I)*CKR
+ YR(I) = STR
+ 90 CONTINUE
+ RETURN
+ 100 CONTINUE
+ NZ = -1
+ RETURN
+ 110 CONTINUE
+ NZ=-2
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbesh.f octave-2.0.14/libcruft/amos/zbesh.f
*** octave-2.0.13/libcruft/amos/zbesh.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbesh.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,348 ----
+ SUBROUTINE ZBESH(ZR, ZI, FNU, KODE, M, N, CYR, CYI, NZ, IERR)
+ C***BEGIN PROLOGUE ZBESH
+ C***DATE WRITTEN 830501 (YYMMDD)
+ C***REVISION DATE 890801 (YYMMDD)
+ C***CATEGORY NO. B5K
+ C***KEYWORDS H-BESSEL FUNCTIONS,BESSEL FUNCTIONS OF COMPLEX ARGUMENT,
+ C BESSEL FUNCTIONS OF THIRD KIND,HANKEL FUNCTIONS
+ C***AUTHOR AMOS, DONALD E., SANDIA NATIONAL LABORATORIES
+ C***PURPOSE TO COMPUTE THE H-BESSEL FUNCTIONS OF A COMPLEX ARGUMENT
+ C***DESCRIPTION
+ C
+ C ***A DOUBLE PRECISION ROUTINE***
+ C ON KODE=1, ZBESH COMPUTES AN N MEMBER SEQUENCE OF COMPLEX
+ C HANKEL (BESSEL) FUNCTIONS CY(J)=H(M,FNU+J-1,Z) FOR KINDS M=1
+ C OR 2, REAL, NONNEGATIVE ORDERS FNU+J-1, J=1,...,N, AND COMPLEX
+ C Z.NE.CMPLX(0.0,0.0) IN THE CUT PLANE -PI.LT.ARG(Z).LE.PI.
+ C ON KODE=2, ZBESH RETURNS THE SCALED HANKEL FUNCTIONS
+ C
+ C CY(I)=EXP(-MM*Z*I)*H(M,FNU+J-1,Z) MM=3-2*M, I**2=-1.
+ C
+ C WHICH REMOVES THE EXPONENTIAL BEHAVIOR IN BOTH THE UPPER AND
+ C LOWER HALF PLANES. DEFINITIONS AND NOTATION ARE FOUND IN THE
+ C NBS HANDBOOK OF MATHEMATICAL FUNCTIONS (REF. 1).
+ C
+ C INPUT ZR,ZI,FNU ARE DOUBLE PRECISION
+ C ZR,ZI - Z=CMPLX(ZR,ZI), Z.NE.CMPLX(0.0D0,0.0D0),
+ C -PT.LT.ARG(Z).LE.PI
+ C FNU - ORDER OF INITIAL H FUNCTION, FNU.GE.0.0D0
+ C KODE - A PARAMETER TO INDICATE THE SCALING OPTION
+ C KODE= 1 RETURNS
+ C CY(J)=H(M,FNU+J-1,Z), J=1,...,N
+ C = 2 RETURNS
+ C CY(J)=H(M,FNU+J-1,Z)*EXP(-I*Z*(3-2M))
+ C J=1,...,N , I**2=-1
+ C M - KIND OF HANKEL FUNCTION, M=1 OR 2
+ C N - NUMBER OF MEMBERS IN THE SEQUENCE, N.GE.1
+ C
+ C OUTPUT CYR,CYI ARE DOUBLE PRECISION
+ C CYR,CYI- DOUBLE PRECISION VECTORS WHOSE FIRST N COMPONENTS
+ C CONTAIN REAL AND IMAGINARY PARTS FOR THE SEQUENCE
+ C CY(J)=H(M,FNU+J-1,Z) OR
+ C CY(J)=H(M,FNU+J-1,Z)*EXP(-I*Z*(3-2M)) J=1,...,N
+ C DEPENDING ON KODE, I**2=-1.
+ C NZ - NUMBER OF COMPONENTS SET TO ZERO DUE TO UNDERFLOW,
+ C NZ= 0 , NORMAL RETURN
+ C NZ.GT.0 , FIRST NZ COMPONENTS OF CY SET TO ZERO DUE
+ C TO UNDERFLOW, CY(J)=CMPLX(0.0D0,0.0D0)
+ C J=1,...,NZ WHEN Y.GT.0.0 AND M=1 OR
+ C Y.LT.0.0 AND M=2. FOR THE COMPLMENTARY
+ C HALF PLANES, NZ STATES ONLY THE NUMBER
+ C OF UNDERFLOWS.
+ C IERR - ERROR FLAG
+ C IERR=0, NORMAL RETURN - COMPUTATION COMPLETED
+ C IERR=1, INPUT ERROR - NO COMPUTATION
+ C IERR=2, OVERFLOW - NO COMPUTATION, FNU TOO
+ C LARGE OR CABS(Z) TOO SMALL OR BOTH
+ C IERR=3, CABS(Z) OR FNU+N-1 LARGE - COMPUTATION DONE
+ C BUT LOSSES OF SIGNIFCANCE BY ARGUMENT
+ C REDUCTION PRODUCE LESS THAN HALF OF MACHINE
+ C ACCURACY
+ C IERR=4, CABS(Z) OR FNU+N-1 TOO LARGE - NO COMPUTA-
+ C TION BECAUSE OF COMPLETE LOSSES OF SIGNIFI-
+ C CANCE BY ARGUMENT REDUCTION
+ C IERR=5, ERROR - NO COMPUTATION,
+ C ALGORITHM TERMINATION CONDITION NOT MET
+ C
+ C***LONG DESCRIPTION
+ C
+ C THE COMPUTATION IS CARRIED OUT BY THE RELATION
+ C
+ C H(M,FNU,Z)=(1/MP)*EXP(-MP*FNU)*K(FNU,Z*EXP(-MP))
+ C MP=MM*HPI*I, MM=3-2*M, HPI=PI/2, I**2=-1
+ C
+ C FOR M=1 OR 2 WHERE THE K BESSEL FUNCTION IS COMPUTED FOR THE
+ C RIGHT HALF PLANE RE(Z).GE.0.0. THE K FUNCTION IS CONTINUED
+ C TO THE LEFT HALF PLANE BY THE RELATION
+ C
+ C K(FNU,Z*EXP(MP)) = EXP(-MP*FNU)*K(FNU,Z)-MP*I(FNU,Z)
+ C MP=MR*PI*I, MR=+1 OR -1, RE(Z).GT.0, I**2=-1
+ C
+ C WHERE I(FNU,Z) IS THE I BESSEL FUNCTION.
+ C
+ C EXPONENTIAL DECAY OF H(M,FNU,Z) OCCURS IN THE UPPER HALF Z
+ C PLANE FOR M=1 AND THE LOWER HALF Z PLANE FOR M=2. EXPONENTIAL
+ C GROWTH OCCURS IN THE COMPLEMENTARY HALF PLANES. SCALING
+ C BY EXP(-MM*Z*I) REMOVES THE EXPONENTIAL BEHAVIOR IN THE
+ C WHOLE Z PLANE FOR Z TO INFINITY.
+ C
+ C FOR NEGATIVE ORDERS,THE FORMULAE
+ C
+ C H(1,-FNU,Z) = H(1,FNU,Z)*CEXP( PI*FNU*I)
+ C H(2,-FNU,Z) = H(2,FNU,Z)*CEXP(-PI*FNU*I)
+ C I**2=-1
+ C
+ C CAN BE USED.
+ C
+ C IN MOST COMPLEX VARIABLE COMPUTATION, ONE MUST EVALUATE ELE-
+ C MENTARY FUNCTIONS. WHEN THE MAGNITUDE OF Z OR FNU+N-1 IS
+ C LARGE, LOSSES OF SIGNIFICANCE BY ARGUMENT REDUCTION OCCUR.
+ C CONSEQUENTLY, IF EITHER ONE EXCEEDS U1=SQRT(0.5/UR), THEN
+ C LOSSES EXCEEDING HALF PRECISION ARE LIKELY AND AN ERROR FLAG
+ C IERR=3 IS TRIGGERED WHERE UR=DMAX1(D1MACH(4),1.0D-18) IS
+ C DOUBLE PRECISION UNIT ROUNDOFF LIMITED TO 18 DIGITS PRECISION.
+ C IF EITHER IS LARGER THAN U2=0.5/UR, THEN ALL SIGNIFICANCE IS
+ C LOST AND IERR=4. IN ORDER TO USE THE INT FUNCTION, ARGUMENTS
+ C MUST BE FURTHER RESTRICTED NOT TO EXCEED THE LARGEST MACHINE
+ C INTEGER, U3=I1MACH(9). THUS, THE MAGNITUDE OF Z AND FNU+N-1 IS
+ C RESTRICTED BY MIN(U2,U3). ON 32 BIT MACHINES, U1,U2, AND U3
+ C ARE APPROXIMATELY 2.0E+3, 4.2E+6, 2.1E+9 IN SINGLE PRECISION
+ C ARITHMETIC AND 1.3E+8, 1.8E+16, 2.1E+9 IN DOUBLE PRECISION
+ C ARITHMETIC RESPECTIVELY. THIS MAKES U2 AND U3 LIMITING IN
+ C THEIR RESPECTIVE ARITHMETICS. THIS MEANS THAT ONE CAN EXPECT
+ C TO RETAIN, IN THE WORST CASES ON 32 BIT MACHINES, NO DIGITS
+ C IN SINGLE AND ONLY 7 DIGITS IN DOUBLE PRECISION ARITHMETIC.
+ C SIMILAR CONSIDERATIONS HOLD FOR OTHER MACHINES.
+ C
+ C THE APPROXIMATE RELATIVE ERROR IN THE MAGNITUDE OF A COMPLEX
+ C BESSEL FUNCTION CAN BE EXPRESSED BY P*10**S WHERE P=MAX(UNIT
+ C ROUNDOFF,1.0D-18) IS THE NOMINAL PRECISION AND 10**S REPRE-
+ C SENTS THE INCREASE IN ERROR DUE TO ARGUMENT REDUCTION IN THE
+ C ELEMENTARY FUNCTIONS. HERE, S=MAX(1,ABS(LOG10(CABS(Z))),
+ C ABS(LOG10(FNU))) APPROXIMATELY (I.E. S=MAX(1,ABS(EXPONENT OF
+ C CABS(Z),ABS(EXPONENT OF FNU)) ). HOWEVER, THE PHASE ANGLE MAY
+ C HAVE ONLY ABSOLUTE ACCURACY. THIS IS MOST LIKELY TO OCCUR WHEN
+ C ONE COMPONENT (IN ABSOLUTE VALUE) IS LARGER THAN THE OTHER BY
+ C SEVERAL ORDERS OF MAGNITUDE. IF ONE COMPONENT IS 10**K LARGER
+ C THAN THE OTHER, THEN ONE CAN EXPECT ONLY MAX(ABS(LOG10(P))-K,
+ C 0) SIGNIFICANT DIGITS; OR, STATED ANOTHER WAY, WHEN K EXCEEDS
+ C THE EXPONENT OF P, NO SIGNIFICANT DIGITS REMAIN IN THE SMALLER
+ C COMPONENT. HOWEVER, THE PHASE ANGLE RETAINS ABSOLUTE ACCURACY
+ C BECAUSE, IN COMPLEX ARITHMETIC WITH PRECISION P, THE SMALLER
+ C COMPONENT WILL NOT (AS A RULE) DECREASE BELOW P TIMES THE
+ C MAGNITUDE OF THE LARGER COMPONENT. IN THESE EXTREME CASES,
+ C THE PRINCIPAL PHASE ANGLE IS ON THE ORDER OF +P, -P, PI/2-P,
+ C OR -PI/2+P.
+ C
+ C***REFERENCES HANDBOOK OF MATHEMATICAL FUNCTIONS BY M. ABRAMOWITZ
+ C AND I. A. STEGUN, NBS AMS SERIES 55, U.S. DEPT. OF
+ C COMMERCE, 1955.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C BY D. E. AMOS, SAND83-0083, MAY, 1983.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C AND LARGE ORDER BY D. E. AMOS, SAND83-0643, MAY, 1983
+ C
+ C A SUBROUTINE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, SAND85-
+ C 1018, MAY, 1985
+ C
+ C A PORTABLE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, TRANS.
+ C MATH. SOFTWARE, 1986
+ C
+ C***ROUTINES CALLED ZACON,ZBKNU,ZBUNK,ZUOIK,XZABS,I1MACH,D1MACH
+ C***END PROLOGUE ZBESH
+ C
+ C COMPLEX CY,Z,ZN,ZT,CSGN
+ DOUBLE PRECISION AA, ALIM, ALN, ARG, AZ, CYI, CYR, DIG, ELIM,
+ * FMM, FN, FNU, FNUL, HPI, RHPI, RL, R1M5, SGN, STR, TOL, UFL, ZI,
+ * ZNI, ZNR, ZR, ZTI, D1MACH, XZABS, BB, ASCLE, RTOL, ATOL, STI,
+ * CSGNR, CSGNI
+ INTEGER I, IERR, INU, INUH, IR, K, KODE, K1, K2, M,
+ * MM, MR, N, NN, NUF, NW, NZ, I1MACH
+ DIMENSION CYR(N), CYI(N)
+ C
+ DATA HPI /1.57079632679489662D0/
+ C
+ C***FIRST EXECUTABLE STATEMENT ZBESH
+ IERR = 0
+ NZ=0
+ IF (ZR.EQ.0.0D0 .AND. ZI.EQ.0.0D0) IERR=1
+ IF (FNU.LT.0.0D0) IERR=1
+ IF (M.LT.1 .OR. M.GT.2) IERR=1
+ IF (KODE.LT.1 .OR. KODE.GT.2) IERR=1
+ IF (N.LT.1) IERR=1
+ IF (IERR.NE.0) RETURN
+ NN = N
+ C-----------------------------------------------------------------------
+ C SET PARAMETERS RELATED TO MACHINE CONSTANTS.
+ C TOL IS THE APPROXIMATE UNIT ROUNDOFF LIMITED TO 1.0E-18.
+ C ELIM IS THE APPROXIMATE EXPONENTIAL OVER- AND UNDERFLOW LIMIT.
+ C EXP(-ELIM).LT.EXP(-ALIM)=EXP(-ELIM)/TOL AND
+ C EXP(ELIM).GT.EXP(ALIM)=EXP(ELIM)*TOL ARE INTERVALS NEAR
+ C UNDERFLOW AND OVERFLOW LIMITS WHERE SCALED ARITHMETIC IS DONE.
+ C RL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC EXPANSION FOR LARGE Z.
+ C DIG = NUMBER OF BASE 10 DIGITS IN TOL = 10**(-DIG).
+ C FNUL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC SERIES FOR LARGE FNU
+ C-----------------------------------------------------------------------
+ TOL = DMAX1(D1MACH(4),1.0D-18)
+ K1 = I1MACH(15)
+ K2 = I1MACH(16)
+ R1M5 = D1MACH(5)
+ K = MIN0(IABS(K1),IABS(K2))
+ ELIM = 2.303D0*(DBLE(FLOAT(K))*R1M5-3.0D0)
+ K1 = I1MACH(14) - 1
+ AA = R1M5*DBLE(FLOAT(K1))
+ DIG = DMIN1(AA,18.0D0)
+ AA = AA*2.303D0
+ ALIM = ELIM + DMAX1(-AA,-41.45D0)
+ FNUL = 10.0D0 + 6.0D0*(DIG-3.0D0)
+ RL = 1.2D0*DIG + 3.0D0
+ FN = FNU + DBLE(FLOAT(NN-1))
+ MM = 3 - M - M
+ FMM = DBLE(FLOAT(MM))
+ ZNR = FMM*ZI
+ ZNI = -FMM*ZR
+ C-----------------------------------------------------------------------
+ C TEST FOR PROPER RANGE
+ C-----------------------------------------------------------------------
+ AZ = XZABS(ZR,ZI)
+ AA = 0.5D0/TOL
+ BB=DBLE(FLOAT(I1MACH(9)))*0.5D0
+ AA = DMIN1(AA,BB)
+ IF (AZ.GT.AA) GO TO 260
+ IF (FN.GT.AA) GO TO 260
+ AA = DSQRT(AA)
+ IF (AZ.GT.AA) IERR=3
+ IF (FN.GT.AA) IERR=3
+ C-----------------------------------------------------------------------
+ C OVERFLOW TEST ON THE LAST MEMBER OF THE SEQUENCE
+ C-----------------------------------------------------------------------
+ UFL = D1MACH(1)*1.0D+3
+ IF (AZ.LT.UFL) GO TO 230
+ IF (FNU.GT.FNUL) GO TO 90
+ IF (FN.LE.1.0D0) GO TO 70
+ IF (FN.GT.2.0D0) GO TO 60
+ IF (AZ.GT.TOL) GO TO 70
+ ARG = 0.5D0*AZ
+ ALN = -FN*DLOG(ARG)
+ IF (ALN.GT.ELIM) GO TO 230
+ GO TO 70
+ 60 CONTINUE
+ CALL ZUOIK(ZNR, ZNI, FNU, KODE, 2, NN, CYR, CYI, NUF, TOL, ELIM,
+ * ALIM)
+ IF (NUF.LT.0) GO TO 230
+ NZ = NZ + NUF
+ NN = NN - NUF
+ C-----------------------------------------------------------------------
+ C HERE NN=N OR NN=0 SINCE NUF=0,NN, OR -1 ON RETURN FROM CUOIK
+ C IF NUF=NN, THEN CY(I)=CZERO FOR ALL I
+ C-----------------------------------------------------------------------
+ IF (NN.EQ.0) GO TO 140
+ 70 CONTINUE
+ IF ((ZNR.LT.0.0D0) .OR. (ZNR.EQ.0.0D0 .AND. ZNI.LT.0.0D0 .AND.
+ * M.EQ.2)) GO TO 80
+ C-----------------------------------------------------------------------
+ C RIGHT HALF PLANE COMPUTATION, XN.GE.0. .AND. (XN.NE.0. .OR.
+ C YN.GE.0. .OR. M=1)
+ C-----------------------------------------------------------------------
+ CALL ZBKNU(ZNR, ZNI, FNU, KODE, NN, CYR, CYI, NZ, TOL, ELIM, ALIM)
+ GO TO 110
+ C-----------------------------------------------------------------------
+ C LEFT HALF PLANE COMPUTATION
+ C-----------------------------------------------------------------------
+ 80 CONTINUE
+ MR = -MM
+ CALL ZACON(ZNR, ZNI, FNU, KODE, MR, NN, CYR, CYI, NW, RL, FNUL,
+ * TOL, ELIM, ALIM)
+ IF (NW.LT.0) GO TO 240
+ NZ=NW
+ GO TO 110
+ 90 CONTINUE
+ C-----------------------------------------------------------------------
+ C UNIFORM ASYMPTOTIC EXPANSIONS FOR FNU.GT.FNUL
+ C-----------------------------------------------------------------------
+ MR = 0
+ IF ((ZNR.GE.0.0D0) .AND. (ZNR.NE.0.0D0 .OR. ZNI.GE.0.0D0 .OR.
+ * M.NE.2)) GO TO 100
+ MR = -MM
+ IF (ZNR.NE.0.0D0 .OR. ZNI.GE.0.0D0) GO TO 100
+ ZNR = -ZNR
+ ZNI = -ZNI
+ 100 CONTINUE
+ CALL ZBUNK(ZNR, ZNI, FNU, KODE, MR, NN, CYR, CYI, NW, TOL, ELIM,
+ * ALIM)
+ IF (NW.LT.0) GO TO 240
+ NZ = NZ + NW
+ 110 CONTINUE
+ C-----------------------------------------------------------------------
+ C H(M,FNU,Z) = -FMM*(I/HPI)*(ZT**FNU)*K(FNU,-Z*ZT)
+ C
+ C ZT=EXP(-FMM*HPI*I) = CMPLX(0.0,-FMM), FMM=3-2*M, M=1,2
+ C-----------------------------------------------------------------------
+ SGN = DSIGN(HPI,-FMM)
+ C-----------------------------------------------------------------------
+ C CALCULATE EXP(FNU*HPI*I) TO MINIMIZE LOSSES OF SIGNIFICANCE
+ C WHEN FNU IS LARGE
+ C-----------------------------------------------------------------------
+ INU = INT(SNGL(FNU))
+ INUH = INU/2
+ IR = INU - 2*INUH
+ ARG = (FNU-DBLE(FLOAT(INU-IR)))*SGN
+ RHPI = 1.0D0/SGN
+ C ZNI = RHPI*DCOS(ARG)
+ C ZNR = -RHPI*DSIN(ARG)
+ CSGNI = RHPI*DCOS(ARG)
+ CSGNR = -RHPI*DSIN(ARG)
+ IF (MOD(INUH,2).EQ.0) GO TO 120
+ C ZNR = -ZNR
+ C ZNI = -ZNI
+ CSGNR = -CSGNR
+ CSGNI = -CSGNI
+ 120 CONTINUE
+ ZTI = -FMM
+ RTOL = 1.0D0/TOL
+ ASCLE = UFL*RTOL
+ DO 130 I=1,NN
+ C STR = CYR(I)*ZNR - CYI(I)*ZNI
+ C CYI(I) = CYR(I)*ZNI + CYI(I)*ZNR
+ C CYR(I) = STR
+ C STR = -ZNI*ZTI
+ C ZNI = ZNR*ZTI
+ C ZNR = STR
+ AA = CYR(I)
+ BB = CYI(I)
+ ATOL = 1.0D0
+ IF (DMAX1(DABS(AA),DABS(BB)).GT.ASCLE) GO TO 135
+ AA = AA*RTOL
+ BB = BB*RTOL
+ ATOL = TOL
+ 135 CONTINUE
+ STR = AA*CSGNR - BB*CSGNI
+ STI = AA*CSGNI + BB*CSGNR
+ CYR(I) = STR*ATOL
+ CYI(I) = STI*ATOL
+ STR = -CSGNI*ZTI
+ CSGNI = CSGNR*ZTI
+ CSGNR = STR
+ 130 CONTINUE
+ RETURN
+ 140 CONTINUE
+ IF (ZNR.LT.0.0D0) GO TO 230
+ RETURN
+ 230 CONTINUE
+ NZ=0
+ IERR=2
+ RETURN
+ 240 CONTINUE
+ IF(NW.EQ.(-1)) GO TO 230
+ NZ=0
+ IERR=5
+ RETURN
+ 260 CONTINUE
+ NZ=0
+ IERR=4
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbesi.f octave-2.0.14/libcruft/amos/zbesi.f
*** octave-2.0.13/libcruft/amos/zbesi.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbesi.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,269 ----
+ SUBROUTINE ZBESI(ZR, ZI, FNU, KODE, N, CYR, CYI, NZ, IERR)
+ C***BEGIN PROLOGUE ZBESI
+ C***DATE WRITTEN 830501 (YYMMDD)
+ C***REVISION DATE 890801 (YYMMDD)
+ C***CATEGORY NO. B5K
+ C***KEYWORDS I-BESSEL FUNCTION,COMPLEX BESSEL FUNCTION,
+ C MODIFIED BESSEL FUNCTION OF THE FIRST KIND
+ C***AUTHOR AMOS, DONALD E., SANDIA NATIONAL LABORATORIES
+ C***PURPOSE TO COMPUTE I-BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C***DESCRIPTION
+ C
+ C ***A DOUBLE PRECISION ROUTINE***
+ C ON KODE=1, ZBESI COMPUTES AN N MEMBER SEQUENCE OF COMPLEX
+ C BESSEL FUNCTIONS CY(J)=I(FNU+J-1,Z) FOR REAL, NONNEGATIVE
+ C ORDERS FNU+J-1, J=1,...,N AND COMPLEX Z IN THE CUT PLANE
+ C -PI.LT.ARG(Z).LE.PI. ON KODE=2, ZBESI RETURNS THE SCALED
+ C FUNCTIONS
+ C
+ C CY(J)=EXP(-ABS(X))*I(FNU+J-1,Z) J = 1,...,N , X=REAL(Z)
+ C
+ C WITH THE EXPONENTIAL GROWTH REMOVED IN BOTH THE LEFT AND
+ C RIGHT HALF PLANES FOR Z TO INFINITY. DEFINITIONS AND NOTATION
+ C ARE FOUND IN THE NBS HANDBOOK OF MATHEMATICAL FUNCTIONS
+ C (REF. 1).
+ C
+ C INPUT ZR,ZI,FNU ARE DOUBLE PRECISION
+ C ZR,ZI - Z=CMPLX(ZR,ZI), -PI.LT.ARG(Z).LE.PI
+ C FNU - ORDER OF INITIAL I FUNCTION, FNU.GE.0.0D0
+ C KODE - A PARAMETER TO INDICATE THE SCALING OPTION
+ C KODE= 1 RETURNS
+ C CY(J)=I(FNU+J-1,Z), J=1,...,N
+ C = 2 RETURNS
+ C CY(J)=I(FNU+J-1,Z)*EXP(-ABS(X)), J=1,...,N
+ C N - NUMBER OF MEMBERS OF THE SEQUENCE, N.GE.1
+ C
+ C OUTPUT CYR,CYI ARE DOUBLE PRECISION
+ C CYR,CYI- DOUBLE PRECISION VECTORS WHOSE FIRST N COMPONENTS
+ C CONTAIN REAL AND IMAGINARY PARTS FOR THE SEQUENCE
+ C CY(J)=I(FNU+J-1,Z) OR
+ C CY(J)=I(FNU+J-1,Z)*EXP(-ABS(X)) J=1,...,N
+ C DEPENDING ON KODE, X=REAL(Z)
+ C NZ - NUMBER OF COMPONENTS SET TO ZERO DUE TO UNDERFLOW,
+ C NZ= 0 , NORMAL RETURN
+ C NZ.GT.0 , LAST NZ COMPONENTS OF CY SET TO ZERO
+ C TO UNDERFLOW, CY(J)=CMPLX(0.0D0,0.0D0)
+ C J = N-NZ+1,...,N
+ C IERR - ERROR FLAG
+ C IERR=0, NORMAL RETURN - COMPUTATION COMPLETED
+ C IERR=1, INPUT ERROR - NO COMPUTATION
+ C IERR=2, OVERFLOW - NO COMPUTATION, REAL(Z) TOO
+ C LARGE ON KODE=1
+ C IERR=3, CABS(Z) OR FNU+N-1 LARGE - COMPUTATION DONE
+ C BUT LOSSES OF SIGNIFCANCE BY ARGUMENT
+ C REDUCTION PRODUCE LESS THAN HALF OF MACHINE
+ C ACCURACY
+ C IERR=4, CABS(Z) OR FNU+N-1 TOO LARGE - NO COMPUTA-
+ C TION BECAUSE OF COMPLETE LOSSES OF SIGNIFI-
+ C CANCE BY ARGUMENT REDUCTION
+ C IERR=5, ERROR - NO COMPUTATION,
+ C ALGORITHM TERMINATION CONDITION NOT MET
+ C
+ C***LONG DESCRIPTION
+ C
+ C THE COMPUTATION IS CARRIED OUT BY THE POWER SERIES FOR
+ C SMALL CABS(Z), THE ASYMPTOTIC EXPANSION FOR LARGE CABS(Z),
+ C THE MILLER ALGORITHM NORMALIZED BY THE WRONSKIAN AND A
+ C NEUMANN SERIES FOR IMTERMEDIATE MAGNITUDES, AND THE
+ C UNIFORM ASYMPTOTIC EXPANSIONS FOR I(FNU,Z) AND J(FNU,Z)
+ C FOR LARGE ORDERS. BACKWARD RECURRENCE IS USED TO GENERATE
+ C SEQUENCES OR REDUCE ORDERS WHEN NECESSARY.
+ C
+ C THE CALCULATIONS ABOVE ARE DONE IN THE RIGHT HALF PLANE AND
+ C CONTINUED INTO THE LEFT HALF PLANE BY THE FORMULA
+ C
+ C I(FNU,Z*EXP(M*PI)) = EXP(M*PI*FNU)*I(FNU,Z) REAL(Z).GT.0.0
+ C M = +I OR -I, I**2=-1
+ C
+ C FOR NEGATIVE ORDERS,THE FORMULA
+ C
+ C I(-FNU,Z) = I(FNU,Z) + (2/PI)*SIN(PI*FNU)*K(FNU,Z)
+ C
+ C CAN BE USED. HOWEVER,FOR LARGE ORDERS CLOSE TO INTEGERS, THE
+ C THE FUNCTION CHANGES RADICALLY. WHEN FNU IS A LARGE POSITIVE
+ C INTEGER,THE MAGNITUDE OF I(-FNU,Z)=I(FNU,Z) IS A LARGE
+ C NEGATIVE POWER OF TEN. BUT WHEN FNU IS NOT AN INTEGER,
+ C K(FNU,Z) DOMINATES IN MAGNITUDE WITH A LARGE POSITIVE POWER OF
+ C TEN AND THE MOST THAT THE SECOND TERM CAN BE REDUCED IS BY
+ C UNIT ROUNDOFF FROM THE COEFFICIENT. THUS, WIDE CHANGES CAN
+ C OCCUR WITHIN UNIT ROUNDOFF OF A LARGE INTEGER FOR FNU. HERE,
+ C LARGE MEANS FNU.GT.CABS(Z).
+ C
+ C IN MOST COMPLEX VARIABLE COMPUTATION, ONE MUST EVALUATE ELE-
+ C MENTARY FUNCTIONS. WHEN THE MAGNITUDE OF Z OR FNU+N-1 IS
+ C LARGE, LOSSES OF SIGNIFICANCE BY ARGUMENT REDUCTION OCCUR.
+ C CONSEQUENTLY, IF EITHER ONE EXCEEDS U1=SQRT(0.5/UR), THEN
+ C LOSSES EXCEEDING HALF PRECISION ARE LIKELY AND AN ERROR FLAG
+ C IERR=3 IS TRIGGERED WHERE UR=DMAX1(D1MACH(4),1.0D-18) IS
+ C DOUBLE PRECISION UNIT ROUNDOFF LIMITED TO 18 DIGITS PRECISION.
+ C IF EITHER IS LARGER THAN U2=0.5/UR, THEN ALL SIGNIFICANCE IS
+ C LOST AND IERR=4. IN ORDER TO USE THE INT FUNCTION, ARGUMENTS
+ C MUST BE FURTHER RESTRICTED NOT TO EXCEED THE LARGEST MACHINE
+ C INTEGER, U3=I1MACH(9). THUS, THE MAGNITUDE OF Z AND FNU+N-1 IS
+ C RESTRICTED BY MIN(U2,U3). ON 32 BIT MACHINES, U1,U2, AND U3
+ C ARE APPROXIMATELY 2.0E+3, 4.2E+6, 2.1E+9 IN SINGLE PRECISION
+ C ARITHMETIC AND 1.3E+8, 1.8E+16, 2.1E+9 IN DOUBLE PRECISION
+ C ARITHMETIC RESPECTIVELY. THIS MAKES U2 AND U3 LIMITING IN
+ C THEIR RESPECTIVE ARITHMETICS. THIS MEANS THAT ONE CAN EXPECT
+ C TO RETAIN, IN THE WORST CASES ON 32 BIT MACHINES, NO DIGITS
+ C IN SINGLE AND ONLY 7 DIGITS IN DOUBLE PRECISION ARITHMETIC.
+ C SIMILAR CONSIDERATIONS HOLD FOR OTHER MACHINES.
+ C
+ C THE APPROXIMATE RELATIVE ERROR IN THE MAGNITUDE OF A COMPLEX
+ C BESSEL FUNCTION CAN BE EXPRESSED BY P*10**S WHERE P=MAX(UNIT
+ C ROUNDOFF,1.0E-18) IS THE NOMINAL PRECISION AND 10**S REPRE-
+ C SENTS THE INCREASE IN ERROR DUE TO ARGUMENT REDUCTION IN THE
+ C ELEMENTARY FUNCTIONS. HERE, S=MAX(1,ABS(LOG10(CABS(Z))),
+ C ABS(LOG10(FNU))) APPROXIMATELY (I.E. S=MAX(1,ABS(EXPONENT OF
+ C CABS(Z),ABS(EXPONENT OF FNU)) ). HOWEVER, THE PHASE ANGLE MAY
+ C HAVE ONLY ABSOLUTE ACCURACY. THIS IS MOST LIKELY TO OCCUR WHEN
+ C ONE COMPONENT (IN ABSOLUTE VALUE) IS LARGER THAN THE OTHER BY
+ C SEVERAL ORDERS OF MAGNITUDE. IF ONE COMPONENT IS 10**K LARGER
+ C THAN THE OTHER, THEN ONE CAN EXPECT ONLY MAX(ABS(LOG10(P))-K,
+ C 0) SIGNIFICANT DIGITS; OR, STATED ANOTHER WAY, WHEN K EXCEEDS
+ C THE EXPONENT OF P, NO SIGNIFICANT DIGITS REMAIN IN THE SMALLER
+ C COMPONENT. HOWEVER, THE PHASE ANGLE RETAINS ABSOLUTE ACCURACY
+ C BECAUSE, IN COMPLEX ARITHMETIC WITH PRECISION P, THE SMALLER
+ C COMPONENT WILL NOT (AS A RULE) DECREASE BELOW P TIMES THE
+ C MAGNITUDE OF THE LARGER COMPONENT. IN THESE EXTREME CASES,
+ C THE PRINCIPAL PHASE ANGLE IS ON THE ORDER OF +P, -P, PI/2-P,
+ C OR -PI/2+P.
+ C
+ C***REFERENCES HANDBOOK OF MATHEMATICAL FUNCTIONS BY M. ABRAMOWITZ
+ C AND I. A. STEGUN, NBS AMS SERIES 55, U.S. DEPT. OF
+ C COMMERCE, 1955.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C BY D. E. AMOS, SAND83-0083, MAY, 1983.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C AND LARGE ORDER BY D. E. AMOS, SAND83-0643, MAY, 1983
+ C
+ C A SUBROUTINE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, SAND85-
+ C 1018, MAY, 1985
+ C
+ C A PORTABLE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, TRANS.
+ C MATH. SOFTWARE, 1986
+ C
+ C***ROUTINES CALLED ZBINU,I1MACH,D1MACH
+ C***END PROLOGUE ZBESI
+ C COMPLEX CONE,CSGN,CW,CY,CZERO,Z,ZN
+ DOUBLE PRECISION AA, ALIM, ARG, CONEI, CONER, CSGNI, CSGNR, CYI,
+ * CYR, DIG, ELIM, FNU, FNUL, PI, RL, R1M5, STR, TOL, ZI, ZNI, ZNR,
+ * ZR, D1MACH, AZ, BB, FN, XZABS, ASCLE, RTOL, ATOL, STI
+ INTEGER I, IERR, INU, K, KODE, K1,K2,N,NZ,NN, I1MACH
+ DIMENSION CYR(N), CYI(N)
+ DATA PI /3.14159265358979324D0/
+ DATA CONER, CONEI /1.0D0,0.0D0/
+ C
+ C***FIRST EXECUTABLE STATEMENT ZBESI
+ IERR = 0
+ NZ=0
+ IF (FNU.LT.0.0D0) IERR=1
+ IF (KODE.LT.1 .OR. KODE.GT.2) IERR=1
+ IF (N.LT.1) IERR=1
+ IF (IERR.NE.0) RETURN
+ C-----------------------------------------------------------------------
+ C SET PARAMETERS RELATED TO MACHINE CONSTANTS.
+ C TOL IS THE APPROXIMATE UNIT ROUNDOFF LIMITED TO 1.0E-18.
+ C ELIM IS THE APPROXIMATE EXPONENTIAL OVER- AND UNDERFLOW LIMIT.
+ C EXP(-ELIM).LT.EXP(-ALIM)=EXP(-ELIM)/TOL AND
+ C EXP(ELIM).GT.EXP(ALIM)=EXP(ELIM)*TOL ARE INTERVALS NEAR
+ C UNDERFLOW AND OVERFLOW LIMITS WHERE SCALED ARITHMETIC IS DONE.
+ C RL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC EXPANSION FOR LARGE Z.
+ C DIG = NUMBER OF BASE 10 DIGITS IN TOL = 10**(-DIG).
+ C FNUL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC SERIES FOR LARGE FNU.
+ C-----------------------------------------------------------------------
+ TOL = DMAX1(D1MACH(4),1.0D-18)
+ K1 = I1MACH(15)
+ K2 = I1MACH(16)
+ R1M5 = D1MACH(5)
+ K = MIN0(IABS(K1),IABS(K2))
+ ELIM = 2.303D0*(DBLE(FLOAT(K))*R1M5-3.0D0)
+ K1 = I1MACH(14) - 1
+ AA = R1M5*DBLE(FLOAT(K1))
+ DIG = DMIN1(AA,18.0D0)
+ AA = AA*2.303D0
+ ALIM = ELIM + DMAX1(-AA,-41.45D0)
+ RL = 1.2D0*DIG + 3.0D0
+ FNUL = 10.0D0 + 6.0D0*(DIG-3.0D0)
+ C-----------------------------------------------------------------------------
+ C TEST FOR PROPER RANGE
+ C-----------------------------------------------------------------------
+ AZ = XZABS(ZR,ZI)
+ FN = FNU+DBLE(FLOAT(N-1))
+ AA = 0.5D0/TOL
+ BB=DBLE(FLOAT(I1MACH(9)))*0.5D0
+ AA = DMIN1(AA,BB)
+ IF (AZ.GT.AA) GO TO 260
+ IF (FN.GT.AA) GO TO 260
+ AA = DSQRT(AA)
+ IF (AZ.GT.AA) IERR=3
+ IF (FN.GT.AA) IERR=3
+ ZNR = ZR
+ ZNI = ZI
+ CSGNR = CONER
+ CSGNI = CONEI
+ IF (ZR.GE.0.0D0) GO TO 40
+ ZNR = -ZR
+ ZNI = -ZI
+ C-----------------------------------------------------------------------
+ C CALCULATE CSGN=EXP(FNU*PI*I) TO MINIMIZE LOSSES OF SIGNIFICANCE
+ C WHEN FNU IS LARGE
+ C-----------------------------------------------------------------------
+ INU = INT(SNGL(FNU))
+ ARG = (FNU-DBLE(FLOAT(INU)))*PI
+ IF (ZI.LT.0.0D0) ARG = -ARG
+ CSGNR = DCOS(ARG)
+ CSGNI = DSIN(ARG)
+ IF (MOD(INU,2).EQ.0) GO TO 40
+ CSGNR = -CSGNR
+ CSGNI = -CSGNI
+ 40 CONTINUE
+ CALL ZBINU(ZNR, ZNI, FNU, KODE, N, CYR, CYI, NZ, RL, FNUL, TOL,
+ * ELIM, ALIM)
+ IF (NZ.LT.0) GO TO 120
+ IF (ZR.GE.0.0D0) RETURN
+ C-----------------------------------------------------------------------
+ C ANALYTIC CONTINUATION TO THE LEFT HALF PLANE
+ C-----------------------------------------------------------------------
+ NN = N - NZ
+ IF (NN.EQ.0) RETURN
+ RTOL = 1.0D0/TOL
+ ASCLE = D1MACH(1)*RTOL*1.0D+3
+ DO 50 I=1,NN
+ C STR = CYR(I)*CSGNR - CYI(I)*CSGNI
+ C CYI(I) = CYR(I)*CSGNI + CYI(I)*CSGNR
+ C CYR(I) = STR
+ AA = CYR(I)
+ BB = CYI(I)
+ ATOL = 1.0D0
+ IF (DMAX1(DABS(AA),DABS(BB)).GT.ASCLE) GO TO 55
+ AA = AA*RTOL
+ BB = BB*RTOL
+ ATOL = TOL
+ 55 CONTINUE
+ STR = AA*CSGNR - BB*CSGNI
+ STI = AA*CSGNI + BB*CSGNR
+ CYR(I) = STR*ATOL
+ CYI(I) = STI*ATOL
+ CSGNR = -CSGNR
+ CSGNI = -CSGNI
+ 50 CONTINUE
+ RETURN
+ 120 CONTINUE
+ IF(NZ.EQ.(-2)) GO TO 130
+ NZ = 0
+ IERR=2
+ RETURN
+ 130 CONTINUE
+ NZ=0
+ IERR=5
+ RETURN
+ 260 CONTINUE
+ NZ=0
+ IERR=4
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbesj.f octave-2.0.14/libcruft/amos/zbesj.f
*** octave-2.0.13/libcruft/amos/zbesj.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbesj.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,266 ----
+ SUBROUTINE ZBESJ(ZR, ZI, FNU, KODE, N, CYR, CYI, NZ, IERR)
+ C***BEGIN PROLOGUE ZBESJ
+ C***DATE WRITTEN 830501 (YYMMDD)
+ C***REVISION DATE 890801 (YYMMDD)
+ C***CATEGORY NO. B5K
+ C***KEYWORDS J-BESSEL FUNCTION,BESSEL FUNCTION OF COMPLEX ARGUMENT,
+ C BESSEL FUNCTION OF FIRST KIND
+ C***AUTHOR AMOS, DONALD E., SANDIA NATIONAL LABORATORIES
+ C***PURPOSE TO COMPUTE THE J-BESSEL FUNCTION OF A COMPLEX ARGUMENT
+ C***DESCRIPTION
+ C
+ C ***A DOUBLE PRECISION ROUTINE***
+ C ON KODE=1, CBESJ COMPUTES AN N MEMBER SEQUENCE OF COMPLEX
+ C BESSEL FUNCTIONS CY(I)=J(FNU+I-1,Z) FOR REAL, NONNEGATIVE
+ C ORDERS FNU+I-1, I=1,...,N AND COMPLEX Z IN THE CUT PLANE
+ C -PI.LT.ARG(Z).LE.PI. ON KODE=2, CBESJ RETURNS THE SCALED
+ C FUNCTIONS
+ C
+ C CY(I)=EXP(-ABS(Y))*J(FNU+I-1,Z) I = 1,...,N , Y=AIMAG(Z)
+ C
+ C WHICH REMOVE THE EXPONENTIAL GROWTH IN BOTH THE UPPER AND
+ C LOWER HALF PLANES FOR Z TO INFINITY. DEFINITIONS AND NOTATION
+ C ARE FOUND IN THE NBS HANDBOOK OF MATHEMATICAL FUNCTIONS
+ C (REF. 1).
+ C
+ C INPUT ZR,ZI,FNU ARE DOUBLE PRECISION
+ C ZR,ZI - Z=CMPLX(ZR,ZI), -PI.LT.ARG(Z).LE.PI
+ C FNU - ORDER OF INITIAL J FUNCTION, FNU.GE.0.0D0
+ C KODE - A PARAMETER TO INDICATE THE SCALING OPTION
+ C KODE= 1 RETURNS
+ C CY(I)=J(FNU+I-1,Z), I=1,...,N
+ C = 2 RETURNS
+ C CY(I)=J(FNU+I-1,Z)EXP(-ABS(Y)), I=1,...,N
+ C N - NUMBER OF MEMBERS OF THE SEQUENCE, N.GE.1
+ C
+ C OUTPUT CYR,CYI ARE DOUBLE PRECISION
+ C CYR,CYI- DOUBLE PRECISION VECTORS WHOSE FIRST N COMPONENTS
+ C CONTAIN REAL AND IMAGINARY PARTS FOR THE SEQUENCE
+ C CY(I)=J(FNU+I-1,Z) OR
+ C CY(I)=J(FNU+I-1,Z)EXP(-ABS(Y)) I=1,...,N
+ C DEPENDING ON KODE, Y=AIMAG(Z).
+ C NZ - NUMBER OF COMPONENTS SET TO ZERO DUE TO UNDERFLOW,
+ C NZ= 0 , NORMAL RETURN
+ C NZ.GT.0 , LAST NZ COMPONENTS OF CY SET ZERO DUE
+ C TO UNDERFLOW, CY(I)=CMPLX(0.0D0,0.0D0),
+ C I = N-NZ+1,...,N
+ C IERR - ERROR FLAG
+ C IERR=0, NORMAL RETURN - COMPUTATION COMPLETED
+ C IERR=1, INPUT ERROR - NO COMPUTATION
+ C IERR=2, OVERFLOW - NO COMPUTATION, AIMAG(Z)
+ C TOO LARGE ON KODE=1
+ C IERR=3, CABS(Z) OR FNU+N-1 LARGE - COMPUTATION DONE
+ C BUT LOSSES OF SIGNIFCANCE BY ARGUMENT
+ C REDUCTION PRODUCE LESS THAN HALF OF MACHINE
+ C ACCURACY
+ C IERR=4, CABS(Z) OR FNU+N-1 TOO LARGE - NO COMPUTA-
+ C TION BECAUSE OF COMPLETE LOSSES OF SIGNIFI-
+ C CANCE BY ARGUMENT REDUCTION
+ C IERR=5, ERROR - NO COMPUTATION,
+ C ALGORITHM TERMINATION CONDITION NOT MET
+ C
+ C***LONG DESCRIPTION
+ C
+ C THE COMPUTATION IS CARRIED OUT BY THE FORMULA
+ C
+ C J(FNU,Z)=EXP( FNU*PI*I/2)*I(FNU,-I*Z) AIMAG(Z).GE.0.0
+ C
+ C J(FNU,Z)=EXP(-FNU*PI*I/2)*I(FNU, I*Z) AIMAG(Z).LT.0.0
+ C
+ C WHERE I**2 = -1 AND I(FNU,Z) IS THE I BESSEL FUNCTION.
+ C
+ C FOR NEGATIVE ORDERS,THE FORMULA
+ C
+ C J(-FNU,Z) = J(FNU,Z)*COS(PI*FNU) - Y(FNU,Z)*SIN(PI*FNU)
+ C
+ C CAN BE USED. HOWEVER,FOR LARGE ORDERS CLOSE TO INTEGERS, THE
+ C THE FUNCTION CHANGES RADICALLY. WHEN FNU IS A LARGE POSITIVE
+ C INTEGER,THE MAGNITUDE OF J(-FNU,Z)=J(FNU,Z)*COS(PI*FNU) IS A
+ C LARGE NEGATIVE POWER OF TEN. BUT WHEN FNU IS NOT AN INTEGER,
+ C Y(FNU,Z) DOMINATES IN MAGNITUDE WITH A LARGE POSITIVE POWER OF
+ C TEN AND THE MOST THAT THE SECOND TERM CAN BE REDUCED IS BY
+ C UNIT ROUNDOFF FROM THE COEFFICIENT. THUS, WIDE CHANGES CAN
+ C OCCUR WITHIN UNIT ROUNDOFF OF A LARGE INTEGER FOR FNU. HERE,
+ C LARGE MEANS FNU.GT.CABS(Z).
+ C
+ C IN MOST COMPLEX VARIABLE COMPUTATION, ONE MUST EVALUATE ELE-
+ C MENTARY FUNCTIONS. WHEN THE MAGNITUDE OF Z OR FNU+N-1 IS
+ C LARGE, LOSSES OF SIGNIFICANCE BY ARGUMENT REDUCTION OCCUR.
+ C CONSEQUENTLY, IF EITHER ONE EXCEEDS U1=SQRT(0.5/UR), THEN
+ C LOSSES EXCEEDING HALF PRECISION ARE LIKELY AND AN ERROR FLAG
+ C IERR=3 IS TRIGGERED WHERE UR=DMAX1(D1MACH(4),1.0D-18) IS
+ C DOUBLE PRECISION UNIT ROUNDOFF LIMITED TO 18 DIGITS PRECISION.
+ C IF EITHER IS LARGER THAN U2=0.5/UR, THEN ALL SIGNIFICANCE IS
+ C LOST AND IERR=4. IN ORDER TO USE THE INT FUNCTION, ARGUMENTS
+ C MUST BE FURTHER RESTRICTED NOT TO EXCEED THE LARGEST MACHINE
+ C INTEGER, U3=I1MACH(9). THUS, THE MAGNITUDE OF Z AND FNU+N-1 IS
+ C RESTRICTED BY MIN(U2,U3). ON 32 BIT MACHINES, U1,U2, AND U3
+ C ARE APPROXIMATELY 2.0E+3, 4.2E+6, 2.1E+9 IN SINGLE PRECISION
+ C ARITHMETIC AND 1.3E+8, 1.8E+16, 2.1E+9 IN DOUBLE PRECISION
+ C ARITHMETIC RESPECTIVELY. THIS MAKES U2 AND U3 LIMITING IN
+ C THEIR RESPECTIVE ARITHMETICS. THIS MEANS THAT ONE CAN EXPECT
+ C TO RETAIN, IN THE WORST CASES ON 32 BIT MACHINES, NO DIGITS
+ C IN SINGLE AND ONLY 7 DIGITS IN DOUBLE PRECISION ARITHMETIC.
+ C SIMILAR CONSIDERATIONS HOLD FOR OTHER MACHINES.
+ C
+ C THE APPROXIMATE RELATIVE ERROR IN THE MAGNITUDE OF A COMPLEX
+ C BESSEL FUNCTION CAN BE EXPRESSED BY P*10**S WHERE P=MAX(UNIT
+ C ROUNDOFF,1.0E-18) IS THE NOMINAL PRECISION AND 10**S REPRE-
+ C SENTS THE INCREASE IN ERROR DUE TO ARGUMENT REDUCTION IN THE
+ C ELEMENTARY FUNCTIONS. HERE, S=MAX(1,ABS(LOG10(CABS(Z))),
+ C ABS(LOG10(FNU))) APPROXIMATELY (I.E. S=MAX(1,ABS(EXPONENT OF
+ C CABS(Z),ABS(EXPONENT OF FNU)) ). HOWEVER, THE PHASE ANGLE MAY
+ C HAVE ONLY ABSOLUTE ACCURACY. THIS IS MOST LIKELY TO OCCUR WHEN
+ C ONE COMPONENT (IN ABSOLUTE VALUE) IS LARGER THAN THE OTHER BY
+ C SEVERAL ORDERS OF MAGNITUDE. IF ONE COMPONENT IS 10**K LARGER
+ C THAN THE OTHER, THEN ONE CAN EXPECT ONLY MAX(ABS(LOG10(P))-K,
+ C 0) SIGNIFICANT DIGITS; OR, STATED ANOTHER WAY, WHEN K EXCEEDS
+ C THE EXPONENT OF P, NO SIGNIFICANT DIGITS REMAIN IN THE SMALLER
+ C COMPONENT. HOWEVER, THE PHASE ANGLE RETAINS ABSOLUTE ACCURACY
+ C BECAUSE, IN COMPLEX ARITHMETIC WITH PRECISION P, THE SMALLER
+ C COMPONENT WILL NOT (AS A RULE) DECREASE BELOW P TIMES THE
+ C MAGNITUDE OF THE LARGER COMPONENT. IN THESE EXTREME CASES,
+ C THE PRINCIPAL PHASE ANGLE IS ON THE ORDER OF +P, -P, PI/2-P,
+ C OR -PI/2+P.
+ C
+ C***REFERENCES HANDBOOK OF MATHEMATICAL FUNCTIONS BY M. ABRAMOWITZ
+ C AND I. A. STEGUN, NBS AMS SERIES 55, U.S. DEPT. OF
+ C COMMERCE, 1955.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C BY D. E. AMOS, SAND83-0083, MAY, 1983.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C AND LARGE ORDER BY D. E. AMOS, SAND83-0643, MAY, 1983
+ C
+ C A SUBROUTINE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, SAND85-
+ C 1018, MAY, 1985
+ C
+ C A PORTABLE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, TRANS.
+ C MATH. SOFTWARE, 1986
+ C
+ C***ROUTINES CALLED ZBINU,I1MACH,D1MACH
+ C***END PROLOGUE ZBESJ
+ C
+ C COMPLEX CI,CSGN,CY,Z,ZN
+ DOUBLE PRECISION AA, ALIM, ARG, CII, CSGNI, CSGNR, CYI, CYR, DIG,
+ * ELIM, FNU, FNUL, HPI, RL, R1M5, STR, TOL, ZI, ZNI, ZNR, ZR,
+ * D1MACH, BB, FN, AZ, XZABS, ASCLE, RTOL, ATOL, STI
+ INTEGER I, IERR, INU, INUH, IR, K, KODE, K1, K2, N, NL, NZ, I1MACH
+ DIMENSION CYR(N), CYI(N)
+ DATA HPI /1.57079632679489662D0/
+ C
+ C***FIRST EXECUTABLE STATEMENT ZBESJ
+ IERR = 0
+ NZ=0
+ IF (FNU.LT.0.0D0) IERR=1
+ IF (KODE.LT.1 .OR. KODE.GT.2) IERR=1
+ IF (N.LT.1) IERR=1
+ IF (IERR.NE.0) RETURN
+ C-----------------------------------------------------------------------
+ C SET PARAMETERS RELATED TO MACHINE CONSTANTS.
+ C TOL IS THE APPROXIMATE UNIT ROUNDOFF LIMITED TO 1.0E-18.
+ C ELIM IS THE APPROXIMATE EXPONENTIAL OVER- AND UNDERFLOW LIMIT.
+ C EXP(-ELIM).LT.EXP(-ALIM)=EXP(-ELIM)/TOL AND
+ C EXP(ELIM).GT.EXP(ALIM)=EXP(ELIM)*TOL ARE INTERVALS NEAR
+ C UNDERFLOW AND OVERFLOW LIMITS WHERE SCALED ARITHMETIC IS DONE.
+ C RL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC EXPANSION FOR LARGE Z.
+ C DIG = NUMBER OF BASE 10 DIGITS IN TOL = 10**(-DIG).
+ C FNUL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC SERIES FOR LARGE FNU.
+ C-----------------------------------------------------------------------
+ TOL = DMAX1(D1MACH(4),1.0D-18)
+ K1 = I1MACH(15)
+ K2 = I1MACH(16)
+ R1M5 = D1MACH(5)
+ K = MIN0(IABS(K1),IABS(K2))
+ ELIM = 2.303D0*(DBLE(FLOAT(K))*R1M5-3.0D0)
+ K1 = I1MACH(14) - 1
+ AA = R1M5*DBLE(FLOAT(K1))
+ DIG = DMIN1(AA,18.0D0)
+ AA = AA*2.303D0
+ ALIM = ELIM + DMAX1(-AA,-41.45D0)
+ RL = 1.2D0*DIG + 3.0D0
+ FNUL = 10.0D0 + 6.0D0*(DIG-3.0D0)
+ C-----------------------------------------------------------------------
+ C TEST FOR PROPER RANGE
+ C-----------------------------------------------------------------------
+ AZ = XZABS(ZR,ZI)
+ FN = FNU+DBLE(FLOAT(N-1))
+ AA = 0.5D0/TOL
+ BB=DBLE(FLOAT(I1MACH(9)))*0.5D0
+ AA = DMIN1(AA,BB)
+ IF (AZ.GT.AA) GO TO 260
+ IF (FN.GT.AA) GO TO 260
+ AA = DSQRT(AA)
+ IF (AZ.GT.AA) IERR=3
+ IF (FN.GT.AA) IERR=3
+ C-----------------------------------------------------------------------
+ C CALCULATE CSGN=EXP(FNU*HPI*I) TO MINIMIZE LOSSES OF SIGNIFICANCE
+ C WHEN FNU IS LARGE
+ C-----------------------------------------------------------------------
+ CII = 1.0D0
+ INU = INT(SNGL(FNU))
+ INUH = INU/2
+ IR = INU - 2*INUH
+ ARG = (FNU-DBLE(FLOAT(INU-IR)))*HPI
+ CSGNR = DCOS(ARG)
+ CSGNI = DSIN(ARG)
+ IF (MOD(INUH,2).EQ.0) GO TO 40
+ CSGNR = -CSGNR
+ CSGNI = -CSGNI
+ 40 CONTINUE
+ C-----------------------------------------------------------------------
+ C ZN IS IN THE RIGHT HALF PLANE
+ C-----------------------------------------------------------------------
+ ZNR = ZI
+ ZNI = -ZR
+ IF (ZI.GE.0.0D0) GO TO 50
+ ZNR = -ZNR
+ ZNI = -ZNI
+ CSGNI = -CSGNI
+ CII = -CII
+ 50 CONTINUE
+ CALL ZBINU(ZNR, ZNI, FNU, KODE, N, CYR, CYI, NZ, RL, FNUL, TOL,
+ * ELIM, ALIM)
+ IF (NZ.LT.0) GO TO 130
+ NL = N - NZ
+ IF (NL.EQ.0) RETURN
+ RTOL = 1.0D0/TOL
+ ASCLE = D1MACH(1)*RTOL*1.0D+3
+ DO 60 I=1,NL
+ C STR = CYR(I)*CSGNR - CYI(I)*CSGNI
+ C CYI(I) = CYR(I)*CSGNI + CYI(I)*CSGNR
+ C CYR(I) = STR
+ AA = CYR(I)
+ BB = CYI(I)
+ ATOL = 1.0D0
+ IF (DMAX1(DABS(AA),DABS(BB)).GT.ASCLE) GO TO 55
+ AA = AA*RTOL
+ BB = BB*RTOL
+ ATOL = TOL
+ 55 CONTINUE
+ STR = AA*CSGNR - BB*CSGNI
+ STI = AA*CSGNI + BB*CSGNR
+ CYR(I) = STR*ATOL
+ CYI(I) = STI*ATOL
+ STR = -CSGNI*CII
+ CSGNI = CSGNR*CII
+ CSGNR = STR
+ 60 CONTINUE
+ RETURN
+ 130 CONTINUE
+ IF(NZ.EQ.(-2)) GO TO 140
+ NZ = 0
+ IERR = 2
+ RETURN
+ 140 CONTINUE
+ NZ=0
+ IERR=5
+ RETURN
+ 260 CONTINUE
+ NZ=0
+ IERR=4
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbesk.f octave-2.0.14/libcruft/amos/zbesk.f
*** octave-2.0.13/libcruft/amos/zbesk.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbesk.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,281 ----
+ SUBROUTINE ZBESK(ZR, ZI, FNU, KODE, N, CYR, CYI, NZ, IERR)
+ C***BEGIN PROLOGUE ZBESK
+ C***DATE WRITTEN 830501 (YYMMDD)
+ C***REVISION DATE 890801 (YYMMDD)
+ C***CATEGORY NO. B5K
+ C***KEYWORDS K-BESSEL FUNCTION,COMPLEX BESSEL FUNCTION,
+ C MODIFIED BESSEL FUNCTION OF THE SECOND KIND,
+ C BESSEL FUNCTION OF THE THIRD KIND
+ C***AUTHOR AMOS, DONALD E., SANDIA NATIONAL LABORATORIES
+ C***PURPOSE TO COMPUTE K-BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C***DESCRIPTION
+ C
+ C ***A DOUBLE PRECISION ROUTINE***
+ C
+ C ON KODE=1, CBESK COMPUTES AN N MEMBER SEQUENCE OF COMPLEX
+ C BESSEL FUNCTIONS CY(J)=K(FNU+J-1,Z) FOR REAL, NONNEGATIVE
+ C ORDERS FNU+J-1, J=1,...,N AND COMPLEX Z.NE.CMPLX(0.0,0.0)
+ C IN THE CUT PLANE -PI.LT.ARG(Z).LE.PI. ON KODE=2, CBESK
+ C RETURNS THE SCALED K FUNCTIONS,
+ C
+ C CY(J)=EXP(Z)*K(FNU+J-1,Z) , J=1,...,N,
+ C
+ C WHICH REMOVE THE EXPONENTIAL BEHAVIOR IN BOTH THE LEFT AND
+ C RIGHT HALF PLANES FOR Z TO INFINITY. DEFINITIONS AND
+ C NOTATION ARE FOUND IN THE NBS HANDBOOK OF MATHEMATICAL
+ C FUNCTIONS (REF. 1).
+ C
+ C INPUT ZR,ZI,FNU ARE DOUBLE PRECISION
+ C ZR,ZI - Z=CMPLX(ZR,ZI), Z.NE.CMPLX(0.0D0,0.0D0),
+ C -PI.LT.ARG(Z).LE.PI
+ C FNU - ORDER OF INITIAL K FUNCTION, FNU.GE.0.0D0
+ C N - NUMBER OF MEMBERS OF THE SEQUENCE, N.GE.1
+ C KODE - A PARAMETER TO INDICATE THE SCALING OPTION
+ C KODE= 1 RETURNS
+ C CY(I)=K(FNU+I-1,Z), I=1,...,N
+ C = 2 RETURNS
+ C CY(I)=K(FNU+I-1,Z)*EXP(Z), I=1,...,N
+ C
+ C OUTPUT CYR,CYI ARE DOUBLE PRECISION
+ C CYR,CYI- DOUBLE PRECISION VECTORS WHOSE FIRST N COMPONENTS
+ C CONTAIN REAL AND IMAGINARY PARTS FOR THE SEQUENCE
+ C CY(I)=K(FNU+I-1,Z), I=1,...,N OR
+ C CY(I)=K(FNU+I-1,Z)*EXP(Z), I=1,...,N
+ C DEPENDING ON KODE
+ C NZ - NUMBER OF COMPONENTS SET TO ZERO DUE TO UNDERFLOW.
+ C NZ= 0 , NORMAL RETURN
+ C NZ.GT.0 , FIRST NZ COMPONENTS OF CY SET TO ZERO DUE
+ C TO UNDERFLOW, CY(I)=CMPLX(0.0D0,0.0D0),
+ C I=1,...,N WHEN X.GE.0.0. WHEN X.LT.0.0
+ C NZ STATES ONLY THE NUMBER OF UNDERFLOWS
+ C IN THE SEQUENCE.
+ C
+ C IERR - ERROR FLAG
+ C IERR=0, NORMAL RETURN - COMPUTATION COMPLETED
+ C IERR=1, INPUT ERROR - NO COMPUTATION
+ C IERR=2, OVERFLOW - NO COMPUTATION, FNU IS
+ C TOO LARGE OR CABS(Z) IS TOO SMALL OR BOTH
+ C IERR=3, CABS(Z) OR FNU+N-1 LARGE - COMPUTATION DONE
+ C BUT LOSSES OF SIGNIFCANCE BY ARGUMENT
+ C REDUCTION PRODUCE LESS THAN HALF OF MACHINE
+ C ACCURACY
+ C IERR=4, CABS(Z) OR FNU+N-1 TOO LARGE - NO COMPUTA-
+ C TION BECAUSE OF COMPLETE LOSSES OF SIGNIFI-
+ C CANCE BY ARGUMENT REDUCTION
+ C IERR=5, ERROR - NO COMPUTATION,
+ C ALGORITHM TERMINATION CONDITION NOT MET
+ C
+ C***LONG DESCRIPTION
+ C
+ C EQUATIONS OF THE REFERENCE ARE IMPLEMENTED FOR SMALL ORDERS
+ C DNU AND DNU+1.0 IN THE RIGHT HALF PLANE X.GE.0.0. FORWARD
+ C RECURRENCE GENERATES HIGHER ORDERS. K IS CONTINUED TO THE LEFT
+ C HALF PLANE BY THE RELATION
+ C
+ C K(FNU,Z*EXP(MP)) = EXP(-MP*FNU)*K(FNU,Z)-MP*I(FNU,Z)
+ C MP=MR*PI*I, MR=+1 OR -1, RE(Z).GT.0, I**2=-1
+ C
+ C WHERE I(FNU,Z) IS THE I BESSEL FUNCTION.
+ C
+ C FOR LARGE ORDERS, FNU.GT.FNUL, THE K FUNCTION IS COMPUTED
+ C BY MEANS OF ITS UNIFORM ASYMPTOTIC EXPANSIONS.
+ C
+ C FOR NEGATIVE ORDERS, THE FORMULA
+ C
+ C K(-FNU,Z) = K(FNU,Z)
+ C
+ C CAN BE USED.
+ C
+ C CBESK ASSUMES THAT A SIGNIFICANT DIGIT SINH(X) FUNCTION IS
+ C AVAILABLE.
+ C
+ C IN MOST COMPLEX VARIABLE COMPUTATION, ONE MUST EVALUATE ELE-
+ C MENTARY FUNCTIONS. WHEN THE MAGNITUDE OF Z OR FNU+N-1 IS
+ C LARGE, LOSSES OF SIGNIFICANCE BY ARGUMENT REDUCTION OCCUR.
+ C CONSEQUENTLY, IF EITHER ONE EXCEEDS U1=SQRT(0.5/UR), THEN
+ C LOSSES EXCEEDING HALF PRECISION ARE LIKELY AND AN ERROR FLAG
+ C IERR=3 IS TRIGGERED WHERE UR=DMAX1(D1MACH(4),1.0D-18) IS
+ C DOUBLE PRECISION UNIT ROUNDOFF LIMITED TO 18 DIGITS PRECISION.
+ C IF EITHER IS LARGER THAN U2=0.5/UR, THEN ALL SIGNIFICANCE IS
+ C LOST AND IERR=4. IN ORDER TO USE THE INT FUNCTION, ARGUMENTS
+ C MUST BE FURTHER RESTRICTED NOT TO EXCEED THE LARGEST MACHINE
+ C INTEGER, U3=I1MACH(9). THUS, THE MAGNITUDE OF Z AND FNU+N-1 IS
+ C RESTRICTED BY MIN(U2,U3). ON 32 BIT MACHINES, U1,U2, AND U3
+ C ARE APPROXIMATELY 2.0E+3, 4.2E+6, 2.1E+9 IN SINGLE PRECISION
+ C ARITHMETIC AND 1.3E+8, 1.8E+16, 2.1E+9 IN DOUBLE PRECISION
+ C ARITHMETIC RESPECTIVELY. THIS MAKES U2 AND U3 LIMITING IN
+ C THEIR RESPECTIVE ARITHMETICS. THIS MEANS THAT ONE CAN EXPECT
+ C TO RETAIN, IN THE WORST CASES ON 32 BIT MACHINES, NO DIGITS
+ C IN SINGLE AND ONLY 7 DIGITS IN DOUBLE PRECISION ARITHMETIC.
+ C SIMILAR CONSIDERATIONS HOLD FOR OTHER MACHINES.
+ C
+ C THE APPROXIMATE RELATIVE ERROR IN THE MAGNITUDE OF A COMPLEX
+ C BESSEL FUNCTION CAN BE EXPRESSED BY P*10**S WHERE P=MAX(UNIT
+ C ROUNDOFF,1.0E-18) IS THE NOMINAL PRECISION AND 10**S REPRE-
+ C SENTS THE INCREASE IN ERROR DUE TO ARGUMENT REDUCTION IN THE
+ C ELEMENTARY FUNCTIONS. HERE, S=MAX(1,ABS(LOG10(CABS(Z))),
+ C ABS(LOG10(FNU))) APPROXIMATELY (I.E. S=MAX(1,ABS(EXPONENT OF
+ C CABS(Z),ABS(EXPONENT OF FNU)) ). HOWEVER, THE PHASE ANGLE MAY
+ C HAVE ONLY ABSOLUTE ACCURACY. THIS IS MOST LIKELY TO OCCUR WHEN
+ C ONE COMPONENT (IN ABSOLUTE VALUE) IS LARGER THAN THE OTHER BY
+ C SEVERAL ORDERS OF MAGNITUDE. IF ONE COMPONENT IS 10**K LARGER
+ C THAN THE OTHER, THEN ONE CAN EXPECT ONLY MAX(ABS(LOG10(P))-K,
+ C 0) SIGNIFICANT DIGITS; OR, STATED ANOTHER WAY, WHEN K EXCEEDS
+ C THE EXPONENT OF P, NO SIGNIFICANT DIGITS REMAIN IN THE SMALLER
+ C COMPONENT. HOWEVER, THE PHASE ANGLE RETAINS ABSOLUTE ACCURACY
+ C BECAUSE, IN COMPLEX ARITHMETIC WITH PRECISION P, THE SMALLER
+ C COMPONENT WILL NOT (AS A RULE) DECREASE BELOW P TIMES THE
+ C MAGNITUDE OF THE LARGER COMPONENT. IN THESE EXTREME CASES,
+ C THE PRINCIPAL PHASE ANGLE IS ON THE ORDER OF +P, -P, PI/2-P,
+ C OR -PI/2+P.
+ C
+ C***REFERENCES HANDBOOK OF MATHEMATICAL FUNCTIONS BY M. ABRAMOWITZ
+ C AND I. A. STEGUN, NBS AMS SERIES 55, U.S. DEPT. OF
+ C COMMERCE, 1955.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C BY D. E. AMOS, SAND83-0083, MAY, 1983.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C AND LARGE ORDER BY D. E. AMOS, SAND83-0643, MAY, 1983.
+ C
+ C A SUBROUTINE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, SAND85-
+ C 1018, MAY, 1985
+ C
+ C A PORTABLE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, TRANS.
+ C MATH. SOFTWARE, 1986
+ C
+ C***ROUTINES CALLED ZACON,ZBKNU,ZBUNK,ZUOIK,XZABS,I1MACH,D1MACH
+ C***END PROLOGUE ZBESK
+ C
+ C COMPLEX CY,Z
+ DOUBLE PRECISION AA, ALIM, ALN, ARG, AZ, CYI, CYR, DIG, ELIM, FN,
+ * FNU, FNUL, RL, R1M5, TOL, UFL, ZI, ZR, D1MACH, XZABS, BB
+ INTEGER IERR, K, KODE, K1, K2, MR, N, NN, NUF, NW, NZ, I1MACH
+ DIMENSION CYR(N), CYI(N)
+ C***FIRST EXECUTABLE STATEMENT ZBESK
+ IERR = 0
+ NZ=0
+ IF (ZI.EQ.0.0E0 .AND. ZR.EQ.0.0E0) IERR=1
+ IF (FNU.LT.0.0D0) IERR=1
+ IF (KODE.LT.1 .OR. KODE.GT.2) IERR=1
+ IF (N.LT.1) IERR=1
+ IF (IERR.NE.0) RETURN
+ NN = N
+ C-----------------------------------------------------------------------
+ C SET PARAMETERS RELATED TO MACHINE CONSTANTS.
+ C TOL IS THE APPROXIMATE UNIT ROUNDOFF LIMITED TO 1.0E-18.
+ C ELIM IS THE APPROXIMATE EXPONENTIAL OVER- AND UNDERFLOW LIMIT.
+ C EXP(-ELIM).LT.EXP(-ALIM)=EXP(-ELIM)/TOL AND
+ C EXP(ELIM).GT.EXP(ALIM)=EXP(ELIM)*TOL ARE INTERVALS NEAR
+ C UNDERFLOW AND OVERFLOW LIMITS WHERE SCALED ARITHMETIC IS DONE.
+ C RL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC EXPANSION FOR LARGE Z.
+ C DIG = NUMBER OF BASE 10 DIGITS IN TOL = 10**(-DIG).
+ C FNUL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC SERIES FOR LARGE FNU
+ C-----------------------------------------------------------------------
+ TOL = DMAX1(D1MACH(4),1.0D-18)
+ K1 = I1MACH(15)
+ K2 = I1MACH(16)
+ R1M5 = D1MACH(5)
+ K = MIN0(IABS(K1),IABS(K2))
+ ELIM = 2.303D0*(DBLE(FLOAT(K))*R1M5-3.0D0)
+ K1 = I1MACH(14) - 1
+ AA = R1M5*DBLE(FLOAT(K1))
+ DIG = DMIN1(AA,18.0D0)
+ AA = AA*2.303D0
+ ALIM = ELIM + DMAX1(-AA,-41.45D0)
+ FNUL = 10.0D0 + 6.0D0*(DIG-3.0D0)
+ RL = 1.2D0*DIG + 3.0D0
+ C-----------------------------------------------------------------------------
+ C TEST FOR PROPER RANGE
+ C-----------------------------------------------------------------------
+ AZ = XZABS(ZR,ZI)
+ FN = FNU + DBLE(FLOAT(NN-1))
+ AA = 0.5D0/TOL
+ BB=DBLE(FLOAT(I1MACH(9)))*0.5D0
+ AA = DMIN1(AA,BB)
+ IF (AZ.GT.AA) GO TO 260
+ IF (FN.GT.AA) GO TO 260
+ AA = DSQRT(AA)
+ IF (AZ.GT.AA) IERR=3
+ IF (FN.GT.AA) IERR=3
+ C-----------------------------------------------------------------------
+ C OVERFLOW TEST ON THE LAST MEMBER OF THE SEQUENCE
+ C-----------------------------------------------------------------------
+ C UFL = DEXP(-ELIM)
+ UFL = D1MACH(1)*1.0D+3
+ IF (AZ.LT.UFL) GO TO 180
+ IF (FNU.GT.FNUL) GO TO 80
+ IF (FN.LE.1.0D0) GO TO 60
+ IF (FN.GT.2.0D0) GO TO 50
+ IF (AZ.GT.TOL) GO TO 60
+ ARG = 0.5D0*AZ
+ ALN = -FN*DLOG(ARG)
+ IF (ALN.GT.ELIM) GO TO 180
+ GO TO 60
+ 50 CONTINUE
+ CALL ZUOIK(ZR, ZI, FNU, KODE, 2, NN, CYR, CYI, NUF, TOL, ELIM,
+ * ALIM)
+ IF (NUF.LT.0) GO TO 180
+ NZ = NZ + NUF
+ NN = NN - NUF
+ C-----------------------------------------------------------------------
+ C HERE NN=N OR NN=0 SINCE NUF=0,NN, OR -1 ON RETURN FROM CUOIK
+ C IF NUF=NN, THEN CY(I)=CZERO FOR ALL I
+ C-----------------------------------------------------------------------
+ IF (NN.EQ.0) GO TO 100
+ 60 CONTINUE
+ IF (ZR.LT.0.0D0) GO TO 70
+ C-----------------------------------------------------------------------
+ C RIGHT HALF PLANE COMPUTATION, REAL(Z).GE.0.
+ C-----------------------------------------------------------------------
+ CALL ZBKNU(ZR, ZI, FNU, KODE, NN, CYR, CYI, NW, TOL, ELIM, ALIM)
+ IF (NW.LT.0) GO TO 200
+ NZ=NW
+ RETURN
+ C-----------------------------------------------------------------------
+ C LEFT HALF PLANE COMPUTATION
+ C PI/2.LT.ARG(Z).LE.PI AND -PI.LT.ARG(Z).LT.-PI/2.
+ C-----------------------------------------------------------------------
+ 70 CONTINUE
+ IF (NZ.NE.0) GO TO 180
+ MR = 1
+ IF (ZI.LT.0.0D0) MR = -1
+ CALL ZACON(ZR, ZI, FNU, KODE, MR, NN, CYR, CYI, NW, RL, FNUL,
+ * TOL, ELIM, ALIM)
+ IF (NW.LT.0) GO TO 200
+ NZ=NW
+ RETURN
+ C-----------------------------------------------------------------------
+ C UNIFORM ASYMPTOTIC EXPANSIONS FOR FNU.GT.FNUL
+ C-----------------------------------------------------------------------
+ 80 CONTINUE
+ MR = 0
+ IF (ZR.GE.0.0D0) GO TO 90
+ MR = 1
+ IF (ZI.LT.0.0D0) MR = -1
+ 90 CONTINUE
+ CALL ZBUNK(ZR, ZI, FNU, KODE, MR, NN, CYR, CYI, NW, TOL, ELIM,
+ * ALIM)
+ IF (NW.LT.0) GO TO 200
+ NZ = NZ + NW
+ RETURN
+ 100 CONTINUE
+ IF (ZR.LT.0.0D0) GO TO 180
+ RETURN
+ 180 CONTINUE
+ NZ = 0
+ IERR=2
+ RETURN
+ 200 CONTINUE
+ IF(NW.EQ.(-1)) GO TO 180
+ NZ=0
+ IERR=5
+ RETURN
+ 260 CONTINUE
+ NZ=0
+ IERR=4
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbesy.f octave-2.0.14/libcruft/amos/zbesy.f
*** octave-2.0.13/libcruft/amos/zbesy.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbesy.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,244 ----
+ SUBROUTINE ZBESY(ZR, ZI, FNU, KODE, N, CYR, CYI, NZ, CWRKR, CWRKI,
+ * IERR)
+ C***BEGIN PROLOGUE ZBESY
+ C***DATE WRITTEN 830501 (YYMMDD)
+ C***REVISION DATE 890801 (YYMMDD)
+ C***CATEGORY NO. B5K
+ C***KEYWORDS Y-BESSEL FUNCTION,BESSEL FUNCTION OF COMPLEX ARGUMENT,
+ C BESSEL FUNCTION OF SECOND KIND
+ C***AUTHOR AMOS, DONALD E., SANDIA NATIONAL LABORATORIES
+ C***PURPOSE TO COMPUTE THE Y-BESSEL FUNCTION OF A COMPLEX ARGUMENT
+ C***DESCRIPTION
+ C
+ C ***A DOUBLE PRECISION ROUTINE***
+ C
+ C ON KODE=1, CBESY COMPUTES AN N MEMBER SEQUENCE OF COMPLEX
+ C BESSEL FUNCTIONS CY(I)=Y(FNU+I-1,Z) FOR REAL, NONNEGATIVE
+ C ORDERS FNU+I-1, I=1,...,N AND COMPLEX Z IN THE CUT PLANE
+ C -PI.LT.ARG(Z).LE.PI. ON KODE=2, CBESY RETURNS THE SCALED
+ C FUNCTIONS
+ C
+ C CY(I)=EXP(-ABS(Y))*Y(FNU+I-1,Z) I = 1,...,N , Y=AIMAG(Z)
+ C
+ C WHICH REMOVE THE EXPONENTIAL GROWTH IN BOTH THE UPPER AND
+ C LOWER HALF PLANES FOR Z TO INFINITY. DEFINITIONS AND NOTATION
+ C ARE FOUND IN THE NBS HANDBOOK OF MATHEMATICAL FUNCTIONS
+ C (REF. 1).
+ C
+ C INPUT ZR,ZI,FNU ARE DOUBLE PRECISION
+ C ZR,ZI - Z=CMPLX(ZR,ZI), Z.NE.CMPLX(0.0D0,0.0D0),
+ C -PI.LT.ARG(Z).LE.PI
+ C FNU - ORDER OF INITIAL Y FUNCTION, FNU.GE.0.0D0
+ C KODE - A PARAMETER TO INDICATE THE SCALING OPTION
+ C KODE= 1 RETURNS
+ C CY(I)=Y(FNU+I-1,Z), I=1,...,N
+ C = 2 RETURNS
+ C CY(I)=Y(FNU+I-1,Z)*EXP(-ABS(Y)), I=1,...,N
+ C WHERE Y=AIMAG(Z)
+ C N - NUMBER OF MEMBERS OF THE SEQUENCE, N.GE.1
+ C CWRKR, - DOUBLE PRECISION WORK VECTORS OF DIMENSION AT
+ C CWRKI AT LEAST N
+ C
+ C OUTPUT CYR,CYI ARE DOUBLE PRECISION
+ C CYR,CYI- DOUBLE PRECISION VECTORS WHOSE FIRST N COMPONENTS
+ C CONTAIN REAL AND IMAGINARY PARTS FOR THE SEQUENCE
+ C CY(I)=Y(FNU+I-1,Z) OR
+ C CY(I)=Y(FNU+I-1,Z)*EXP(-ABS(Y)) I=1,...,N
+ C DEPENDING ON KODE.
+ C NZ - NZ=0 , A NORMAL RETURN
+ C NZ.GT.0 , NZ COMPONENTS OF CY SET TO ZERO DUE TO
+ C UNDERFLOW (GENERALLY ON KODE=2)
+ C IERR - ERROR FLAG
+ C IERR=0, NORMAL RETURN - COMPUTATION COMPLETED
+ C IERR=1, INPUT ERROR - NO COMPUTATION
+ C IERR=2, OVERFLOW - NO COMPUTATION, FNU IS
+ C TOO LARGE OR CABS(Z) IS TOO SMALL OR BOTH
+ C IERR=3, CABS(Z) OR FNU+N-1 LARGE - COMPUTATION DONE
+ C BUT LOSSES OF SIGNIFCANCE BY ARGUMENT
+ C REDUCTION PRODUCE LESS THAN HALF OF MACHINE
+ C ACCURACY
+ C IERR=4, CABS(Z) OR FNU+N-1 TOO LARGE - NO COMPUTA-
+ C TION BECAUSE OF COMPLETE LOSSES OF SIGNIFI-
+ C CANCE BY ARGUMENT REDUCTION
+ C IERR=5, ERROR - NO COMPUTATION,
+ C ALGORITHM TERMINATION CONDITION NOT MET
+ C
+ C***LONG DESCRIPTION
+ C
+ C THE COMPUTATION IS CARRIED OUT BY THE FORMULA
+ C
+ C Y(FNU,Z)=0.5*(H(1,FNU,Z)-H(2,FNU,Z))/I
+ C
+ C WHERE I**2 = -1 AND THE HANKEL BESSEL FUNCTIONS H(1,FNU,Z)
+ C AND H(2,FNU,Z) ARE CALCULATED IN CBESH.
+ C
+ C FOR NEGATIVE ORDERS,THE FORMULA
+ C
+ C Y(-FNU,Z) = Y(FNU,Z)*COS(PI*FNU) + J(FNU,Z)*SIN(PI*FNU)
+ C
+ C CAN BE USED. HOWEVER,FOR LARGE ORDERS CLOSE TO HALF ODD
+ C INTEGERS THE FUNCTION CHANGES RADICALLY. WHEN FNU IS A LARGE
+ C POSITIVE HALF ODD INTEGER,THE MAGNITUDE OF Y(-FNU,Z)=J(FNU,Z)*
+ C SIN(PI*FNU) IS A LARGE NEGATIVE POWER OF TEN. BUT WHEN FNU IS
+ C NOT A HALF ODD INTEGER, Y(FNU,Z) DOMINATES IN MAGNITUDE WITH A
+ C LARGE POSITIVE POWER OF TEN AND THE MOST THAT THE SECOND TERM
+ C CAN BE REDUCED IS BY UNIT ROUNDOFF FROM THE COEFFICIENT. THUS,
+ C WIDE CHANGES CAN OCCUR WITHIN UNIT ROUNDOFF OF A LARGE HALF
+ C ODD INTEGER. HERE, LARGE MEANS FNU.GT.CABS(Z).
+ C
+ C IN MOST COMPLEX VARIABLE COMPUTATION, ONE MUST EVALUATE ELE-
+ C MENTARY FUNCTIONS. WHEN THE MAGNITUDE OF Z OR FNU+N-1 IS
+ C LARGE, LOSSES OF SIGNIFICANCE BY ARGUMENT REDUCTION OCCUR.
+ C CONSEQUENTLY, IF EITHER ONE EXCEEDS U1=SQRT(0.5/UR), THEN
+ C LOSSES EXCEEDING HALF PRECISION ARE LIKELY AND AN ERROR FLAG
+ C IERR=3 IS TRIGGERED WHERE UR=DMAX1(D1MACH(4),1.0D-18) IS
+ C DOUBLE PRECISION UNIT ROUNDOFF LIMITED TO 18 DIGITS PRECISION.
+ C IF EITHER IS LARGER THAN U2=0.5/UR, THEN ALL SIGNIFICANCE IS
+ C LOST AND IERR=4. IN ORDER TO USE THE INT FUNCTION, ARGUMENTS
+ C MUST BE FURTHER RESTRICTED NOT TO EXCEED THE LARGEST MACHINE
+ C INTEGER, U3=I1MACH(9). THUS, THE MAGNITUDE OF Z AND FNU+N-1 IS
+ C RESTRICTED BY MIN(U2,U3). ON 32 BIT MACHINES, U1,U2, AND U3
+ C ARE APPROXIMATELY 2.0E+3, 4.2E+6, 2.1E+9 IN SINGLE PRECISION
+ C ARITHMETIC AND 1.3E+8, 1.8E+16, 2.1E+9 IN DOUBLE PRECISION
+ C ARITHMETIC RESPECTIVELY. THIS MAKES U2 AND U3 LIMITING IN
+ C THEIR RESPECTIVE ARITHMETICS. THIS MEANS THAT ONE CAN EXPECT
+ C TO RETAIN, IN THE WORST CASES ON 32 BIT MACHINES, NO DIGITS
+ C IN SINGLE AND ONLY 7 DIGITS IN DOUBLE PRECISION ARITHMETIC.
+ C SIMILAR CONSIDERATIONS HOLD FOR OTHER MACHINES.
+ C
+ C THE APPROXIMATE RELATIVE ERROR IN THE MAGNITUDE OF A COMPLEX
+ C BESSEL FUNCTION CAN BE EXPRESSED BY P*10**S WHERE P=MAX(UNIT
+ C ROUNDOFF,1.0E-18) IS THE NOMINAL PRECISION AND 10**S REPRE-
+ C SENTS THE INCREASE IN ERROR DUE TO ARGUMENT REDUCTION IN THE
+ C ELEMENTARY FUNCTIONS. HERE, S=MAX(1,ABS(LOG10(CABS(Z))),
+ C ABS(LOG10(FNU))) APPROXIMATELY (I.E. S=MAX(1,ABS(EXPONENT OF
+ C CABS(Z),ABS(EXPONENT OF FNU)) ). HOWEVER, THE PHASE ANGLE MAY
+ C HAVE ONLY ABSOLUTE ACCURACY. THIS IS MOST LIKELY TO OCCUR WHEN
+ C ONE COMPONENT (IN ABSOLUTE VALUE) IS LARGER THAN THE OTHER BY
+ C SEVERAL ORDERS OF MAGNITUDE. IF ONE COMPONENT IS 10**K LARGER
+ C THAN THE OTHER, THEN ONE CAN EXPECT ONLY MAX(ABS(LOG10(P))-K,
+ C 0) SIGNIFICANT DIGITS; OR, STATED ANOTHER WAY, WHEN K EXCEEDS
+ C THE EXPONENT OF P, NO SIGNIFICANT DIGITS REMAIN IN THE SMALLER
+ C COMPONENT. HOWEVER, THE PHASE ANGLE RETAINS ABSOLUTE ACCURACY
+ C BECAUSE, IN COMPLEX ARITHMETIC WITH PRECISION P, THE SMALLER
+ C COMPONENT WILL NOT (AS A RULE) DECREASE BELOW P TIMES THE
+ C MAGNITUDE OF THE LARGER COMPONENT. IN THESE EXTREME CASES,
+ C THE PRINCIPAL PHASE ANGLE IS ON THE ORDER OF +P, -P, PI/2-P,
+ C OR -PI/2+P.
+ C
+ C***REFERENCES HANDBOOK OF MATHEMATICAL FUNCTIONS BY M. ABRAMOWITZ
+ C AND I. A. STEGUN, NBS AMS SERIES 55, U.S. DEPT. OF
+ C COMMERCE, 1955.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C BY D. E. AMOS, SAND83-0083, MAY, 1983.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C AND LARGE ORDER BY D. E. AMOS, SAND83-0643, MAY, 1983
+ C
+ C A SUBROUTINE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, SAND85-
+ C 1018, MAY, 1985
+ C
+ C A PORTABLE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, TRANS.
+ C MATH. SOFTWARE, 1986
+ C
+ C***ROUTINES CALLED ZBESH,I1MACH,D1MACH
+ C***END PROLOGUE ZBESY
+ C
+ C COMPLEX CWRK,CY,C1,C2,EX,HCI,Z,ZU,ZV
+ DOUBLE PRECISION CWRKI, CWRKR, CYI, CYR, C1I, C1R, C2I, C2R,
+ * ELIM, EXI, EXR, EY, FNU, HCII, STI, STR, TAY, ZI, ZR, DEXP,
+ * D1MACH, ASCLE, RTOL, ATOL, AA, BB, TOL
+ INTEGER I, IERR, K, KODE, K1, K2, N, NZ, NZ1, NZ2, I1MACH
+ DIMENSION CYR(N), CYI(N), CWRKR(N), CWRKI(N)
+ C***FIRST EXECUTABLE STATEMENT ZBESY
+ IERR = 0
+ NZ=0
+ IF (ZR.EQ.0.0D0 .AND. ZI.EQ.0.0D0) IERR=1
+ IF (FNU.LT.0.0D0) IERR=1
+ IF (KODE.LT.1 .OR. KODE.GT.2) IERR=1
+ IF (N.LT.1) IERR=1
+ IF (IERR.NE.0) RETURN
+ HCII = 0.5D0
+ CALL ZBESH(ZR, ZI, FNU, KODE, 1, N, CYR, CYI, NZ1, IERR)
+ IF (IERR.NE.0.AND.IERR.NE.3) GO TO 170
+ CALL ZBESH(ZR, ZI, FNU, KODE, 2, N, CWRKR, CWRKI, NZ2, IERR)
+ IF (IERR.NE.0.AND.IERR.NE.3) GO TO 170
+ NZ = MIN0(NZ1,NZ2)
+ IF (KODE.EQ.2) GO TO 60
+ DO 50 I=1,N
+ STR = CWRKR(I) - CYR(I)
+ STI = CWRKI(I) - CYI(I)
+ CYR(I) = -STI*HCII
+ CYI(I) = STR*HCII
+ 50 CONTINUE
+ RETURN
+ 60 CONTINUE
+ TOL = DMAX1(D1MACH(4),1.0D-18)
+ K1 = I1MACH(15)
+ K2 = I1MACH(16)
+ K = MIN0(IABS(K1),IABS(K2))
+ R1M5 = D1MACH(5)
+ C-----------------------------------------------------------------------
+ C ELIM IS THE APPROXIMATE EXPONENTIAL UNDER- AND OVERFLOW LIMIT
+ C-----------------------------------------------------------------------
+ ELIM = 2.303D0*(DBLE(FLOAT(K))*R1M5-3.0D0)
+ EXR = DCOS(ZR)
+ EXI = DSIN(ZR)
+ EY = 0.0D0
+ TAY = DABS(ZI+ZI)
+ IF (TAY.LT.ELIM) EY = DEXP(-TAY)
+ IF (ZI.LT.0.0D0) GO TO 90
+ C1R = EXR*EY
+ C1I = EXI*EY
+ C2R = EXR
+ C2I = -EXI
+ 70 CONTINUE
+ NZ = 0
+ RTOL = 1.0D0/TOL
+ ASCLE = D1MACH(1)*RTOL*1.0D+3
+ DO 80 I=1,N
+ C STR = C1R*CYR(I) - C1I*CYI(I)
+ C STI = C1R*CYI(I) + C1I*CYR(I)
+ C STR = -STR + C2R*CWRKR(I) - C2I*CWRKI(I)
+ C STI = -STI + C2R*CWRKI(I) + C2I*CWRKR(I)
+ C CYR(I) = -STI*HCII
+ C CYI(I) = STR*HCII
+ AA = CWRKR(I)
+ BB = CWRKI(I)
+ ATOL = 1.0D0
+ IF (DMAX1(DABS(AA),DABS(BB)).GT.ASCLE) GO TO 75
+ AA = AA*RTOL
+ BB = BB*RTOL
+ ATOL = TOL
+ 75 CONTINUE
+ STR = (AA*C2R - BB*C2I)*ATOL
+ STI = (AA*C2I + BB*C2R)*ATOL
+ AA = CYR(I)
+ BB = CYI(I)
+ ATOL = 1.0D0
+ IF (DMAX1(DABS(AA),DABS(BB)).GT.ASCLE) GO TO 85
+ AA = AA*RTOL
+ BB = BB*RTOL
+ ATOL = TOL
+ 85 CONTINUE
+ STR = STR - (AA*C1R - BB*C1I)*ATOL
+ STI = STI - (AA*C1I + BB*C1R)*ATOL
+ CYR(I) = -STI*HCII
+ CYI(I) = STR*HCII
+ IF (STR.EQ.0.0D0 .AND. STI.EQ.0.0D0 .AND. EY.EQ.0.0D0) NZ = NZ
+ * + 1
+ 80 CONTINUE
+ RETURN
+ 90 CONTINUE
+ C1R = EXR
+ C1I = EXI
+ C2R = EXR*EY
+ C2I = -EXI*EY
+ GO TO 70
+ 170 CONTINUE
+ NZ = 0
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbinu.f octave-2.0.14/libcruft/amos/zbinu.f
*** octave-2.0.13/libcruft/amos/zbinu.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbinu.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,110 ----
+ SUBROUTINE ZBINU(ZR, ZI, FNU, KODE, N, CYR, CYI, NZ, RL, FNUL,
+ * TOL, ELIM, ALIM)
+ C***BEGIN PROLOGUE ZBINU
+ C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZAIRY,ZBIRY
+ C
+ C ZBINU COMPUTES THE I FUNCTION IN THE RIGHT HALF Z PLANE
+ C
+ C***ROUTINES CALLED XZABS,ZASYI,ZBUNI,ZMLRI,ZSERI,ZUOIK,ZWRSK
+ C***END PROLOGUE ZBINU
+ DOUBLE PRECISION ALIM, AZ, CWI, CWR, CYI, CYR, DFNU, ELIM, FNU,
+ * FNUL, RL, TOL, ZEROI, ZEROR, ZI, ZR, XZABS
+ INTEGER I, INW, KODE, N, NLAST, NN, NUI, NW, NZ
+ DIMENSION CYR(N), CYI(N), CWR(2), CWI(2)
+ DATA ZEROR,ZEROI / 0.0D0, 0.0D0 /
+ C
+ NZ = 0
+ AZ = XZABS(ZR,ZI)
+ NN = N
+ DFNU = FNU + DBLE(FLOAT(N-1))
+ IF (AZ.LE.2.0D0) GO TO 10
+ IF (AZ*AZ*0.25D0.GT.DFNU+1.0D0) GO TO 20
+ 10 CONTINUE
+ C-----------------------------------------------------------------------
+ C POWER SERIES
+ C-----------------------------------------------------------------------
+ CALL ZSERI(ZR, ZI, FNU, KODE, NN, CYR, CYI, NW, TOL, ELIM, ALIM)
+ INW = IABS(NW)
+ NZ = NZ + INW
+ NN = NN - INW
+ IF (NN.EQ.0) RETURN
+ IF (NW.GE.0) GO TO 120
+ DFNU = FNU + DBLE(FLOAT(NN-1))
+ 20 CONTINUE
+ IF (AZ.LT.RL) GO TO 40
+ IF (DFNU.LE.1.0D0) GO TO 30
+ IF (AZ+AZ.LT.DFNU*DFNU) GO TO 50
+ C-----------------------------------------------------------------------
+ C ASYMPTOTIC EXPANSION FOR LARGE Z
+ C-----------------------------------------------------------------------
+ 30 CONTINUE
+ CALL ZASYI(ZR, ZI, FNU, KODE, NN, CYR, CYI, NW, RL, TOL, ELIM,
+ * ALIM)
+ IF (NW.LT.0) GO TO 130
+ GO TO 120
+ 40 CONTINUE
+ IF (DFNU.LE.1.0D0) GO TO 70
+ 50 CONTINUE
+ C-----------------------------------------------------------------------
+ C OVERFLOW AND UNDERFLOW TEST ON I SEQUENCE FOR MILLER ALGORITHM
+ C-----------------------------------------------------------------------
+ CALL ZUOIK(ZR, ZI, FNU, KODE, 1, NN, CYR, CYI, NW, TOL, ELIM,
+ * ALIM)
+ IF (NW.LT.0) GO TO 130
+ NZ = NZ + NW
+ NN = NN - NW
+ IF (NN.EQ.0) RETURN
+ DFNU = FNU+DBLE(FLOAT(NN-1))
+ IF (DFNU.GT.FNUL) GO TO 110
+ IF (AZ.GT.FNUL) GO TO 110
+ 60 CONTINUE
+ IF (AZ.GT.RL) GO TO 80
+ 70 CONTINUE
+ C-----------------------------------------------------------------------
+ C MILLER ALGORITHM NORMALIZED BY THE SERIES
+ C-----------------------------------------------------------------------
+ CALL ZMLRI(ZR, ZI, FNU, KODE, NN, CYR, CYI, NW, TOL)
+ IF(NW.LT.0) GO TO 130
+ GO TO 120
+ 80 CONTINUE
+ C-----------------------------------------------------------------------
+ C MILLER ALGORITHM NORMALIZED BY THE WRONSKIAN
+ C-----------------------------------------------------------------------
+ C-----------------------------------------------------------------------
+ C OVERFLOW TEST ON K FUNCTIONS USED IN WRONSKIAN
+ C-----------------------------------------------------------------------
+ CALL ZUOIK(ZR, ZI, FNU, KODE, 2, 2, CWR, CWI, NW, TOL, ELIM,
+ * ALIM)
+ IF (NW.GE.0) GO TO 100
+ NZ = NN
+ DO 90 I=1,NN
+ CYR(I) = ZEROR
+ CYI(I) = ZEROI
+ 90 CONTINUE
+ RETURN
+ 100 CONTINUE
+ IF (NW.GT.0) GO TO 130
+ CALL ZWRSK(ZR, ZI, FNU, KODE, NN, CYR, CYI, NW, CWR, CWI, TOL,
+ * ELIM, ALIM)
+ IF (NW.LT.0) GO TO 130
+ GO TO 120
+ 110 CONTINUE
+ C-----------------------------------------------------------------------
+ C INCREMENT FNU+NN-1 UP TO FNUL, COMPUTE AND RECUR BACKWARD
+ C-----------------------------------------------------------------------
+ NUI = INT(SNGL(FNUL-DFNU)) + 1
+ NUI = MAX0(NUI,0)
+ CALL ZBUNI(ZR, ZI, FNU, KODE, NN, CYR, CYI, NW, NUI, NLAST, FNUL,
+ * TOL, ELIM, ALIM)
+ IF (NW.LT.0) GO TO 130
+ NZ = NZ + NW
+ IF (NLAST.EQ.0) GO TO 120
+ NN = NLAST
+ GO TO 60
+ 120 CONTINUE
+ RETURN
+ 130 CONTINUE
+ NZ = -1
+ IF(NW.EQ.(-2)) NZ=-2
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbiry.f octave-2.0.14/libcruft/amos/zbiry.f
*** octave-2.0.13/libcruft/amos/zbiry.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbiry.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,364 ----
+ SUBROUTINE ZBIRY(ZR, ZI, ID, KODE, BIR, BII, IERR)
+ C***BEGIN PROLOGUE ZBIRY
+ C***DATE WRITTEN 830501 (YYMMDD)
+ C***REVISION DATE 890801 (YYMMDD)
+ C***CATEGORY NO. B5K
+ C***KEYWORDS AIRY FUNCTION,BESSEL FUNCTIONS OF ORDER ONE THIRD
+ C***AUTHOR AMOS, DONALD E., SANDIA NATIONAL LABORATORIES
+ C***PURPOSE TO COMPUTE AIRY FUNCTIONS BI(Z) AND DBI(Z) FOR COMPLEX Z
+ C***DESCRIPTION
+ C
+ C ***A DOUBLE PRECISION ROUTINE***
+ C ON KODE=1, CBIRY COMPUTES THE COMPLEX AIRY FUNCTION BI(Z) OR
+ C ITS DERIVATIVE DBI(Z)/DZ ON ID=0 OR ID=1 RESPECTIVELY. ON
+ C KODE=2, A SCALING OPTION CEXP(-AXZTA)*BI(Z) OR CEXP(-AXZTA)*
+ C DBI(Z)/DZ IS PROVIDED TO REMOVE THE EXPONENTIAL BEHAVIOR IN
+ C BOTH THE LEFT AND RIGHT HALF PLANES WHERE
+ C ZTA=(2/3)*Z*CSQRT(Z)=CMPLX(XZTA,YZTA) AND AXZTA=ABS(XZTA).
+ C DEFINTIONS AND NOTATION ARE FOUND IN THE NBS HANDBOOK OF
+ C MATHEMATICAL FUNCTIONS (REF. 1).
+ C
+ C INPUT ZR,ZI ARE DOUBLE PRECISION
+ C ZR,ZI - Z=CMPLX(ZR,ZI)
+ C ID - ORDER OF DERIVATIVE, ID=0 OR ID=1
+ C KODE - A PARAMETER TO INDICATE THE SCALING OPTION
+ C KODE= 1 RETURNS
+ C BI=BI(Z) ON ID=0 OR
+ C BI=DBI(Z)/DZ ON ID=1
+ C = 2 RETURNS
+ C BI=CEXP(-AXZTA)*BI(Z) ON ID=0 OR
+ C BI=CEXP(-AXZTA)*DBI(Z)/DZ ON ID=1 WHERE
+ C ZTA=(2/3)*Z*CSQRT(Z)=CMPLX(XZTA,YZTA)
+ C AND AXZTA=ABS(XZTA)
+ C
+ C OUTPUT BIR,BII ARE DOUBLE PRECISION
+ C BIR,BII- COMPLEX ANSWER DEPENDING ON THE CHOICES FOR ID AND
+ C KODE
+ C IERR - ERROR FLAG
+ C IERR=0, NORMAL RETURN - COMPUTATION COMPLETED
+ C IERR=1, INPUT ERROR - NO COMPUTATION
+ C IERR=2, OVERFLOW - NO COMPUTATION, REAL(Z)
+ C TOO LARGE ON KODE=1
+ C IERR=3, CABS(Z) LARGE - COMPUTATION COMPLETED
+ C LOSSES OF SIGNIFCANCE BY ARGUMENT REDUCTION
+ C PRODUCE LESS THAN HALF OF MACHINE ACCURACY
+ C IERR=4, CABS(Z) TOO LARGE - NO COMPUTATION
+ C COMPLETE LOSS OF ACCURACY BY ARGUMENT
+ C REDUCTION
+ C IERR=5, ERROR - NO COMPUTATION,
+ C ALGORITHM TERMINATION CONDITION NOT MET
+ C
+ C***LONG DESCRIPTION
+ C
+ C BI AND DBI ARE COMPUTED FOR CABS(Z).GT.1.0 FROM THE I BESSEL
+ C FUNCTIONS BY
+ C
+ C BI(Z)=C*SQRT(Z)*( I(-1/3,ZTA) + I(1/3,ZTA) )
+ C DBI(Z)=C * Z * ( I(-2/3,ZTA) + I(2/3,ZTA) )
+ C C=1.0/SQRT(3.0)
+ C ZTA=(2/3)*Z**(3/2)
+ C
+ C WITH THE POWER SERIES FOR CABS(Z).LE.1.0.
+ C
+ C IN MOST COMPLEX VARIABLE COMPUTATION, ONE MUST EVALUATE ELE-
+ C MENTARY FUNCTIONS. WHEN THE MAGNITUDE OF Z IS LARGE, LOSSES
+ C OF SIGNIFICANCE BY ARGUMENT REDUCTION OCCUR. CONSEQUENTLY, IF
+ C THE MAGNITUDE OF ZETA=(2/3)*Z**1.5 EXCEEDS U1=SQRT(0.5/UR),
+ C THEN LOSSES EXCEEDING HALF PRECISION ARE LIKELY AND AN ERROR
+ C FLAG IERR=3 IS TRIGGERED WHERE UR=DMAX1(D1MACH(4),1.0D-18) IS
+ C DOUBLE PRECISION UNIT ROUNDOFF LIMITED TO 18 DIGITS PRECISION.
+ C ALSO, IF THE MAGNITUDE OF ZETA IS LARGER THAN U2=0.5/UR, THEN
+ C ALL SIGNIFICANCE IS LOST AND IERR=4. IN ORDER TO USE THE INT
+ C FUNCTION, ZETA MUST BE FURTHER RESTRICTED NOT TO EXCEED THE
+ C LARGEST INTEGER, U3=I1MACH(9). THUS, THE MAGNITUDE OF ZETA
+ C MUST BE RESTRICTED BY MIN(U2,U3). ON 32 BIT MACHINES, U1,U2,
+ C AND U3 ARE APPROXIMATELY 2.0E+3, 4.2E+6, 2.1E+9 IN SINGLE
+ C PRECISION ARITHMETIC AND 1.3E+8, 1.8E+16, 2.1E+9 IN DOUBLE
+ C PRECISION ARITHMETIC RESPECTIVELY. THIS MAKES U2 AND U3 LIMIT-
+ C ING IN THEIR RESPECTIVE ARITHMETICS. THIS MEANS THAT THE MAG-
+ C NITUDE OF Z CANNOT EXCEED 3.1E+4 IN SINGLE AND 2.1E+6 IN
+ C DOUBLE PRECISION ARITHMETIC. THIS ALSO MEANS THAT ONE CAN
+ C EXPECT TO RETAIN, IN THE WORST CASES ON 32 BIT MACHINES,
+ C NO DIGITS IN SINGLE PRECISION AND ONLY 7 DIGITS IN DOUBLE
+ C PRECISION ARITHMETIC. SIMILAR CONSIDERATIONS HOLD FOR OTHER
+ C MACHINES.
+ C
+ C THE APPROXIMATE RELATIVE ERROR IN THE MAGNITUDE OF A COMPLEX
+ C BESSEL FUNCTION CAN BE EXPRESSED BY P*10**S WHERE P=MAX(UNIT
+ C ROUNDOFF,1.0E-18) IS THE NOMINAL PRECISION AND 10**S REPRE-
+ C SENTS THE INCREASE IN ERROR DUE TO ARGUMENT REDUCTION IN THE
+ C ELEMENTARY FUNCTIONS. HERE, S=MAX(1,ABS(LOG10(CABS(Z))),
+ C ABS(LOG10(FNU))) APPROXIMATELY (I.E. S=MAX(1,ABS(EXPONENT OF
+ C CABS(Z),ABS(EXPONENT OF FNU)) ). HOWEVER, THE PHASE ANGLE MAY
+ C HAVE ONLY ABSOLUTE ACCURACY. THIS IS MOST LIKELY TO OCCUR WHEN
+ C ONE COMPONENT (IN ABSOLUTE VALUE) IS LARGER THAN THE OTHER BY
+ C SEVERAL ORDERS OF MAGNITUDE. IF ONE COMPONENT IS 10**K LARGER
+ C THAN THE OTHER, THEN ONE CAN EXPECT ONLY MAX(ABS(LOG10(P))-K,
+ C 0) SIGNIFICANT DIGITS; OR, STATED ANOTHER WAY, WHEN K EXCEEDS
+ C THE EXPONENT OF P, NO SIGNIFICANT DIGITS REMAIN IN THE SMALLER
+ C COMPONENT. HOWEVER, THE PHASE ANGLE RETAINS ABSOLUTE ACCURACY
+ C BECAUSE, IN COMPLEX ARITHMETIC WITH PRECISION P, THE SMALLER
+ C COMPONENT WILL NOT (AS A RULE) DECREASE BELOW P TIMES THE
+ C MAGNITUDE OF THE LARGER COMPONENT. IN THESE EXTREME CASES,
+ C THE PRINCIPAL PHASE ANGLE IS ON THE ORDER OF +P, -P, PI/2-P,
+ C OR -PI/2+P.
+ C
+ C***REFERENCES HANDBOOK OF MATHEMATICAL FUNCTIONS BY M. ABRAMOWITZ
+ C AND I. A. STEGUN, NBS AMS SERIES 55, U.S. DEPT. OF
+ C COMMERCE, 1955.
+ C
+ C COMPUTATION OF BESSEL FUNCTIONS OF COMPLEX ARGUMENT
+ C AND LARGE ORDER BY D. E. AMOS, SAND83-0643, MAY, 1983
+ C
+ C A SUBROUTINE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, SAND85-
+ C 1018, MAY, 1985
+ C
+ C A PORTABLE PACKAGE FOR BESSEL FUNCTIONS OF A COMPLEX
+ C ARGUMENT AND NONNEGATIVE ORDER BY D. E. AMOS, TRANS.
+ C MATH. SOFTWARE, 1986
+ C
+ C***ROUTINES CALLED ZBINU,XZABS,ZDIV,XZSQRT,D1MACH,I1MACH
+ C***END PROLOGUE ZBIRY
+ C COMPLEX BI,CONE,CSQ,CY,S1,S2,TRM1,TRM2,Z,ZTA,Z3
+ DOUBLE PRECISION AA, AD, AK, ALIM, ATRM, AZ, AZ3, BB, BII, BIR,
+ * BK, CC, CK, COEF, CONEI, CONER, CSQI, CSQR, CYI, CYR, C1, C2,
+ * DIG, DK, D1, D2, EAA, ELIM, FID, FMR, FNU, FNUL, PI, RL, R1M5,
+ * SFAC, STI, STR, S1I, S1R, S2I, S2R, TOL, TRM1I, TRM1R, TRM2I,
+ * TRM2R, TTH, ZI, ZR, ZTAI, ZTAR, Z3I, Z3R, D1MACH, XZABS
+ INTEGER ID, IERR, K, KODE, K1, K2, NZ, I1MACH
+ DIMENSION CYR(2), CYI(2)
+ DATA TTH, C1, C2, COEF, PI /6.66666666666666667D-01,
+ * 6.14926627446000736D-01,4.48288357353826359D-01,
+ * 5.77350269189625765D-01,3.14159265358979324D+00/
+ DATA CONER, CONEI /1.0D0,0.0D0/
+ C***FIRST EXECUTABLE STATEMENT ZBIRY
+ IERR = 0
+ NZ=0
+ IF (ID.LT.0 .OR. ID.GT.1) IERR=1
+ IF (KODE.LT.1 .OR. KODE.GT.2) IERR=1
+ IF (IERR.NE.0) RETURN
+ AZ = XZABS(ZR,ZI)
+ TOL = DMAX1(D1MACH(4),1.0D-18)
+ FID = DBLE(FLOAT(ID))
+ IF (AZ.GT.1.0E0) GO TO 70
+ C-----------------------------------------------------------------------
+ C POWER SERIES FOR CABS(Z).LE.1.
+ C-----------------------------------------------------------------------
+ S1R = CONER
+ S1I = CONEI
+ S2R = CONER
+ S2I = CONEI
+ IF (AZ.LT.TOL) GO TO 130
+ AA = AZ*AZ
+ IF (AA.LT.TOL/AZ) GO TO 40
+ TRM1R = CONER
+ TRM1I = CONEI
+ TRM2R = CONER
+ TRM2I = CONEI
+ ATRM = 1.0D0
+ STR = ZR*ZR - ZI*ZI
+ STI = ZR*ZI + ZI*ZR
+ Z3R = STR*ZR - STI*ZI
+ Z3I = STR*ZI + STI*ZR
+ AZ3 = AZ*AA
+ AK = 2.0D0 + FID
+ BK = 3.0D0 - FID - FID
+ CK = 4.0D0 - FID
+ DK = 3.0D0 + FID + FID
+ D1 = AK*DK
+ D2 = BK*CK
+ AD = DMIN1(D1,D2)
+ AK = 24.0D0 + 9.0D0*FID
+ BK = 30.0D0 - 9.0D0*FID
+ DO 30 K=1,25
+ STR = (TRM1R*Z3R-TRM1I*Z3I)/D1
+ TRM1I = (TRM1R*Z3I+TRM1I*Z3R)/D1
+ TRM1R = STR
+ S1R = S1R + TRM1R
+ S1I = S1I + TRM1I
+ STR = (TRM2R*Z3R-TRM2I*Z3I)/D2
+ TRM2I = (TRM2R*Z3I+TRM2I*Z3R)/D2
+ TRM2R = STR
+ S2R = S2R + TRM2R
+ S2I = S2I + TRM2I
+ ATRM = ATRM*AZ3/AD
+ D1 = D1 + AK
+ D2 = D2 + BK
+ AD = DMIN1(D1,D2)
+ IF (ATRM.LT.TOL*AD) GO TO 40
+ AK = AK + 18.0D0
+ BK = BK + 18.0D0
+ 30 CONTINUE
+ 40 CONTINUE
+ IF (ID.EQ.1) GO TO 50
+ BIR = C1*S1R + C2*(ZR*S2R-ZI*S2I)
+ BII = C1*S1I + C2*(ZR*S2I+ZI*S2R)
+ IF (KODE.EQ.1) RETURN
+ CALL XZSQRT(ZR, ZI, STR, STI)
+ ZTAR = TTH*(ZR*STR-ZI*STI)
+ ZTAI = TTH*(ZR*STI+ZI*STR)
+ AA = ZTAR
+ AA = -DABS(AA)
+ EAA = DEXP(AA)
+ BIR = BIR*EAA
+ BII = BII*EAA
+ RETURN
+ 50 CONTINUE
+ BIR = S2R*C2
+ BII = S2I*C2
+ IF (AZ.LE.TOL) GO TO 60
+ CC = C1/(1.0D0+FID)
+ STR = S1R*ZR - S1I*ZI
+ STI = S1R*ZI + S1I*ZR
+ BIR = BIR + CC*(STR*ZR-STI*ZI)
+ BII = BII + CC*(STR*ZI+STI*ZR)
+ 60 CONTINUE
+ IF (KODE.EQ.1) RETURN
+ CALL XZSQRT(ZR, ZI, STR, STI)
+ ZTAR = TTH*(ZR*STR-ZI*STI)
+ ZTAI = TTH*(ZR*STI+ZI*STR)
+ AA = ZTAR
+ AA = -DABS(AA)
+ EAA = DEXP(AA)
+ BIR = BIR*EAA
+ BII = BII*EAA
+ RETURN
+ C-----------------------------------------------------------------------
+ C CASE FOR CABS(Z).GT.1.0
+ C-----------------------------------------------------------------------
+ 70 CONTINUE
+ FNU = (1.0D0+FID)/3.0D0
+ C-----------------------------------------------------------------------
+ C SET PARAMETERS RELATED TO MACHINE CONSTANTS.
+ C TOL IS THE APPROXIMATE UNIT ROUNDOFF LIMITED TO 1.0E-18.
+ C ELIM IS THE APPROXIMATE EXPONENTIAL OVER- AND UNDERFLOW LIMIT.
+ C EXP(-ELIM).LT.EXP(-ALIM)=EXP(-ELIM)/TOL AND
+ C EXP(ELIM).GT.EXP(ALIM)=EXP(ELIM)*TOL ARE INTERVALS NEAR
+ C UNDERFLOW AND OVERFLOW LIMITS WHERE SCALED ARITHMETIC IS DONE.
+ C RL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC EXPANSION FOR LARGE Z.
+ C DIG = NUMBER OF BASE 10 DIGITS IN TOL = 10**(-DIG).
+ C FNUL IS THE LOWER BOUNDARY OF THE ASYMPTOTIC SERIES FOR LARGE FNU.
+ C-----------------------------------------------------------------------
+ K1 = I1MACH(15)
+ K2 = I1MACH(16)
+ R1M5 = D1MACH(5)
+ K = MIN0(IABS(K1),IABS(K2))
+ ELIM = 2.303D0*(DBLE(FLOAT(K))*R1M5-3.0D0)
+ K1 = I1MACH(14) - 1
+ AA = R1M5*DBLE(FLOAT(K1))
+ DIG = DMIN1(AA,18.0D0)
+ AA = AA*2.303D0
+ ALIM = ELIM + DMAX1(-AA,-41.45D0)
+ RL = 1.2D0*DIG + 3.0D0
+ FNUL = 10.0D0 + 6.0D0*(DIG-3.0D0)
+ C-----------------------------------------------------------------------
+ C TEST FOR RANGE
+ C-----------------------------------------------------------------------
+ AA=0.5D0/TOL
+ BB=DBLE(FLOAT(I1MACH(9)))*0.5D0
+ AA=DMIN1(AA,BB)
+ AA=AA**TTH
+ IF (AZ.GT.AA) GO TO 260
+ AA=DSQRT(AA)
+ IF (AZ.GT.AA) IERR=3
+ CALL XZSQRT(ZR, ZI, CSQR, CSQI)
+ ZTAR = TTH*(ZR*CSQR-ZI*CSQI)
+ ZTAI = TTH*(ZR*CSQI+ZI*CSQR)
+ C-----------------------------------------------------------------------
+ C RE(ZTA).LE.0 WHEN RE(Z).LT.0, ESPECIALLY WHEN IM(Z) IS SMALL
+ C-----------------------------------------------------------------------
+ SFAC = 1.0D0
+ AK = ZTAI
+ IF (ZR.GE.0.0D0) GO TO 80
+ BK = ZTAR
+ CK = -DABS(BK)
+ ZTAR = CK
+ ZTAI = AK
+ 80 CONTINUE
+ IF (ZI.NE.0.0D0 .OR. ZR.GT.0.0D0) GO TO 90
+ ZTAR = 0.0D0
+ ZTAI = AK
+ 90 CONTINUE
+ AA = ZTAR
+ IF (KODE.EQ.2) GO TO 100
+ C-----------------------------------------------------------------------
+ C OVERFLOW TEST
+ C-----------------------------------------------------------------------
+ BB = DABS(AA)
+ IF (BB.LT.ALIM) GO TO 100
+ BB = BB + 0.25D0*DLOG(AZ)
+ SFAC = TOL
+ IF (BB.GT.ELIM) GO TO 190
+ 100 CONTINUE
+ FMR = 0.0D0
+ IF (AA.GE.0.0D0 .AND. ZR.GT.0.0D0) GO TO 110
+ FMR = PI
+ IF (ZI.LT.0.0D0) FMR = -PI
+ ZTAR = -ZTAR
+ ZTAI = -ZTAI
+ 110 CONTINUE
+ C-----------------------------------------------------------------------
+ C AA=FACTOR FOR ANALYTIC CONTINUATION OF I(FNU,ZTA)
+ C KODE=2 RETURNS EXP(-ABS(XZTA))*I(FNU,ZTA) FROM CBESI
+ C-----------------------------------------------------------------------
+ CALL ZBINU(ZTAR, ZTAI, FNU, KODE, 1, CYR, CYI, NZ, RL, FNUL, TOL,
+ * ELIM, ALIM)
+ IF (NZ.LT.0) GO TO 200
+ AA = FMR*FNU
+ Z3R = SFAC
+ STR = DCOS(AA)
+ STI = DSIN(AA)
+ S1R = (STR*CYR(1)-STI*CYI(1))*Z3R
+ S1I = (STR*CYI(1)+STI*CYR(1))*Z3R
+ FNU = (2.0D0-FID)/3.0D0
+ CALL ZBINU(ZTAR, ZTAI, FNU, KODE, 2, CYR, CYI, NZ, RL, FNUL, TOL,
+ * ELIM, ALIM)
+ CYR(1) = CYR(1)*Z3R
+ CYI(1) = CYI(1)*Z3R
+ CYR(2) = CYR(2)*Z3R
+ CYI(2) = CYI(2)*Z3R
+ C-----------------------------------------------------------------------
+ C BACKWARD RECUR ONE STEP FOR ORDERS -1/3 OR -2/3
+ C-----------------------------------------------------------------------
+ CALL ZDIV(CYR(1), CYI(1), ZTAR, ZTAI, STR, STI)
+ S2R = (FNU+FNU)*STR + CYR(2)
+ S2I = (FNU+FNU)*STI + CYI(2)
+ AA = FMR*(FNU-1.0D0)
+ STR = DCOS(AA)
+ STI = DSIN(AA)
+ S1R = COEF*(S1R+S2R*STR-S2I*STI)
+ S1I = COEF*(S1I+S2R*STI+S2I*STR)
+ IF (ID.EQ.1) GO TO 120
+ STR = CSQR*S1R - CSQI*S1I
+ S1I = CSQR*S1I + CSQI*S1R
+ S1R = STR
+ BIR = S1R/SFAC
+ BII = S1I/SFAC
+ RETURN
+ 120 CONTINUE
+ STR = ZR*S1R - ZI*S1I
+ S1I = ZR*S1I + ZI*S1R
+ S1R = STR
+ BIR = S1R/SFAC
+ BII = S1I/SFAC
+ RETURN
+ 130 CONTINUE
+ AA = C1*(1.0D0-FID) + FID*C2
+ BIR = AA
+ BII = 0.0D0
+ RETURN
+ 190 CONTINUE
+ IERR=2
+ NZ=0
+ RETURN
+ 200 CONTINUE
+ IF(NZ.EQ.(-1)) GO TO 190
+ NZ=0
+ IERR=5
+ RETURN
+ 260 CONTINUE
+ IERR=4
+ NZ=0
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbknu.f octave-2.0.14/libcruft/amos/zbknu.f
*** octave-2.0.13/libcruft/amos/zbknu.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbknu.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,568 ----
+ SUBROUTINE ZBKNU(ZR, ZI, FNU, KODE, N, YR, YI, NZ, TOL, ELIM,
+ * ALIM)
+ C***BEGIN PROLOGUE ZBKNU
+ C***REFER TO ZBESI,ZBESK,ZAIRY,ZBESH
+ C
+ C ZBKNU COMPUTES THE K BESSEL FUNCTION IN THE RIGHT HALF Z PLANE.
+ C
+ C***ROUTINES CALLED DGAMLN,I1MACH,D1MACH,ZKSCL,ZSHCH,ZUCHK,XZABS,ZDIV,
+ C XZEXP,XZLOG,ZMLT,XZSQRT
+ C***END PROLOGUE ZBKNU
+ C
+ DOUBLE PRECISION AA, AK, ALIM, ASCLE, A1, A2, BB, BK, BRY, CAZ,
+ * CBI, CBR, CC, CCHI, CCHR, CKI, CKR, COEFI, COEFR, CONEI, CONER,
+ * CRSCR, CSCLR, CSHI, CSHR, CSI, CSR, CSRR, CSSR, CTWOR,
+ * CZEROI, CZEROR, CZI, CZR, DNU, DNU2, DPI, ELIM, ETEST, FC, FHS,
+ * FI, FK, FKS, FMUI, FMUR, FNU, FPI, FR, G1, G2, HPI, PI, PR, PTI,
+ * PTR, P1I, P1R, P2I, P2M, P2R, QI, QR, RAK, RCAZ, RTHPI, RZI,
+ * RZR, R1, S, SMUI, SMUR, SPI, STI, STR, S1I, S1R, S2I, S2R, TM,
+ * TOL, TTH, T1, T2, YI, YR, ZI, ZR, DGAMLN, D1MACH, XZABS, ELM,
+ * CELMR, ZDR, ZDI, AS, ALAS, HELIM, CYR, CYI
+ INTEGER I, IFLAG, INU, K, KFLAG, KK, KMAX, KODE, KODED, N, NZ,
+ * IDUM, I1MACH, J, IC, INUB, NW
+ DIMENSION YR(N), YI(N), CC(8), CSSR(3), CSRR(3), BRY(3), CYR(2),
+ * CYI(2)
+ C COMPLEX Z,Y,A,B,RZ,SMU,FU,FMU,F,FLRZ,CZ,S1,S2,CSH,CCH
+ C COMPLEX CK,P,Q,COEF,P1,P2,CBK,PT,CZERO,CONE,CTWO,ST,EZ,CS,DK
+ C
+ DATA KMAX / 30 /
+ DATA CZEROR,CZEROI,CONER,CONEI,CTWOR,R1/
+ 1 0.0D0 , 0.0D0 , 1.0D0 , 0.0D0 , 2.0D0 , 2.0D0 /
+ DATA DPI, RTHPI, SPI ,HPI, FPI, TTH /
+ 1 3.14159265358979324D0, 1.25331413731550025D0,
+ 2 1.90985931710274403D0, 1.57079632679489662D0,
+ 3 1.89769999331517738D0, 6.66666666666666666D-01/
+ DATA CC(1), CC(2), CC(3), CC(4), CC(5), CC(6), CC(7), CC(8)/
+ 1 5.77215664901532861D-01, -4.20026350340952355D-02,
+ 2 -4.21977345555443367D-02, 7.21894324666309954D-03,
+ 3 -2.15241674114950973D-04, -2.01348547807882387D-05,
+ 4 1.13302723198169588D-06, 6.11609510448141582D-09/
+ C
+ CAZ = XZABS(ZR,ZI)
+ CSCLR = 1.0D0/TOL
+ CRSCR = TOL
+ CSSR(1) = CSCLR
+ CSSR(2) = 1.0D0
+ CSSR(3) = CRSCR
+ CSRR(1) = CRSCR
+ CSRR(2) = 1.0D0
+ CSRR(3) = CSCLR
+ BRY(1) = 1.0D+3*D1MACH(1)/TOL
+ BRY(2) = 1.0D0/BRY(1)
+ BRY(3) = D1MACH(2)
+ NZ = 0
+ IFLAG = 0
+ KODED = KODE
+ RCAZ = 1.0D0/CAZ
+ STR = ZR*RCAZ
+ STI = -ZI*RCAZ
+ RZR = (STR+STR)*RCAZ
+ RZI = (STI+STI)*RCAZ
+ INU = INT(SNGL(FNU+0.5D0))
+ DNU = FNU - DBLE(FLOAT(INU))
+ IF (DABS(DNU).EQ.0.5D0) GO TO 110
+ DNU2 = 0.0D0
+ IF (DABS(DNU).GT.TOL) DNU2 = DNU*DNU
+ IF (CAZ.GT.R1) GO TO 110
+ C-----------------------------------------------------------------------
+ C SERIES FOR CABS(Z).LE.R1
+ C-----------------------------------------------------------------------
+ FC = 1.0D0
+ CALL XZLOG(RZR, RZI, SMUR, SMUI, IDUM)
+ FMUR = SMUR*DNU
+ FMUI = SMUI*DNU
+ CALL ZSHCH(FMUR, FMUI, CSHR, CSHI, CCHR, CCHI)
+ IF (DNU.EQ.0.0D0) GO TO 10
+ FC = DNU*DPI
+ FC = FC/DSIN(FC)
+ SMUR = CSHR/DNU
+ SMUI = CSHI/DNU
+ 10 CONTINUE
+ A2 = 1.0D0 + DNU
+ C-----------------------------------------------------------------------
+ C GAM(1-Z)*GAM(1+Z)=PI*Z/SIN(PI*Z), T1=1/GAM(1-DNU), T2=1/GAM(1+DNU)
+ C-----------------------------------------------------------------------
+ T2 = DEXP(-DGAMLN(A2,IDUM))
+ T1 = 1.0D0/(T2*FC)
+ IF (DABS(DNU).GT.0.1D0) GO TO 40
+ C-----------------------------------------------------------------------
+ C SERIES FOR F0 TO RESOLVE INDETERMINACY FOR SMALL ABS(DNU)
+ C-----------------------------------------------------------------------
+ AK = 1.0D0
+ S = CC(1)
+ DO 20 K=2,8
+ AK = AK*DNU2
+ TM = CC(K)*AK
+ S = S + TM
+ IF (DABS(TM).LT.TOL) GO TO 30
+ 20 CONTINUE
+ 30 G1 = -S
+ GO TO 50
+ 40 CONTINUE
+ G1 = (T1-T2)/(DNU+DNU)
+ 50 CONTINUE
+ G2 = (T1+T2)*0.5D0
+ FR = FC*(CCHR*G1+SMUR*G2)
+ FI = FC*(CCHI*G1+SMUI*G2)
+ CALL XZEXP(FMUR, FMUI, STR, STI)
+ PR = 0.5D0*STR/T2
+ PI = 0.5D0*STI/T2
+ CALL ZDIV(0.5D0, 0.0D0, STR, STI, PTR, PTI)
+ QR = PTR/T1
+ QI = PTI/T1
+ S1R = FR
+ S1I = FI
+ S2R = PR
+ S2I = PI
+ AK = 1.0D0
+ A1 = 1.0D0
+ CKR = CONER
+ CKI = CONEI
+ BK = 1.0D0 - DNU2
+ IF (INU.GT.0 .OR. N.GT.1) GO TO 80
+ C-----------------------------------------------------------------------
+ C GENERATE K(FNU,Z), 0.0D0 .LE. FNU .LT. 0.5D0 AND N=1
+ C-----------------------------------------------------------------------
+ IF (CAZ.LT.TOL) GO TO 70
+ CALL ZMLT(ZR, ZI, ZR, ZI, CZR, CZI)
+ CZR = 0.25D0*CZR
+ CZI = 0.25D0*CZI
+ T1 = 0.25D0*CAZ*CAZ
+ 60 CONTINUE
+ FR = (FR*AK+PR+QR)/BK
+ FI = (FI*AK+PI+QI)/BK
+ STR = 1.0D0/(AK-DNU)
+ PR = PR*STR
+ PI = PI*STR
+ STR = 1.0D0/(AK+DNU)
+ QR = QR*STR
+ QI = QI*STR
+ STR = CKR*CZR - CKI*CZI
+ RAK = 1.0D0/AK
+ CKI = (CKR*CZI+CKI*CZR)*RAK
+ CKR = STR*RAK
+ S1R = CKR*FR - CKI*FI + S1R
+ S1I = CKR*FI + CKI*FR + S1I
+ A1 = A1*T1*RAK
+ BK = BK + AK + AK + 1.0D0
+ AK = AK + 1.0D0
+ IF (A1.GT.TOL) GO TO 60
+ 70 CONTINUE
+ YR(1) = S1R
+ YI(1) = S1I
+ IF (KODED.EQ.1) RETURN
+ CALL XZEXP(ZR, ZI, STR, STI)
+ CALL ZMLT(S1R, S1I, STR, STI, YR(1), YI(1))
+ RETURN
+ C-----------------------------------------------------------------------
+ C GENERATE K(DNU,Z) AND K(DNU+1,Z) FOR FORWARD RECURRENCE
+ C-----------------------------------------------------------------------
+ 80 CONTINUE
+ IF (CAZ.LT.TOL) GO TO 100
+ CALL ZMLT(ZR, ZI, ZR, ZI, CZR, CZI)
+ CZR = 0.25D0*CZR
+ CZI = 0.25D0*CZI
+ T1 = 0.25D0*CAZ*CAZ
+ 90 CONTINUE
+ FR = (FR*AK+PR+QR)/BK
+ FI = (FI*AK+PI+QI)/BK
+ STR = 1.0D0/(AK-DNU)
+ PR = PR*STR
+ PI = PI*STR
+ STR = 1.0D0/(AK+DNU)
+ QR = QR*STR
+ QI = QI*STR
+ STR = CKR*CZR - CKI*CZI
+ RAK = 1.0D0/AK
+ CKI = (CKR*CZI+CKI*CZR)*RAK
+ CKR = STR*RAK
+ S1R = CKR*FR - CKI*FI + S1R
+ S1I = CKR*FI + CKI*FR + S1I
+ STR = PR - FR*AK
+ STI = PI - FI*AK
+ S2R = CKR*STR - CKI*STI + S2R
+ S2I = CKR*STI + CKI*STR + S2I
+ A1 = A1*T1*RAK
+ BK = BK + AK + AK + 1.0D0
+ AK = AK + 1.0D0
+ IF (A1.GT.TOL) GO TO 90
+ 100 CONTINUE
+ KFLAG = 2
+ A1 = FNU + 1.0D0
+ AK = A1*DABS(SMUR)
+ IF (AK.GT.ALIM) KFLAG = 3
+ STR = CSSR(KFLAG)
+ P2R = S2R*STR
+ P2I = S2I*STR
+ CALL ZMLT(P2R, P2I, RZR, RZI, S2R, S2I)
+ S1R = S1R*STR
+ S1I = S1I*STR
+ IF (KODED.EQ.1) GO TO 210
+ CALL XZEXP(ZR, ZI, FR, FI)
+ CALL ZMLT(S1R, S1I, FR, FI, S1R, S1I)
+ CALL ZMLT(S2R, S2I, FR, FI, S2R, S2I)
+ GO TO 210
+ C-----------------------------------------------------------------------
+ C IFLAG=0 MEANS NO UNDERFLOW OCCURRED
+ C IFLAG=1 MEANS AN UNDERFLOW OCCURRED- COMPUTATION PROCEEDS WITH
+ C KODED=2 AND A TEST FOR ON SCALE VALUES IS MADE DURING FORWARD
+ C RECURSION
+ C-----------------------------------------------------------------------
+ 110 CONTINUE
+ CALL XZSQRT(ZR, ZI, STR, STI)
+ CALL ZDIV(RTHPI, CZEROI, STR, STI, COEFR, COEFI)
+ KFLAG = 2
+ IF (KODED.EQ.2) GO TO 120
+ IF (ZR.GT.ALIM) GO TO 290
+ C BLANK LINE
+ STR = DEXP(-ZR)*CSSR(KFLAG)
+ STI = -STR*DSIN(ZI)
+ STR = STR*DCOS(ZI)
+ CALL ZMLT(COEFR, COEFI, STR, STI, COEFR, COEFI)
+ 120 CONTINUE
+ IF (DABS(DNU).EQ.0.5D0) GO TO 300
+ C-----------------------------------------------------------------------
+ C MILLER ALGORITHM FOR CABS(Z).GT.R1
+ C-----------------------------------------------------------------------
+ AK = DCOS(DPI*DNU)
+ AK = DABS(AK)
+ IF (AK.EQ.CZEROR) GO TO 300
+ FHS = DABS(0.25D0-DNU2)
+ IF (FHS.EQ.CZEROR) GO TO 300
+ C-----------------------------------------------------------------------
+ C COMPUTE R2=F(E). IF CABS(Z).GE.R2, USE FORWARD RECURRENCE TO
+ C DETERMINE THE BACKWARD INDEX K. R2=F(E) IS A STRAIGHT LINE ON
+ C 12.LE.E.LE.60. E IS COMPUTED FROM 2**(-E)=B**(1-I1MACH(14))=
+ C TOL WHERE B IS THE BASE OF THE ARITHMETIC.
+ C-----------------------------------------------------------------------
+ T1 = DBLE(FLOAT(I1MACH(14)-1))
+ T1 = T1*D1MACH(5)*3.321928094D0
+ T1 = DMAX1(T1,12.0D0)
+ T1 = DMIN1(T1,60.0D0)
+ T2 = TTH*T1 - 6.0D0
+ IF (ZR.NE.0.0D0) GO TO 130
+ T1 = HPI
+ GO TO 140
+ 130 CONTINUE
+ T1 = DATAN(ZI/ZR)
+ T1 = DABS(T1)
+ 140 CONTINUE
+ IF (T2.GT.CAZ) GO TO 170
+ C-----------------------------------------------------------------------
+ C FORWARD RECURRENCE LOOP WHEN CABS(Z).GE.R2
+ C-----------------------------------------------------------------------
+ ETEST = AK/(DPI*CAZ*TOL)
+ FK = CONER
+ IF (ETEST.LT.CONER) GO TO 180
+ FKS = CTWOR
+ CKR = CAZ + CAZ + CTWOR
+ P1R = CZEROR
+ P2R = CONER
+ DO 150 I=1,KMAX
+ AK = FHS/FKS
+ CBR = CKR/(FK+CONER)
+ PTR = P2R
+ P2R = CBR*P2R - P1R*AK
+ P1R = PTR
+ CKR = CKR + CTWOR
+ FKS = FKS + FK + FK + CTWOR
+ FHS = FHS + FK + FK
+ FK = FK + CONER
+ STR = DABS(P2R)*FK
+ IF (ETEST.LT.STR) GO TO 160
+ 150 CONTINUE
+ GO TO 310
+ 160 CONTINUE
+ FK = FK + SPI*T1*DSQRT(T2/CAZ)
+ FHS = DABS(0.25D0-DNU2)
+ GO TO 180
+ 170 CONTINUE
+ C-----------------------------------------------------------------------
+ C COMPUTE BACKWARD INDEX K FOR CABS(Z).LT.R2
+ C-----------------------------------------------------------------------
+ A2 = DSQRT(CAZ)
+ AK = FPI*AK/(TOL*DSQRT(A2))
+ AA = 3.0D0*T1/(1.0D0+CAZ)
+ BB = 14.7D0*T1/(28.0D0+CAZ)
+ AK = (DLOG(AK)+CAZ*DCOS(AA)/(1.0D0+0.008D0*CAZ))/DCOS(BB)
+ FK = 0.12125D0*AK*AK/CAZ + 1.5D0
+ 180 CONTINUE
+ C-----------------------------------------------------------------------
+ C BACKWARD RECURRENCE LOOP FOR MILLER ALGORITHM
+ C-----------------------------------------------------------------------
+ K = INT(SNGL(FK))
+ FK = DBLE(FLOAT(K))
+ FKS = FK*FK
+ P1R = CZEROR
+ P1I = CZEROI
+ P2R = TOL
+ P2I = CZEROI
+ CSR = P2R
+ CSI = P2I
+ DO 190 I=1,K
+ A1 = FKS - FK
+ AK = (FKS+FK)/(A1+FHS)
+ RAK = 2.0D0/(FK+CONER)
+ CBR = (FK+ZR)*RAK
+ CBI = ZI*RAK
+ PTR = P2R
+ PTI = P2I
+ P2R = (PTR*CBR-PTI*CBI-P1R)*AK
+ P2I = (PTI*CBR+PTR*CBI-P1I)*AK
+ P1R = PTR
+ P1I = PTI
+ CSR = CSR + P2R
+ CSI = CSI + P2I
+ FKS = A1 - FK + CONER
+ FK = FK - CONER
+ 190 CONTINUE
+ C-----------------------------------------------------------------------
+ C COMPUTE (P2/CS)=(P2/CABS(CS))*(CONJG(CS)/CABS(CS)) FOR BETTER
+ C SCALING
+ C-----------------------------------------------------------------------
+ TM = XZABS(CSR,CSI)
+ PTR = 1.0D0/TM
+ S1R = P2R*PTR
+ S1I = P2I*PTR
+ CSR = CSR*PTR
+ CSI = -CSI*PTR
+ CALL ZMLT(COEFR, COEFI, S1R, S1I, STR, STI)
+ CALL ZMLT(STR, STI, CSR, CSI, S1R, S1I)
+ IF (INU.GT.0 .OR. N.GT.1) GO TO 200
+ ZDR = ZR
+ ZDI = ZI
+ IF(IFLAG.EQ.1) GO TO 270
+ GO TO 240
+ 200 CONTINUE
+ C-----------------------------------------------------------------------
+ C COMPUTE P1/P2=(P1/CABS(P2)*CONJG(P2)/CABS(P2) FOR SCALING
+ C-----------------------------------------------------------------------
+ TM = XZABS(P2R,P2I)
+ PTR = 1.0D0/TM
+ P1R = P1R*PTR
+ P1I = P1I*PTR
+ P2R = P2R*PTR
+ P2I = -P2I*PTR
+ CALL ZMLT(P1R, P1I, P2R, P2I, PTR, PTI)
+ STR = DNU + 0.5D0 - PTR
+ STI = -PTI
+ CALL ZDIV(STR, STI, ZR, ZI, STR, STI)
+ STR = STR + 1.0D0
+ CALL ZMLT(STR, STI, S1R, S1I, S2R, S2I)
+ C-----------------------------------------------------------------------
+ C FORWARD RECURSION ON THE THREE TERM RECURSION WITH RELATION WITH
+ C SCALING NEAR EXPONENT EXTREMES ON KFLAG=1 OR KFLAG=3
+ C-----------------------------------------------------------------------
+ 210 CONTINUE
+ STR = DNU + 1.0D0
+ CKR = STR*RZR
+ CKI = STR*RZI
+ IF (N.EQ.1) INU = INU - 1
+ IF (INU.GT.0) GO TO 220
+ IF (N.GT.1) GO TO 215
+ S1R = S2R
+ S1I = S2I
+ 215 CONTINUE
+ ZDR = ZR
+ ZDI = ZI
+ IF(IFLAG.EQ.1) GO TO 270
+ GO TO 240
+ 220 CONTINUE
+ INUB = 1
+ IF(IFLAG.EQ.1) GO TO 261
+ 225 CONTINUE
+ P1R = CSRR(KFLAG)
+ ASCLE = BRY(KFLAG)
+ DO 230 I=INUB,INU
+ STR = S2R
+ STI = S2I
+ S2R = CKR*STR - CKI*STI + S1R
+ S2I = CKR*STI + CKI*STR + S1I
+ S1R = STR
+ S1I = STI
+ CKR = CKR + RZR
+ CKI = CKI + RZI
+ IF (KFLAG.GE.3) GO TO 230
+ P2R = S2R*P1R
+ P2I = S2I*P1R
+ STR = DABS(P2R)
+ STI = DABS(P2I)
+ P2M = DMAX1(STR,STI)
+ IF (P2M.LE.ASCLE) GO TO 230
+ KFLAG = KFLAG + 1
+ ASCLE = BRY(KFLAG)
+ S1R = S1R*P1R
+ S1I = S1I*P1R
+ S2R = P2R
+ S2I = P2I
+ STR = CSSR(KFLAG)
+ S1R = S1R*STR
+ S1I = S1I*STR
+ S2R = S2R*STR
+ S2I = S2I*STR
+ P1R = CSRR(KFLAG)
+ 230 CONTINUE
+ IF (N.NE.1) GO TO 240
+ S1R = S2R
+ S1I = S2I
+ 240 CONTINUE
+ STR = CSRR(KFLAG)
+ YR(1) = S1R*STR
+ YI(1) = S1I*STR
+ IF (N.EQ.1) RETURN
+ YR(2) = S2R*STR
+ YI(2) = S2I*STR
+ IF (N.EQ.2) RETURN
+ KK = 2
+ 250 CONTINUE
+ KK = KK + 1
+ IF (KK.GT.N) RETURN
+ P1R = CSRR(KFLAG)
+ ASCLE = BRY(KFLAG)
+ DO 260 I=KK,N
+ P2R = S2R
+ P2I = S2I
+ S2R = CKR*P2R - CKI*P2I + S1R
+ S2I = CKI*P2R + CKR*P2I + S1I
+ S1R = P2R
+ S1I = P2I
+ CKR = CKR + RZR
+ CKI = CKI + RZI
+ P2R = S2R*P1R
+ P2I = S2I*P1R
+ YR(I) = P2R
+ YI(I) = P2I
+ IF (KFLAG.GE.3) GO TO 260
+ STR = DABS(P2R)
+ STI = DABS(P2I)
+ P2M = DMAX1(STR,STI)
+ IF (P2M.LE.ASCLE) GO TO 260
+ KFLAG = KFLAG + 1
+ ASCLE = BRY(KFLAG)
+ S1R = S1R*P1R
+ S1I = S1I*P1R
+ S2R = P2R
+ S2I = P2I
+ STR = CSSR(KFLAG)
+ S1R = S1R*STR
+ S1I = S1I*STR
+ S2R = S2R*STR
+ S2I = S2I*STR
+ P1R = CSRR(KFLAG)
+ 260 CONTINUE
+ RETURN
+ C-----------------------------------------------------------------------
+ C IFLAG=1 CASES, FORWARD RECURRENCE ON SCALED VALUES ON UNDERFLOW
+ C-----------------------------------------------------------------------
+ 261 CONTINUE
+ HELIM = 0.5D0*ELIM
+ ELM = DEXP(-ELIM)
+ CELMR = ELM
+ ASCLE = BRY(1)
+ ZDR = ZR
+ ZDI = ZI
+ IC = -1
+ J = 2
+ DO 262 I=1,INU
+ STR = S2R
+ STI = S2I
+ S2R = STR*CKR-STI*CKI+S1R
+ S2I = STI*CKR+STR*CKI+S1I
+ S1R = STR
+ S1I = STI
+ CKR = CKR+RZR
+ CKI = CKI+RZI
+ AS = XZABS(S2R,S2I)
+ ALAS = DLOG(AS)
+ P2R = -ZDR+ALAS
+ IF(P2R.LT.(-ELIM)) GO TO 263
+ CALL XZLOG(S2R,S2I,STR,STI,IDUM)
+ P2R = -ZDR+STR
+ P2I = -ZDI+STI
+ P2M = DEXP(P2R)/TOL
+ P1R = P2M*DCOS(P2I)
+ P1I = P2M*DSIN(P2I)
+ CALL ZUCHK(P1R,P1I,NW,ASCLE,TOL)
+ IF(NW.NE.0) GO TO 263
+ J = 3 - J
+ CYR(J) = P1R
+ CYI(J) = P1I
+ IF(IC.EQ.(I-1)) GO TO 264
+ IC = I
+ GO TO 262
+ 263 CONTINUE
+ IF(ALAS.LT.HELIM) GO TO 262
+ ZDR = ZDR-ELIM
+ S1R = S1R*CELMR
+ S1I = S1I*CELMR
+ S2R = S2R*CELMR
+ S2I = S2I*CELMR
+ 262 CONTINUE
+ IF(N.NE.1) GO TO 270
+ S1R = S2R
+ S1I = S2I
+ GO TO 270
+ 264 CONTINUE
+ KFLAG = 1
+ INUB = I+1
+ S2R = CYR(J)
+ S2I = CYI(J)
+ J = 3 - J
+ S1R = CYR(J)
+ S1I = CYI(J)
+ IF(INUB.LE.INU) GO TO 225
+ IF(N.NE.1) GO TO 240
+ S1R = S2R
+ S1I = S2I
+ GO TO 240
+ 270 CONTINUE
+ YR(1) = S1R
+ YI(1) = S1I
+ IF(N.EQ.1) GO TO 280
+ YR(2) = S2R
+ YI(2) = S2I
+ 280 CONTINUE
+ ASCLE = BRY(1)
+ CALL ZKSCL(ZDR,ZDI,FNU,N,YR,YI,NZ,RZR,RZI,ASCLE,TOL,ELIM)
+ INU = N - NZ
+ IF (INU.LE.0) RETURN
+ KK = NZ + 1
+ S1R = YR(KK)
+ S1I = YI(KK)
+ YR(KK) = S1R*CSRR(1)
+ YI(KK) = S1I*CSRR(1)
+ IF (INU.EQ.1) RETURN
+ KK = NZ + 2
+ S2R = YR(KK)
+ S2I = YI(KK)
+ YR(KK) = S2R*CSRR(1)
+ YI(KK) = S2I*CSRR(1)
+ IF (INU.EQ.2) RETURN
+ T2 = FNU + DBLE(FLOAT(KK-1))
+ CKR = T2*RZR
+ CKI = T2*RZI
+ KFLAG = 1
+ GO TO 250
+ 290 CONTINUE
+ C-----------------------------------------------------------------------
+ C SCALE BY DEXP(Z), IFLAG = 1 CASES
+ C-----------------------------------------------------------------------
+ KODED = 2
+ IFLAG = 1
+ KFLAG = 2
+ GO TO 120
+ C-----------------------------------------------------------------------
+ C FNU=HALF ODD INTEGER CASE, DNU=-0.5
+ C-----------------------------------------------------------------------
+ 300 CONTINUE
+ S1R = COEFR
+ S1I = COEFI
+ S2R = COEFR
+ S2I = COEFI
+ GO TO 210
+ C
+ C
+ 310 CONTINUE
+ NZ=-2
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbuni.f octave-2.0.14/libcruft/amos/zbuni.f
*** octave-2.0.13/libcruft/amos/zbuni.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbuni.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,174 ----
+ SUBROUTINE ZBUNI(ZR, ZI, FNU, KODE, N, YR, YI, NZ, NUI, NLAST,
+ * FNUL, TOL, ELIM, ALIM)
+ C***BEGIN PROLOGUE ZBUNI
+ C***REFER TO ZBESI,ZBESK
+ C
+ C ZBUNI COMPUTES THE I BESSEL FUNCTION FOR LARGE CABS(Z).GT.
+ C FNUL AND FNU+N-1.LT.FNUL. THE ORDER IS INCREASED FROM
+ C FNU+N-1 GREATER THAN FNUL BY ADDING NUI AND COMPUTING
+ C ACCORDING TO THE UNIFORM ASYMPTOTIC EXPANSION FOR I(FNU,Z)
+ C ON IFORM=1 AND THE EXPANSION FOR J(FNU,Z) ON IFORM=2
+ C
+ C***ROUTINES CALLED ZUNI1,ZUNI2,XZABS,D1MACH
+ C***END PROLOGUE ZBUNI
+ C COMPLEX CSCL,CSCR,CY,RZ,ST,S1,S2,Y,Z
+ DOUBLE PRECISION ALIM, AX, AY, CSCLR, CSCRR, CYI, CYR, DFNU,
+ * ELIM, FNU, FNUI, FNUL, GNU, RAZ, RZI, RZR, STI, STR, S1I, S1R,
+ * S2I, S2R, TOL, YI, YR, ZI, ZR, XZABS, ASCLE, BRY, C1R, C1I, C1M,
+ * D1MACH
+ INTEGER I, IFLAG, IFORM, K, KODE, N, NL, NLAST, NUI, NW, NZ
+ DIMENSION YR(N), YI(N), CYR(2), CYI(2), BRY(3)
+ NZ = 0
+ AX = DABS(ZR)*1.7321D0
+ AY = DABS(ZI)
+ IFORM = 1
+ IF (AY.GT.AX) IFORM = 2
+ IF (NUI.EQ.0) GO TO 60
+ FNUI = DBLE(FLOAT(NUI))
+ DFNU = FNU + DBLE(FLOAT(N-1))
+ GNU = DFNU + FNUI
+ IF (IFORM.EQ.2) GO TO 10
+ C-----------------------------------------------------------------------
+ C ASYMPTOTIC EXPANSION FOR I(FNU,Z) FOR LARGE FNU APPLIED IN
+ C -PI/3.LE.ARG(Z).LE.PI/3
+ C-----------------------------------------------------------------------
+ CALL ZUNI1(ZR, ZI, GNU, KODE, 2, CYR, CYI, NW, NLAST, FNUL, TOL,
+ * ELIM, ALIM)
+ GO TO 20
+ 10 CONTINUE
+ C-----------------------------------------------------------------------
+ C ASYMPTOTIC EXPANSION FOR J(FNU,Z*EXP(M*HPI)) FOR LARGE FNU
+ C APPLIED IN PI/3.LT.ABS(ARG(Z)).LE.PI/2 WHERE M=+I OR -I
+ C AND HPI=PI/2
+ C-----------------------------------------------------------------------
+ CALL ZUNI2(ZR, ZI, GNU, KODE, 2, CYR, CYI, NW, NLAST, FNUL, TOL,
+ * ELIM, ALIM)
+ 20 CONTINUE
+ IF (NW.LT.0) GO TO 50
+ IF (NW.NE.0) GO TO 90
+ STR = XZABS(CYR(1),CYI(1))
+ C----------------------------------------------------------------------
+ C SCALE BACKWARD RECURRENCE, BRY(3) IS DEFINED BUT NEVER USED
+ C----------------------------------------------------------------------
+ BRY(1)=1.0D+3*D1MACH(1)/TOL
+ BRY(2) = 1.0D0/BRY(1)
+ BRY(3) = BRY(2)
+ IFLAG = 2
+ ASCLE = BRY(2)
+ CSCLR = 1.0D0
+ IF (STR.GT.BRY(1)) GO TO 21
+ IFLAG = 1
+ ASCLE = BRY(1)
+ CSCLR = 1.0D0/TOL
+ GO TO 25
+ 21 CONTINUE
+ IF (STR.LT.BRY(2)) GO TO 25
+ IFLAG = 3
+ ASCLE=BRY(3)
+ CSCLR = TOL
+ 25 CONTINUE
+ CSCRR = 1.0D0/CSCLR
+ S1R = CYR(2)*CSCLR
+ S1I = CYI(2)*CSCLR
+ S2R = CYR(1)*CSCLR
+ S2I = CYI(1)*CSCLR
+ RAZ = 1.0D0/XZABS(ZR,ZI)
+ STR = ZR*RAZ
+ STI = -ZI*RAZ
+ RZR = (STR+STR)*RAZ
+ RZI = (STI+STI)*RAZ
+ DO 30 I=1,NUI
+ STR = S2R
+ STI = S2I
+ S2R = (DFNU+FNUI)*(RZR*STR-RZI*STI) + S1R
+ S2I = (DFNU+FNUI)*(RZR*STI+RZI*STR) + S1I
+ S1R = STR
+ S1I = STI
+ FNUI = FNUI - 1.0D0
+ IF (IFLAG.GE.3) GO TO 30
+ STR = S2R*CSCRR
+ STI = S2I*CSCRR
+ C1R = DABS(STR)
+ C1I = DABS(STI)
+ C1M = DMAX1(C1R,C1I)
+ IF (C1M.LE.ASCLE) GO TO 30
+ IFLAG = IFLAG+1
+ ASCLE = BRY(IFLAG)
+ S1R = S1R*CSCRR
+ S1I = S1I*CSCRR
+ S2R = STR
+ S2I = STI
+ CSCLR = CSCLR*TOL
+ CSCRR = 1.0D0/CSCLR
+ S1R = S1R*CSCLR
+ S1I = S1I*CSCLR
+ S2R = S2R*CSCLR
+ S2I = S2I*CSCLR
+ 30 CONTINUE
+ YR(N) = S2R*CSCRR
+ YI(N) = S2I*CSCRR
+ IF (N.EQ.1) RETURN
+ NL = N - 1
+ FNUI = DBLE(FLOAT(NL))
+ K = NL
+ DO 40 I=1,NL
+ STR = S2R
+ STI = S2I
+ S2R = (FNU+FNUI)*(RZR*STR-RZI*STI) + S1R
+ S2I = (FNU+FNUI)*(RZR*STI+RZI*STR) + S1I
+ S1R = STR
+ S1I = STI
+ STR = S2R*CSCRR
+ STI = S2I*CSCRR
+ YR(K) = STR
+ YI(K) = STI
+ FNUI = FNUI - 1.0D0
+ K = K - 1
+ IF (IFLAG.GE.3) GO TO 40
+ C1R = DABS(STR)
+ C1I = DABS(STI)
+ C1M = DMAX1(C1R,C1I)
+ IF (C1M.LE.ASCLE) GO TO 40
+ IFLAG = IFLAG+1
+ ASCLE = BRY(IFLAG)
+ S1R = S1R*CSCRR
+ S1I = S1I*CSCRR
+ S2R = STR
+ S2I = STI
+ CSCLR = CSCLR*TOL
+ CSCRR = 1.0D0/CSCLR
+ S1R = S1R*CSCLR
+ S1I = S1I*CSCLR
+ S2R = S2R*CSCLR
+ S2I = S2I*CSCLR
+ 40 CONTINUE
+ RETURN
+ 50 CONTINUE
+ NZ = -1
+ IF(NW.EQ.(-2)) NZ=-2
+ RETURN
+ 60 CONTINUE
+ IF (IFORM.EQ.2) GO TO 70
+ C-----------------------------------------------------------------------
+ C ASYMPTOTIC EXPANSION FOR I(FNU,Z) FOR LARGE FNU APPLIED IN
+ C -PI/3.LE.ARG(Z).LE.PI/3
+ C-----------------------------------------------------------------------
+ CALL ZUNI1(ZR, ZI, FNU, KODE, N, YR, YI, NW, NLAST, FNUL, TOL,
+ * ELIM, ALIM)
+ GO TO 80
+ 70 CONTINUE
+ C-----------------------------------------------------------------------
+ C ASYMPTOTIC EXPANSION FOR J(FNU,Z*EXP(M*HPI)) FOR LARGE FNU
+ C APPLIED IN PI/3.LT.ABS(ARG(Z)).LE.PI/2 WHERE M=+I OR -I
+ C AND HPI=PI/2
+ C-----------------------------------------------------------------------
+ CALL ZUNI2(ZR, ZI, FNU, KODE, N, YR, YI, NW, NLAST, FNUL, TOL,
+ * ELIM, ALIM)
+ 80 CONTINUE
+ IF (NW.LT.0) GO TO 50
+ NZ = NW
+ RETURN
+ 90 CONTINUE
+ NLAST = N
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zbunk.f octave-2.0.14/libcruft/amos/zbunk.f
*** octave-2.0.13/libcruft/amos/zbunk.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zbunk.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,35 ----
+ SUBROUTINE ZBUNK(ZR, ZI, FNU, KODE, MR, N, YR, YI, NZ, TOL, ELIM,
+ * ALIM)
+ C***BEGIN PROLOGUE ZBUNK
+ C***REFER TO ZBESK,ZBESH
+ C
+ C ZBUNK COMPUTES THE K BESSEL FUNCTION FOR FNU.GT.FNUL.
+ C ACCORDING TO THE UNIFORM ASYMPTOTIC EXPANSION FOR K(FNU,Z)
+ C IN ZUNK1 AND THE EXPANSION FOR H(2,FNU,Z) IN ZUNK2
+ C
+ C***ROUTINES CALLED ZUNK1,ZUNK2
+ C***END PROLOGUE ZBUNK
+ C COMPLEX Y,Z
+ DOUBLE PRECISION ALIM, AX, AY, ELIM, FNU, TOL, YI, YR, ZI, ZR
+ INTEGER KODE, MR, N, NZ
+ DIMENSION YR(N), YI(N)
+ NZ = 0
+ AX = DABS(ZR)*1.7321D0
+ AY = DABS(ZI)
+ IF (AY.GT.AX) GO TO 10
+ C-----------------------------------------------------------------------
+ C ASYMPTOTIC EXPANSION FOR K(FNU,Z) FOR LARGE FNU APPLIED IN
+ C -PI/3.LE.ARG(Z).LE.PI/3
+ C-----------------------------------------------------------------------
+ CALL ZUNK1(ZR, ZI, FNU, KODE, MR, N, YR, YI, NZ, TOL, ELIM, ALIM)
+ GO TO 20
+ 10 CONTINUE
+ C-----------------------------------------------------------------------
+ C ASYMPTOTIC EXPANSION FOR H(2,FNU,Z*EXP(M*HPI)) FOR LARGE FNU
+ C APPLIED IN PI/3.LT.ABS(ARG(Z)).LE.PI/2 WHERE M=+I OR -I
+ C AND HPI=PI/2
+ C-----------------------------------------------------------------------
+ CALL ZUNK2(ZR, ZI, FNU, KODE, MR, N, YR, YI, NZ, TOL, ELIM, ALIM)
+ 20 CONTINUE
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zdiv.f octave-2.0.14/libcruft/amos/zdiv.f
*** octave-2.0.13/libcruft/amos/zdiv.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zdiv.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,19 ----
+ SUBROUTINE ZDIV(AR, AI, BR, BI, CR, CI)
+ C***BEGIN PROLOGUE ZDIV
+ C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY
+ C
+ C DOUBLE PRECISION COMPLEX DIVIDE C=A/B.
+ C
+ C***ROUTINES CALLED XZABS
+ C***END PROLOGUE ZDIV
+ DOUBLE PRECISION AR, AI, BR, BI, CR, CI, BM, CA, CB, CC, CD
+ DOUBLE PRECISION XZABS
+ BM = 1.0D0/XZABS(BR,BI)
+ CC = BR*BM
+ CD = BI*BM
+ CA = (AR*CC+AI*CD)*BM
+ CB = (AI*CC-AR*CD)*BM
+ CR = CA
+ CI = CB
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zkscl.f octave-2.0.14/libcruft/amos/zkscl.f
*** octave-2.0.13/libcruft/amos/zkscl.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zkscl.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,121 ----
+ SUBROUTINE ZKSCL(ZRR,ZRI,FNU,N,YR,YI,NZ,RZR,RZI,ASCLE,TOL,ELIM)
+ C***BEGIN PROLOGUE ZKSCL
+ C***REFER TO ZBESK
+ C
+ C SET K FUNCTIONS TO ZERO ON UNDERFLOW, CONTINUE RECURRENCE
+ C ON SCALED FUNCTIONS UNTIL TWO MEMBERS COME ON SCALE, THEN
+ C RETURN WITH MIN(NZ+2,N) VALUES SCALED BY 1/TOL.
+ C
+ C***ROUTINES CALLED ZUCHK,XZABS,XZLOG
+ C***END PROLOGUE ZKSCL
+ C COMPLEX CK,CS,CY,CZERO,RZ,S1,S2,Y,ZR,ZD,CELM
+ DOUBLE PRECISION ACS, AS, ASCLE, CKI, CKR, CSI, CSR, CYI,
+ * CYR, ELIM, FN, FNU, RZI, RZR, STR, S1I, S1R, S2I,
+ * S2R, TOL, YI, YR, ZEROI, ZEROR, ZRI, ZRR, XZABS,
+ * ZDR, ZDI, CELMR, ELM, HELIM, ALAS
+ INTEGER I, IC, IDUM, KK, N, NN, NW, NZ
+ DIMENSION YR(N), YI(N), CYR(2), CYI(2)
+ DATA ZEROR,ZEROI / 0.0D0 , 0.0D0 /
+ C
+ NZ = 0
+ IC = 0
+ NN = MIN0(2,N)
+ DO 10 I=1,NN
+ S1R = YR(I)
+ S1I = YI(I)
+ CYR(I) = S1R
+ CYI(I) = S1I
+ AS = XZABS(S1R,S1I)
+ ACS = -ZRR + DLOG(AS)
+ NZ = NZ + 1
+ YR(I) = ZEROR
+ YI(I) = ZEROI
+ IF (ACS.LT.(-ELIM)) GO TO 10
+ CALL XZLOG(S1R, S1I, CSR, CSI, IDUM)
+ CSR = CSR - ZRR
+ CSI = CSI - ZRI
+ STR = DEXP(CSR)/TOL
+ CSR = STR*DCOS(CSI)
+ CSI = STR*DSIN(CSI)
+ CALL ZUCHK(CSR, CSI, NW, ASCLE, TOL)
+ IF (NW.NE.0) GO TO 10
+ YR(I) = CSR
+ YI(I) = CSI
+ IC = I
+ NZ = NZ - 1
+ 10 CONTINUE
+ IF (N.EQ.1) RETURN
+ IF (IC.GT.1) GO TO 20
+ YR(1) = ZEROR
+ YI(1) = ZEROI
+ NZ = 2
+ 20 CONTINUE
+ IF (N.EQ.2) RETURN
+ IF (NZ.EQ.0) RETURN
+ FN = FNU + 1.0D0
+ CKR = FN*RZR
+ CKI = FN*RZI
+ S1R = CYR(1)
+ S1I = CYI(1)
+ S2R = CYR(2)
+ S2I = CYI(2)
+ HELIM = 0.5D0*ELIM
+ ELM = DEXP(-ELIM)
+ CELMR = ELM
+ ZDR = ZRR
+ ZDI = ZRI
+ C
+ C FIND TWO CONSECUTIVE Y VALUES ON SCALE. SCALE RECURRENCE IF
+ C S2 GETS LARGER THAN EXP(ELIM/2)
+ C
+ DO 30 I=3,N
+ KK = I
+ CSR = S2R
+ CSI = S2I
+ S2R = CKR*CSR - CKI*CSI + S1R
+ S2I = CKI*CSR + CKR*CSI + S1I
+ S1R = CSR
+ S1I = CSI
+ CKR = CKR + RZR
+ CKI = CKI + RZI
+ AS = XZABS(S2R,S2I)
+ ALAS = DLOG(AS)
+ ACS = -ZDR + ALAS
+ NZ = NZ + 1
+ YR(I) = ZEROR
+ YI(I) = ZEROI
+ IF (ACS.LT.(-ELIM)) GO TO 25
+ CALL XZLOG(S2R, S2I, CSR, CSI, IDUM)
+ CSR = CSR - ZDR
+ CSI = CSI - ZDI
+ STR = DEXP(CSR)/TOL
+ CSR = STR*DCOS(CSI)
+ CSI = STR*DSIN(CSI)
+ CALL ZUCHK(CSR, CSI, NW, ASCLE, TOL)
+ IF (NW.NE.0) GO TO 25
+ YR(I) = CSR
+ YI(I) = CSI
+ NZ = NZ - 1
+ IF (IC.EQ.KK-1) GO TO 40
+ IC = KK
+ GO TO 30
+ 25 CONTINUE
+ IF(ALAS.LT.HELIM) GO TO 30
+ ZDR = ZDR - ELIM
+ S1R = S1R*CELMR
+ S1I = S1I*CELMR
+ S2R = S2R*CELMR
+ S2I = S2I*CELMR
+ 30 CONTINUE
+ NZ = N
+ IF(IC.EQ.N) NZ=N-1
+ GO TO 45
+ 40 CONTINUE
+ NZ = KK - 2
+ 45 CONTINUE
+ DO 50 I=1,NZ
+ YR(I) = ZEROR
+ YI(I) = ZEROI
+ 50 CONTINUE
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zmlri.f octave-2.0.14/libcruft/amos/zmlri.f
*** octave-2.0.13/libcruft/amos/zmlri.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zmlri.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,204 ----
+ SUBROUTINE ZMLRI(ZR, ZI, FNU, KODE, N, YR, YI, NZ, TOL)
+ C***BEGIN PROLOGUE ZMLRI
+ C***REFER TO ZBESI,ZBESK
+ C
+ C ZMLRI COMPUTES THE I BESSEL FUNCTION FOR RE(Z).GE.0.0 BY THE
+ C MILLER ALGORITHM NORMALIZED BY A NEUMANN SERIES.
+ C
+ C***ROUTINES CALLED DGAMLN,D1MACH,XZABS,XZEXP,XZLOG,ZMLT
+ C***END PROLOGUE ZMLRI
+ C COMPLEX CK,CNORM,CONE,CTWO,CZERO,PT,P1,P2,RZ,SUM,Y,Z
+ DOUBLE PRECISION ACK, AK, AP, AT, AZ, BK, CKI, CKR, CNORMI,
+ * CNORMR, CONEI, CONER, FKAP, FKK, FLAM, FNF, FNU, PTI, PTR, P1I,
+ * P1R, P2I, P2R, RAZ, RHO, RHO2, RZI, RZR, SCLE, STI, STR, SUMI,
+ * SUMR, TFNF, TOL, TST, YI, YR, ZEROI, ZEROR, ZI, ZR, DGAMLN,
+ * D1MACH, XZABS
+ INTEGER I, IAZ, IDUM, IFNU, INU, ITIME, K, KK, KM, KODE, M, N, NZ
+ DIMENSION YR(N), YI(N)
+ DATA ZEROR,ZEROI,CONER,CONEI / 0.0D0, 0.0D0, 1.0D0, 0.0D0 /
+ SCLE = D1MACH(1)/TOL
+ NZ=0
+ AZ = XZABS(ZR,ZI)
+ IAZ = INT(SNGL(AZ))
+ IFNU = INT(SNGL(FNU))
+ INU = IFNU + N - 1
+ AT = DBLE(FLOAT(IAZ)) + 1.0D0
+ RAZ = 1.0D0/AZ
+ STR = ZR*RAZ
+ STI = -ZI*RAZ
+ CKR = STR*AT*RAZ
+ CKI = STI*AT*RAZ
+ RZR = (STR+STR)*RAZ
+ RZI = (STI+STI)*RAZ
+ P1R = ZEROR
+ P1I = ZEROI
+ P2R = CONER
+ P2I = CONEI
+ ACK = (AT+1.0D0)*RAZ
+ RHO = ACK + DSQRT(ACK*ACK-1.0D0)
+ RHO2 = RHO*RHO
+ TST = (RHO2+RHO2)/((RHO2-1.0D0)*(RHO-1.0D0))
+ TST = TST/TOL
+ C-----------------------------------------------------------------------
+ C COMPUTE RELATIVE TRUNCATION ERROR INDEX FOR SERIES
+ C-----------------------------------------------------------------------
+ AK = AT
+ DO 10 I=1,80
+ PTR = P2R
+ PTI = P2I
+ P2R = P1R - (CKR*PTR-CKI*PTI)
+ P2I = P1I - (CKI*PTR+CKR*PTI)
+ P1R = PTR
+ P1I = PTI
+ CKR = CKR + RZR
+ CKI = CKI + RZI
+ AP = XZABS(P2R,P2I)
+ IF (AP.GT.TST*AK*AK) GO TO 20
+ AK = AK + 1.0D0
+ 10 CONTINUE
+ GO TO 110
+ 20 CONTINUE
+ I = I + 1
+ K = 0
+ IF (INU.LT.IAZ) GO TO 40
+ C-----------------------------------------------------------------------
+ C COMPUTE RELATIVE TRUNCATION ERROR FOR RATIOS
+ C-----------------------------------------------------------------------
+ P1R = ZEROR
+ P1I = ZEROI
+ P2R = CONER
+ P2I = CONEI
+ AT = DBLE(FLOAT(INU)) + 1.0D0
+ STR = ZR*RAZ
+ STI = -ZI*RAZ
+ CKR = STR*AT*RAZ
+ CKI = STI*AT*RAZ
+ ACK = AT*RAZ
+ TST = DSQRT(ACK/TOL)
+ ITIME = 1
+ DO 30 K=1,80
+ PTR = P2R
+ PTI = P2I
+ P2R = P1R - (CKR*PTR-CKI*PTI)
+ P2I = P1I - (CKR*PTI+CKI*PTR)
+ P1R = PTR
+ P1I = PTI
+ CKR = CKR + RZR
+ CKI = CKI + RZI
+ AP = XZABS(P2R,P2I)
+ IF (AP.LT.TST) GO TO 30
+ IF (ITIME.EQ.2) GO TO 40
+ ACK = XZABS(CKR,CKI)
+ FLAM = ACK + DSQRT(ACK*ACK-1.0D0)
+ FKAP = AP/XZABS(P1R,P1I)
+ RHO = DMIN1(FLAM,FKAP)
+ TST = TST*DSQRT(RHO/(RHO*RHO-1.0D0))
+ ITIME = 2
+ 30 CONTINUE
+ GO TO 110
+ 40 CONTINUE
+ C-----------------------------------------------------------------------
+ C BACKWARD RECURRENCE AND SUM NORMALIZING RELATION
+ C-----------------------------------------------------------------------
+ K = K + 1
+ KK = MAX0(I+IAZ,K+INU)
+ FKK = DBLE(FLOAT(KK))
+ P1R = ZEROR
+ P1I = ZEROI
+ C-----------------------------------------------------------------------
+ C SCALE P2 AND SUM BY SCLE
+ C-----------------------------------------------------------------------
+ P2R = SCLE
+ P2I = ZEROI
+ FNF = FNU - DBLE(FLOAT(IFNU))
+ TFNF = FNF + FNF
+ BK = DGAMLN(FKK+TFNF+1.0D0,IDUM) - DGAMLN(FKK+1.0D0,IDUM) -
+ * DGAMLN(TFNF+1.0D0,IDUM)
+ BK = DEXP(BK)
+ SUMR = ZEROR
+ SUMI = ZEROI
+ KM = KK - INU
+ DO 50 I=1,KM
+ PTR = P2R
+ PTI = P2I
+ P2R = P1R + (FKK+FNF)*(RZR*PTR-RZI*PTI)
+ P2I = P1I + (FKK+FNF)*(RZI*PTR+RZR*PTI)
+ P1R = PTR
+ P1I = PTI
+ AK = 1.0D0 - TFNF/(FKK+TFNF)
+ ACK = BK*AK
+ SUMR = SUMR + (ACK+BK)*P1R
+ SUMI = SUMI + (ACK+BK)*P1I
+ BK = ACK
+ FKK = FKK - 1.0D0
+ 50 CONTINUE
+ YR(N) = P2R
+ YI(N) = P2I
+ IF (N.EQ.1) GO TO 70
+ DO 60 I=2,N
+ PTR = P2R
+ PTI = P2I
+ P2R = P1R + (FKK+FNF)*(RZR*PTR-RZI*PTI)
+ P2I = P1I + (FKK+FNF)*(RZI*PTR+RZR*PTI)
+ P1R = PTR
+ P1I = PTI
+ AK = 1.0D0 - TFNF/(FKK+TFNF)
+ ACK = BK*AK
+ SUMR = SUMR + (ACK+BK)*P1R
+ SUMI = SUMI + (ACK+BK)*P1I
+ BK = ACK
+ FKK = FKK - 1.0D0
+ M = N - I + 1
+ YR(M) = P2R
+ YI(M) = P2I
+ 60 CONTINUE
+ 70 CONTINUE
+ IF (IFNU.LE.0) GO TO 90
+ DO 80 I=1,IFNU
+ PTR = P2R
+ PTI = P2I
+ P2R = P1R + (FKK+FNF)*(RZR*PTR-RZI*PTI)
+ P2I = P1I + (FKK+FNF)*(RZR*PTI+RZI*PTR)
+ P1R = PTR
+ P1I = PTI
+ AK = 1.0D0 - TFNF/(FKK+TFNF)
+ ACK = BK*AK
+ SUMR = SUMR + (ACK+BK)*P1R
+ SUMI = SUMI + (ACK+BK)*P1I
+ BK = ACK
+ FKK = FKK - 1.0D0
+ 80 CONTINUE
+ 90 CONTINUE
+ PTR = ZR
+ PTI = ZI
+ IF (KODE.EQ.2) PTR = ZEROR
+ CALL XZLOG(RZR, RZI, STR, STI, IDUM)
+ P1R = -FNF*STR + PTR
+ P1I = -FNF*STI + PTI
+ AP = DGAMLN(1.0D0+FNF,IDUM)
+ PTR = P1R - AP
+ PTI = P1I
+ C-----------------------------------------------------------------------
+ C THE DIVISION CEXP(PT)/(SUM+P2) IS ALTERED TO AVOID OVERFLOW
+ C IN THE DENOMINATOR BY SQUARING LARGE QUANTITIES
+ C-----------------------------------------------------------------------
+ P2R = P2R + SUMR
+ P2I = P2I + SUMI
+ AP = XZABS(P2R,P2I)
+ P1R = 1.0D0/AP
+ CALL XZEXP(PTR, PTI, STR, STI)
+ CKR = STR*P1R
+ CKI = STI*P1R
+ PTR = P2R*P1R
+ PTI = -P2I*P1R
+ CALL ZMLT(CKR, CKI, PTR, PTI, CNORMR, CNORMI)
+ DO 100 I=1,N
+ STR = YR(I)*CNORMR - YI(I)*CNORMI
+ YI(I) = YR(I)*CNORMI + YI(I)*CNORMR
+ YR(I) = STR
+ 100 CONTINUE
+ RETURN
+ 110 CONTINUE
+ NZ=-2
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zmlt.f octave-2.0.14/libcruft/amos/zmlt.f
*** octave-2.0.13/libcruft/amos/zmlt.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zmlt.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,15 ----
+ SUBROUTINE ZMLT(AR, AI, BR, BI, CR, CI)
+ C***BEGIN PROLOGUE ZMLT
+ C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY
+ C
+ C DOUBLE PRECISION COMPLEX MULTIPLY, C=A*B.
+ C
+ C***ROUTINES CALLED (NONE)
+ C***END PROLOGUE ZMLT
+ DOUBLE PRECISION AR, AI, BR, BI, CR, CI, CA, CB
+ CA = AR*BR - AI*BI
+ CB = AR*BI + AI*BR
+ CR = CA
+ CI = CB
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zrati.f octave-2.0.14/libcruft/amos/zrati.f
*** octave-2.0.13/libcruft/amos/zrati.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zrati.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,132 ----
+ SUBROUTINE ZRATI(ZR, ZI, FNU, N, CYR, CYI, TOL)
+ C***BEGIN PROLOGUE ZRATI
+ C***REFER TO ZBESI,ZBESK,ZBESH
+ C
+ C ZRATI COMPUTES RATIOS OF I BESSEL FUNCTIONS BY BACKWARD
+ C RECURRENCE. THE STARTING INDEX IS DETERMINED BY FORWARD
+ C RECURRENCE AS DESCRIBED IN J. RES. OF NAT. BUR. OF STANDARDS-B,
+ C MATHEMATICAL SCIENCES, VOL 77B, P111-114, SEPTEMBER, 1973,
+ C BESSEL FUNCTIONS I AND J OF COMPLEX ARGUMENT AND INTEGER ORDER,
+ C BY D. J. SOOKNE.
+ C
+ C***ROUTINES CALLED XZABS,ZDIV
+ C***END PROLOGUE ZRATI
+ C COMPLEX Z,CY(1),CONE,CZERO,P1,P2,T1,RZ,PT,CDFNU
+ DOUBLE PRECISION AK, AMAGZ, AP1, AP2, ARG, AZ, CDFNUI, CDFNUR,
+ * CONEI, CONER, CYI, CYR, CZEROI, CZEROR, DFNU, FDNU, FLAM, FNU,
+ * FNUP, PTI, PTR, P1I, P1R, P2I, P2R, RAK, RAP1, RHO, RT2, RZI,
+ * RZR, TEST, TEST1, TOL, TTI, TTR, T1I, T1R, ZI, ZR, XZABS
+ INTEGER I, ID, IDNU, INU, ITIME, K, KK, MAGZ, N
+ DIMENSION CYR(N), CYI(N)
+ DATA CZEROR,CZEROI,CONER,CONEI,RT2/
+ 1 0.0D0, 0.0D0, 1.0D0, 0.0D0, 1.41421356237309505D0 /
+ AZ = XZABS(ZR,ZI)
+ INU = INT(SNGL(FNU))
+ IDNU = INU + N - 1
+ MAGZ = INT(SNGL(AZ))
+ AMAGZ = DBLE(FLOAT(MAGZ+1))
+ FDNU = DBLE(FLOAT(IDNU))
+ FNUP = DMAX1(AMAGZ,FDNU)
+ ID = IDNU - MAGZ - 1
+ ITIME = 1
+ K = 1
+ PTR = 1.0D0/AZ
+ RZR = PTR*(ZR+ZR)*PTR
+ RZI = -PTR*(ZI+ZI)*PTR
+ T1R = RZR*FNUP
+ T1I = RZI*FNUP
+ P2R = -T1R
+ P2I = -T1I
+ P1R = CONER
+ P1I = CONEI
+ T1R = T1R + RZR
+ T1I = T1I + RZI
+ IF (ID.GT.0) ID = 0
+ AP2 = XZABS(P2R,P2I)
+ AP1 = XZABS(P1R,P1I)
+ C-----------------------------------------------------------------------
+ C THE OVERFLOW TEST ON K(FNU+I-1,Z) BEFORE THE CALL TO CBKNU
+ C GUARANTEES THAT P2 IS ON SCALE. SCALE TEST1 AND ALL SUBSEQUENT
+ C P2 VALUES BY AP1 TO ENSURE THAT AN OVERFLOW DOES NOT OCCUR
+ C PREMATURELY.
+ C-----------------------------------------------------------------------
+ ARG = (AP2+AP2)/(AP1*TOL)
+ TEST1 = DSQRT(ARG)
+ TEST = TEST1
+ RAP1 = 1.0D0/AP1
+ P1R = P1R*RAP1
+ P1I = P1I*RAP1
+ P2R = P2R*RAP1
+ P2I = P2I*RAP1
+ AP2 = AP2*RAP1
+ 10 CONTINUE
+ K = K + 1
+ AP1 = AP2
+ PTR = P2R
+ PTI = P2I
+ P2R = P1R - (T1R*PTR-T1I*PTI)
+ P2I = P1I - (T1R*PTI+T1I*PTR)
+ P1R = PTR
+ P1I = PTI
+ T1R = T1R + RZR
+ T1I = T1I + RZI
+ AP2 = XZABS(P2R,P2I)
+ IF (AP1.LE.TEST) GO TO 10
+ IF (ITIME.EQ.2) GO TO 20
+ AK = XZABS(T1R,T1I)*0.5D0
+ FLAM = AK + DSQRT(AK*AK-1.0D0)
+ RHO = DMIN1(AP2/AP1,FLAM)
+ TEST = TEST1*DSQRT(RHO/(RHO*RHO-1.0D0))
+ ITIME = 2
+ GO TO 10
+ 20 CONTINUE
+ KK = K + 1 - ID
+ AK = DBLE(FLOAT(KK))
+ T1R = AK
+ T1I = CZEROI
+ DFNU = FNU + DBLE(FLOAT(N-1))
+ P1R = 1.0D0/AP2
+ P1I = CZEROI
+ P2R = CZEROR
+ P2I = CZEROI
+ DO 30 I=1,KK
+ PTR = P1R
+ PTI = P1I
+ RAP1 = DFNU + T1R
+ TTR = RZR*RAP1
+ TTI = RZI*RAP1
+ P1R = (PTR*TTR-PTI*TTI) + P2R
+ P1I = (PTR*TTI+PTI*TTR) + P2I
+ P2R = PTR
+ P2I = PTI
+ T1R = T1R - CONER
+ 30 CONTINUE
+ IF (P1R.NE.CZEROR .OR. P1I.NE.CZEROI) GO TO 40
+ P1R = TOL
+ P1I = TOL
+ 40 CONTINUE
+ CALL ZDIV(P2R, P2I, P1R, P1I, CYR(N), CYI(N))
+ IF (N.EQ.1) RETURN
+ K = N - 1
+ AK = DBLE(FLOAT(K))
+ T1R = AK
+ T1I = CZEROI
+ CDFNUR = FNU*RZR
+ CDFNUI = FNU*RZI
+ DO 60 I=2,N
+ PTR = CDFNUR + (T1R*RZR-T1I*RZI) + CYR(K+1)
+ PTI = CDFNUI + (T1R*RZI+T1I*RZR) + CYI(K+1)
+ AK = XZABS(PTR,PTI)
+ IF (AK.NE.CZEROR) GO TO 50
+ PTR = TOL
+ PTI = TOL
+ AK = TOL*RT2
+ 50 CONTINUE
+ RAK = CONER/AK
+ CYR(K) = RAK*PTR*RAK
+ CYI(K) = -RAK*PTI*RAK
+ T1R = T1R - CONER
+ K = K - 1
+ 60 CONTINUE
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zs1s2.f octave-2.0.14/libcruft/amos/zs1s2.f
*** octave-2.0.13/libcruft/amos/zs1s2.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zs1s2.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,49 ----
+ SUBROUTINE ZS1S2(ZRR, ZRI, S1R, S1I, S2R, S2I, NZ, ASCLE, ALIM,
+ * IUF)
+ C***BEGIN PROLOGUE ZS1S2
+ C***REFER TO ZBESK,ZAIRY
+ C
+ C ZS1S2 TESTS FOR A POSSIBLE UNDERFLOW RESULTING FROM THE
+ C ADDITION OF THE I AND K FUNCTIONS IN THE ANALYTIC CON-
+ C TINUATION FORMULA WHERE S1=K FUNCTION AND S2=I FUNCTION.
+ C ON KODE=1 THE I AND K FUNCTIONS ARE DIFFERENT ORDERS OF
+ C MAGNITUDE, BUT FOR KODE=2 THEY CAN BE OF THE SAME ORDER
+ C OF MAGNITUDE AND THE MAXIMUM MUST BE AT LEAST ONE
+ C PRECISION ABOVE THE UNDERFLOW LIMIT.
+ C
+ C***ROUTINES CALLED XZABS,XZEXP,XZLOG
+ C***END PROLOGUE ZS1S2
+ C COMPLEX CZERO,C1,S1,S1D,S2,ZR
+ DOUBLE PRECISION AA, ALIM, ALN, ASCLE, AS1, AS2, C1I, C1R, S1DI,
+ * S1DR, S1I, S1R, S2I, S2R, ZEROI, ZEROR, ZRI, ZRR, XZABS
+ INTEGER IUF, IDUM, NZ
+ DATA ZEROR,ZEROI / 0.0D0 , 0.0D0 /
+ NZ = 0
+ AS1 = XZABS(S1R,S1I)
+ AS2 = XZABS(S2R,S2I)
+ IF (S1R.EQ.0.0D0 .AND. S1I.EQ.0.0D0) GO TO 10
+ IF (AS1.EQ.0.0D0) GO TO 10
+ ALN = -ZRR - ZRR + DLOG(AS1)
+ S1DR = S1R
+ S1DI = S1I
+ S1R = ZEROR
+ S1I = ZEROI
+ AS1 = ZEROR
+ IF (ALN.LT.(-ALIM)) GO TO 10
+ CALL XZLOG(S1DR, S1DI, C1R, C1I, IDUM)
+ C1R = C1R - ZRR - ZRR
+ C1I = C1I - ZRI - ZRI
+ CALL XZEXP(C1R, C1I, S1R, S1I)
+ AS1 = XZABS(S1R,S1I)
+ IUF = IUF + 1
+ 10 CONTINUE
+ AA = DMAX1(AS1,AS2)
+ IF (AA.GT.ASCLE) RETURN
+ S1R = ZEROR
+ S1I = ZEROI
+ S2R = ZEROR
+ S2I = ZEROI
+ NZ = 1
+ IUF = 0
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zseri.f octave-2.0.14/libcruft/amos/zseri.f
*** octave-2.0.13/libcruft/amos/zseri.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zseri.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,190 ----
+ SUBROUTINE ZSERI(ZR, ZI, FNU, KODE, N, YR, YI, NZ, TOL, ELIM,
+ * ALIM)
+ C***BEGIN PROLOGUE ZSERI
+ C***REFER TO ZBESI,ZBESK
+ C
+ C ZSERI COMPUTES THE I BESSEL FUNCTION FOR REAL(Z).GE.0.0 BY
+ C MEANS OF THE POWER SERIES FOR LARGE CABS(Z) IN THE
+ C REGION CABS(Z).LE.2*SQRT(FNU+1). NZ=0 IS A NORMAL RETURN.
+ C NZ.GT.0 MEANS THAT THE LAST NZ COMPONENTS WERE SET TO ZERO
+ C DUE TO UNDERFLOW. NZ.LT.0 MEANS UNDERFLOW OCCURRED, BUT THE
+ C CONDITION CABS(Z).LE.2*SQRT(FNU+1) WAS VIOLATED AND THE
+ C COMPUTATION MUST BE COMPLETED IN ANOTHER ROUTINE WITH N=N-ABS(NZ).
+ C
+ C***ROUTINES CALLED DGAMLN,D1MACH,ZUCHK,XZABS,ZDIV,XZLOG,ZMLT
+ C***END PROLOGUE ZSERI
+ C COMPLEX AK1,CK,COEF,CONE,CRSC,CSCL,CZ,CZERO,HZ,RZ,S1,S2,Y,Z
+ DOUBLE PRECISION AA, ACZ, AK, AK1I, AK1R, ALIM, ARM, ASCLE, ATOL,
+ * AZ, CKI, CKR, COEFI, COEFR, CONEI, CONER, CRSCR, CZI, CZR, DFNU,
+ * ELIM, FNU, FNUP, HZI, HZR, RAZ, RS, RTR1, RZI, RZR, S, SS, STI,
+ * STR, S1I, S1R, S2I, S2R, TOL, YI, YR, WI, WR, ZEROI, ZEROR, ZI,
+ * ZR, DGAMLN, D1MACH, XZABS
+ INTEGER I, IB, IDUM, IFLAG, IL, K, KODE, L, M, N, NN, NZ, NW
+ DIMENSION YR(N), YI(N), WR(2), WI(2)
+ DATA ZEROR,ZEROI,CONER,CONEI / 0.0D0, 0.0D0, 1.0D0, 0.0D0 /
+ C
+ NZ = 0
+ AZ = XZABS(ZR,ZI)
+ IF (AZ.EQ.0.0D0) GO TO 160
+ ARM = 1.0D+3*D1MACH(1)
+ RTR1 = DSQRT(ARM)
+ CRSCR = 1.0D0
+ IFLAG = 0
+ IF (AZ.LT.ARM) GO TO 150
+ HZR = 0.5D0*ZR
+ HZI = 0.5D0*ZI
+ CZR = ZEROR
+ CZI = ZEROI
+ IF (AZ.LE.RTR1) GO TO 10
+ CALL ZMLT(HZR, HZI, HZR, HZI, CZR, CZI)
+ 10 CONTINUE
+ ACZ = XZABS(CZR,CZI)
+ NN = N
+ CALL XZLOG(HZR, HZI, CKR, CKI, IDUM)
+ 20 CONTINUE
+ DFNU = FNU + DBLE(FLOAT(NN-1))
+ FNUP = DFNU + 1.0D0
+ C-----------------------------------------------------------------------
+ C UNDERFLOW TEST
+ C-----------------------------------------------------------------------
+ AK1R = CKR*DFNU
+ AK1I = CKI*DFNU
+ AK = DGAMLN(FNUP,IDUM)
+ AK1R = AK1R - AK
+ IF (KODE.EQ.2) AK1R = AK1R - ZR
+ IF (AK1R.GT.(-ELIM)) GO TO 40
+ 30 CONTINUE
+ NZ = NZ + 1
+ YR(NN) = ZEROR
+ YI(NN) = ZEROI
+ IF (ACZ.GT.DFNU) GO TO 190
+ NN = NN - 1
+ IF (NN.EQ.0) RETURN
+ GO TO 20
+ 40 CONTINUE
+ IF (AK1R.GT.(-ALIM)) GO TO 50
+ IFLAG = 1
+ SS = 1.0D0/TOL
+ CRSCR = TOL
+ ASCLE = ARM*SS
+ 50 CONTINUE
+ AA = DEXP(AK1R)
+ IF (IFLAG.EQ.1) AA = AA*SS
+ COEFR = AA*DCOS(AK1I)
+ COEFI = AA*DSIN(AK1I)
+ ATOL = TOL*ACZ/FNUP
+ IL = MIN0(2,NN)
+ DO 90 I=1,IL
+ DFNU = FNU + DBLE(FLOAT(NN-I))
+ FNUP = DFNU + 1.0D0
+ S1R = CONER
+ S1I = CONEI
+ IF (ACZ.LT.TOL*FNUP) GO TO 70
+ AK1R = CONER
+ AK1I = CONEI
+ AK = FNUP + 2.0D0
+ S = FNUP
+ AA = 2.0D0
+ 60 CONTINUE
+ RS = 1.0D0/S
+ STR = AK1R*CZR - AK1I*CZI
+ STI = AK1R*CZI + AK1I*CZR
+ AK1R = STR*RS
+ AK1I = STI*RS
+ S1R = S1R + AK1R
+ S1I = S1I + AK1I
+ S = S + AK
+ AK = AK + 2.0D0
+ AA = AA*ACZ*RS
+ IF (AA.GT.ATOL) GO TO 60
+ 70 CONTINUE
+ S2R = S1R*COEFR - S1I*COEFI
+ S2I = S1R*COEFI + S1I*COEFR
+ WR(I) = S2R
+ WI(I) = S2I
+ IF (IFLAG.EQ.0) GO TO 80
+ CALL ZUCHK(S2R, S2I, NW, ASCLE, TOL)
+ IF (NW.NE.0) GO TO 30
+ 80 CONTINUE
+ M = NN - I + 1
+ YR(M) = S2R*CRSCR
+ YI(M) = S2I*CRSCR
+ IF (I.EQ.IL) GO TO 90
+ CALL ZDIV(COEFR, COEFI, HZR, HZI, STR, STI)
+ COEFR = STR*DFNU
+ COEFI = STI*DFNU
+ 90 CONTINUE
+ IF (NN.LE.2) RETURN
+ K = NN - 2
+ AK = DBLE(FLOAT(K))
+ RAZ = 1.0D0/AZ
+ STR = ZR*RAZ
+ STI = -ZI*RAZ
+ RZR = (STR+STR)*RAZ
+ RZI = (STI+STI)*RAZ
+ IF (IFLAG.EQ.1) GO TO 120
+ IB = 3
+ 100 CONTINUE
+ DO 110 I=IB,NN
+ YR(K) = (AK+FNU)*(RZR*YR(K+1)-RZI*YI(K+1)) + YR(K+2)
+ YI(K) = (AK+FNU)*(RZR*YI(K+1)+RZI*YR(K+1)) + YI(K+2)
+ AK = AK - 1.0D0
+ K = K - 1
+ 110 CONTINUE
+ RETURN
+ C-----------------------------------------------------------------------
+ C RECUR BACKWARD WITH SCALED VALUES
+ C-----------------------------------------------------------------------
+ 120 CONTINUE
+ C-----------------------------------------------------------------------
+ C EXP(-ALIM)=EXP(-ELIM)/TOL=APPROX. ONE PRECISION ABOVE THE
+ C UNDERFLOW LIMIT = ASCLE = D1MACH(1)*SS*1.0D+3
+ C-----------------------------------------------------------------------
+ S1R = WR(1)
+ S1I = WI(1)
+ S2R = WR(2)
+ S2I = WI(2)
+ DO 130 L=3,NN
+ CKR = S2R
+ CKI = S2I
+ S2R = S1R + (AK+FNU)*(RZR*CKR-RZI*CKI)
+ S2I = S1I + (AK+FNU)*(RZR*CKI+RZI*CKR)
+ S1R = CKR
+ S1I = CKI
+ CKR = S2R*CRSCR
+ CKI = S2I*CRSCR
+ YR(K) = CKR
+ YI(K) = CKI
+ AK = AK - 1.0D0
+ K = K - 1
+ IF (XZABS(CKR,CKI).GT.ASCLE) GO TO 140
+ 130 CONTINUE
+ RETURN
+ 140 CONTINUE
+ IB = L + 1
+ IF (IB.GT.NN) RETURN
+ GO TO 100
+ 150 CONTINUE
+ NZ = N
+ IF (FNU.EQ.0.0D0) NZ = NZ - 1
+ 160 CONTINUE
+ YR(1) = ZEROR
+ YI(1) = ZEROI
+ IF (FNU.NE.0.0D0) GO TO 170
+ YR(1) = CONER
+ YI(1) = CONEI
+ 170 CONTINUE
+ IF (N.EQ.1) RETURN
+ DO 180 I=2,N
+ YR(I) = ZEROR
+ YI(I) = ZEROI
+ 180 CONTINUE
+ RETURN
+ C-----------------------------------------------------------------------
+ C RETURN WITH NZ.LT.0 IF CABS(Z*Z/4).GT.FNU+N-NZ-1 COMPLETE
+ C THE CALCULATION IN CBINU WITH N=N-IABS(NZ)
+ C-----------------------------------------------------------------------
+ 190 CONTINUE
+ NZ = -NZ
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zshch.f octave-2.0.14/libcruft/amos/zshch.f
*** octave-2.0.13/libcruft/amos/zshch.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zshch.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,22 ----
+ SUBROUTINE ZSHCH(ZR, ZI, CSHR, CSHI, CCHR, CCHI)
+ C***BEGIN PROLOGUE ZSHCH
+ C***REFER TO ZBESK,ZBESH
+ C
+ C ZSHCH COMPUTES THE COMPLEX HYPERBOLIC FUNCTIONS CSH=SINH(X+I*Y)
+ C AND CCH=COSH(X+I*Y), WHERE I**2=-1.
+ C
+ C***ROUTINES CALLED (NONE)
+ C***END PROLOGUE ZSHCH
+ C
+ DOUBLE PRECISION CCHI, CCHR, CH, CN, CSHI, CSHR, SH, SN, ZI, ZR,
+ * DCOSH, DSINH
+ SH = DSINH(ZR)
+ CH = DCOSH(ZR)
+ SN = DSIN(ZI)
+ CN = DCOS(ZI)
+ CSHR = SH*CN
+ CSHI = CH*SN
+ CCHR = CH*CN
+ CCHI = SH*SN
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zuchk.f octave-2.0.14/libcruft/amos/zuchk.f
*** octave-2.0.13/libcruft/amos/zuchk.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zuchk.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,28 ----
+ SUBROUTINE ZUCHK(YR, YI, NZ, ASCLE, TOL)
+ C***BEGIN PROLOGUE ZUCHK
+ C***REFER TO ZSERI,ZUOIK,ZUNK1,ZUNK2,ZUNI1,ZUNI2,ZKSCL
+ C
+ C Y ENTERS AS A SCALED QUANTITY WHOSE MAGNITUDE IS GREATER THAN
+ C EXP(-ALIM)=ASCLE=1.0E+3*D1MACH(1)/TOL. THE TEST IS MADE TO SEE
+ C IF THE MAGNITUDE OF THE REAL OR IMAGINARY PART WOULD UNDERFLOW
+ C WHEN Y IS SCALED (BY TOL) TO ITS PROPER VALUE. Y IS ACCEPTED
+ C IF THE UNDERFLOW IS AT LEAST ONE PRECISION BELOW THE MAGNITUDE
+ C OF THE LARGEST COMPONENT; OTHERWISE THE PHASE ANGLE DOES NOT HAVE
+ C ABSOLUTE ACCURACY AND AN UNDERFLOW IS ASSUMED.
+ C
+ C***ROUTINES CALLED (NONE)
+ C***END PROLOGUE ZUCHK
+ C
+ C COMPLEX Y
+ DOUBLE PRECISION ASCLE, SS, ST, TOL, WR, WI, YR, YI
+ INTEGER NZ
+ NZ = 0
+ WR = DABS(YR)
+ WI = DABS(YI)
+ ST = DMIN1(WR,WI)
+ IF (ST.GT.ASCLE) RETURN
+ SS = DMAX1(WR,WI)
+ ST = ST/TOL
+ IF (SS.LT.ST) NZ = 1
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zunhj.f octave-2.0.14/libcruft/amos/zunhj.f
*** octave-2.0.13/libcruft/amos/zunhj.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zunhj.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,714 ----
+ SUBROUTINE ZUNHJ(ZR, ZI, FNU, IPMTR, TOL, PHIR, PHII, ARGR, ARGI,
+ * ZETA1R, ZETA1I, ZETA2R, ZETA2I, ASUMR, ASUMI, BSUMR, BSUMI)
+ C***BEGIN PROLOGUE ZUNHJ
+ C***REFER TO ZBESI,ZBESK
+ C
+ C REFERENCES
+ C HANDBOOK OF MATHEMATICAL FUNCTIONS BY M. ABRAMOWITZ AND I.A.
+ C STEGUN, AMS55, NATIONAL BUREAU OF STANDARDS, 1965, CHAPTER 9.
+ C
+ C ASYMPTOTICS AND SPECIAL FUNCTIONS BY F.W.J. OLVER, ACADEMIC
+ C PRESS, N.Y., 1974, PAGE 420
+ C
+ C ABSTRACT
+ C ZUNHJ COMPUTES PARAMETERS FOR BESSEL FUNCTIONS C(FNU,Z) =
+ C J(FNU,Z), Y(FNU,Z) OR H(I,FNU,Z) I=1,2 FOR LARGE ORDERS FNU
+ C BY MEANS OF THE UNIFORM ASYMPTOTIC EXPANSION
+ C
+ C C(FNU,Z)=C1*PHI*( ASUM*AIRY(ARG) + C2*BSUM*DAIRY(ARG) )
+ C
+ C FOR PROPER CHOICES OF C1, C2, AIRY AND DAIRY WHERE AIRY IS
+ C AN AIRY FUNCTION AND DAIRY IS ITS DERIVATIVE.
+ C
+ C (2/3)*FNU*ZETA**1.5 = ZETA1-ZETA2,
+ C
+ C ZETA1=0.5*FNU*CLOG((1+W)/(1-W)), ZETA2=FNU*W FOR SCALING
+ C PURPOSES IN AIRY FUNCTIONS FROM CAIRY OR CBIRY.
+ C
+ C MCONJ=SIGN OF AIMAG(Z), BUT IS AMBIGUOUS WHEN Z IS REAL AND
+ C MUST BE SPECIFIED. IPMTR=0 RETURNS ALL PARAMETERS. IPMTR=
+ C 1 COMPUTES ALL EXCEPT ASUM AND BSUM.
+ C
+ C***ROUTINES CALLED XZABS,ZDIV,XZLOG,XZSQRT,D1MACH
+ C***END PROLOGUE ZUNHJ
+ C COMPLEX ARG,ASUM,BSUM,CFNU,CONE,CR,CZERO,DR,P,PHI,PRZTH,PTFN,
+ C *RFN13,RTZTA,RZTH,SUMA,SUMB,TFN,T2,UP,W,W2,Z,ZA,ZB,ZC,ZETA,ZETA1,
+ C *ZETA2,ZTH
+ DOUBLE PRECISION ALFA, ANG, AP, AR, ARGI, ARGR, ASUMI, ASUMR,
+ * ATOL, AW2, AZTH, BETA, BR, BSUMI, BSUMR, BTOL, C, CONEI, CONER,
+ * CRI, CRR, DRI, DRR, EX1, EX2, FNU, FN13, FN23, GAMA, GPI, HPI,
+ * PHII, PHIR, PI, PP, PR, PRZTHI, PRZTHR, PTFNI, PTFNR, RAW, RAW2,
+ * RAZTH, RFNU, RFNU2, RFN13, RTZTI, RTZTR, RZTHI, RZTHR, STI, STR,
+ * SUMAI, SUMAR, SUMBI, SUMBR, TEST, TFNI, TFNR, THPI, TOL, TZAI,
+ * TZAR, T2I, T2R, UPI, UPR, WI, WR, W2I, W2R, ZAI, ZAR, ZBI, ZBR,
+ * ZCI, ZCR, ZEROI, ZEROR, ZETAI, ZETAR, ZETA1I, ZETA1R, ZETA2I,
+ * ZETA2R, ZI, ZR, ZTHI, ZTHR, XZABS, AC, D1MACH
+ INTEGER IAS, IBS, IPMTR, IS, J, JR, JU, K, KMAX, KP1, KS, L, LR,
+ * LRP1, L1, L2, M, IDUM
+ DIMENSION AR(14), BR(14), C(105), ALFA(180), BETA(210), GAMA(30),
+ * AP(30), PR(30), PI(30), UPR(14), UPI(14), CRR(14), CRI(14),
+ * DRR(14), DRI(14)
+ DATA AR(1), AR(2), AR(3), AR(4), AR(5), AR(6), AR(7), AR(8),
+ 1 AR(9), AR(10), AR(11), AR(12), AR(13), AR(14)/
+ 2 1.00000000000000000D+00, 1.04166666666666667D-01,
+ 3 8.35503472222222222D-02, 1.28226574556327160D-01,
+ 4 2.91849026464140464D-01, 8.81627267443757652D-01,
+ 5 3.32140828186276754D+00, 1.49957629868625547D+01,
+ 6 7.89230130115865181D+01, 4.74451538868264323D+02,
+ 7 3.20749009089066193D+03, 2.40865496408740049D+04,
+ 8 1.98923119169509794D+05, 1.79190200777534383D+06/
+ DATA BR(1), BR(2), BR(3), BR(4), BR(5), BR(6), BR(7), BR(8),
+ 1 BR(9), BR(10), BR(11), BR(12), BR(13), BR(14)/
+ 2 1.00000000000000000D+00, -1.45833333333333333D-01,
+ 3 -9.87413194444444444D-02, -1.43312053915895062D-01,
+ 4 -3.17227202678413548D-01, -9.42429147957120249D-01,
+ 5 -3.51120304082635426D+00, -1.57272636203680451D+01,
+ 6 -8.22814390971859444D+01, -4.92355370523670524D+02,
+ 7 -3.31621856854797251D+03, -2.48276742452085896D+04,
+ 8 -2.04526587315129788D+05, -1.83844491706820990D+06/
+ DATA C(1), C(2), C(3), C(4), C(5), C(6), C(7), C(8), C(9), C(10),
+ 1 C(11), C(12), C(13), C(14), C(15), C(16), C(17), C(18),
+ 2 C(19), C(20), C(21), C(22), C(23), C(24)/
+ 3 1.00000000000000000D+00, -2.08333333333333333D-01,
+ 4 1.25000000000000000D-01, 3.34201388888888889D-01,
+ 5 -4.01041666666666667D-01, 7.03125000000000000D-02,
+ 6 -1.02581259645061728D+00, 1.84646267361111111D+00,
+ 7 -8.91210937500000000D-01, 7.32421875000000000D-02,
+ 8 4.66958442342624743D+00, -1.12070026162229938D+01,
+ 9 8.78912353515625000D+00, -2.36408691406250000D+00,
+ A 1.12152099609375000D-01, -2.82120725582002449D+01,
+ B 8.46362176746007346D+01, -9.18182415432400174D+01,
+ C 4.25349987453884549D+01, -7.36879435947963170D+00,
+ D 2.27108001708984375D-01, 2.12570130039217123D+02,
+ E -7.65252468141181642D+02, 1.05999045252799988D+03/
+ DATA C(25), C(26), C(27), C(28), C(29), C(30), C(31), C(32),
+ 1 C(33), C(34), C(35), C(36), C(37), C(38), C(39), C(40),
+ 2 C(41), C(42), C(43), C(44), C(45), C(46), C(47), C(48)/
+ 3 -6.99579627376132541D+02, 2.18190511744211590D+02,
+ 4 -2.64914304869515555D+01, 5.72501420974731445D-01,
+ 5 -1.91945766231840700D+03, 8.06172218173730938D+03,
+ 6 -1.35865500064341374D+04, 1.16553933368645332D+04,
+ 7 -5.30564697861340311D+03, 1.20090291321635246D+03,
+ 8 -1.08090919788394656D+02, 1.72772750258445740D+00,
+ 9 2.02042913309661486D+04, -9.69805983886375135D+04,
+ A 1.92547001232531532D+05, -2.03400177280415534D+05,
+ B 1.22200464983017460D+05, -4.11926549688975513D+04,
+ C 7.10951430248936372D+03, -4.93915304773088012D+02,
+ D 6.07404200127348304D+00, -2.42919187900551333D+05,
+ E 1.31176361466297720D+06, -2.99801591853810675D+06/
+ DATA C(49), C(50), C(51), C(52), C(53), C(54), C(55), C(56),
+ 1 C(57), C(58), C(59), C(60), C(61), C(62), C(63), C(64),
+ 2 C(65), C(66), C(67), C(68), C(69), C(70), C(71), C(72)/
+ 3 3.76327129765640400D+06, -2.81356322658653411D+06,
+ 4 1.26836527332162478D+06, -3.31645172484563578D+05,
+ 5 4.52187689813627263D+04, -2.49983048181120962D+03,
+ 6 2.43805296995560639D+01, 3.28446985307203782D+06,
+ 7 -1.97068191184322269D+07, 5.09526024926646422D+07,
+ 8 -7.41051482115326577D+07, 6.63445122747290267D+07,
+ 9 -3.75671766607633513D+07, 1.32887671664218183D+07,
+ A -2.78561812808645469D+06, 3.08186404612662398D+05,
+ B -1.38860897537170405D+04, 1.10017140269246738D+02,
+ C -4.93292536645099620D+07, 3.25573074185765749D+08,
+ D -9.39462359681578403D+08, 1.55359689957058006D+09,
+ E -1.62108055210833708D+09, 1.10684281682301447D+09/
+ DATA C(73), C(74), C(75), C(76), C(77), C(78), C(79), C(80),
+ 1 C(81), C(82), C(83), C(84), C(85), C(86), C(87), C(88),
+ 2 C(89), C(90), C(91), C(92), C(93), C(94), C(95), C(96)/
+ 3 -4.95889784275030309D+08, 1.42062907797533095D+08,
+ 4 -2.44740627257387285D+07, 2.24376817792244943D+06,
+ 5 -8.40054336030240853D+04, 5.51335896122020586D+02,
+ 6 8.14789096118312115D+08, -5.86648149205184723D+09,
+ 7 1.86882075092958249D+10, -3.46320433881587779D+10,
+ 8 4.12801855797539740D+10, -3.30265997498007231D+10,
+ 9 1.79542137311556001D+10, -6.56329379261928433D+09,
+ A 1.55927986487925751D+09, -2.25105661889415278D+08,
+ B 1.73951075539781645D+07, -5.49842327572288687D+05,
+ C 3.03809051092238427D+03, -1.46792612476956167D+10,
+ D 1.14498237732025810D+11, -3.99096175224466498D+11,
+ E 8.19218669548577329D+11, -1.09837515608122331D+12/
+ DATA C(97), C(98), C(99), C(100), C(101), C(102), C(103), C(104),
+ 1 C(105)/
+ 2 1.00815810686538209D+12, -6.45364869245376503D+11,
+ 3 2.87900649906150589D+11, -8.78670721780232657D+10,
+ 4 1.76347306068349694D+10, -2.16716498322379509D+09,
+ 5 1.43157876718888981D+08, -3.87183344257261262D+06,
+ 6 1.82577554742931747D+04/
+ DATA ALFA(1), ALFA(2), ALFA(3), ALFA(4), ALFA(5), ALFA(6),
+ 1 ALFA(7), ALFA(8), ALFA(9), ALFA(10), ALFA(11), ALFA(12),
+ 2 ALFA(13), ALFA(14), ALFA(15), ALFA(16), ALFA(17), ALFA(18),
+ 3 ALFA(19), ALFA(20), ALFA(21), ALFA(22)/
+ 4 -4.44444444444444444D-03, -9.22077922077922078D-04,
+ 5 -8.84892884892884893D-05, 1.65927687832449737D-04,
+ 6 2.46691372741792910D-04, 2.65995589346254780D-04,
+ 7 2.61824297061500945D-04, 2.48730437344655609D-04,
+ 8 2.32721040083232098D-04, 2.16362485712365082D-04,
+ 9 2.00738858762752355D-04, 1.86267636637545172D-04,
+ A 1.73060775917876493D-04, 1.61091705929015752D-04,
+ B 1.50274774160908134D-04, 1.40503497391269794D-04,
+ C 1.31668816545922806D-04, 1.23667445598253261D-04,
+ D 1.16405271474737902D-04, 1.09798298372713369D-04,
+ E 1.03772410422992823D-04, 9.82626078369363448D-05/
+ DATA ALFA(23), ALFA(24), ALFA(25), ALFA(26), ALFA(27), ALFA(28),
+ 1 ALFA(29), ALFA(30), ALFA(31), ALFA(32), ALFA(33), ALFA(34),
+ 2 ALFA(35), ALFA(36), ALFA(37), ALFA(38), ALFA(39), ALFA(40),
+ 3 ALFA(41), ALFA(42), ALFA(43), ALFA(44)/
+ 4 9.32120517249503256D-05, 8.85710852478711718D-05,
+ 5 8.42963105715700223D-05, 8.03497548407791151D-05,
+ 6 7.66981345359207388D-05, 7.33122157481777809D-05,
+ 7 7.01662625163141333D-05, 6.72375633790160292D-05,
+ 8 6.93735541354588974D-04, 2.32241745182921654D-04,
+ 9 -1.41986273556691197D-05, -1.16444931672048640D-04,
+ A -1.50803558053048762D-04, -1.55121924918096223D-04,
+ B -1.46809756646465549D-04, -1.33815503867491367D-04,
+ C -1.19744975684254051D-04, -1.06184319207974020D-04,
+ D -9.37699549891194492D-05, -8.26923045588193274D-05,
+ E -7.29374348155221211D-05, -6.44042357721016283D-05/
+ DATA ALFA(45), ALFA(46), ALFA(47), ALFA(48), ALFA(49), ALFA(50),
+ 1 ALFA(51), ALFA(52), ALFA(53), ALFA(54), ALFA(55), ALFA(56),
+ 2 ALFA(57), ALFA(58), ALFA(59), ALFA(60), ALFA(61), ALFA(62),
+ 3 ALFA(63), ALFA(64), ALFA(65), ALFA(66)/
+ 4 -5.69611566009369048D-05, -5.04731044303561628D-05,
+ 5 -4.48134868008882786D-05, -3.98688727717598864D-05,
+ 6 -3.55400532972042498D-05, -3.17414256609022480D-05,
+ 7 -2.83996793904174811D-05, -2.54522720634870566D-05,
+ 8 -2.28459297164724555D-05, -2.05352753106480604D-05,
+ 9 -1.84816217627666085D-05, -1.66519330021393806D-05,
+ A -1.50179412980119482D-05, -1.35554031379040526D-05,
+ B -1.22434746473858131D-05, -1.10641884811308169D-05,
+ C -3.54211971457743841D-04, -1.56161263945159416D-04,
+ D 3.04465503594936410D-05, 1.30198655773242693D-04,
+ E 1.67471106699712269D-04, 1.70222587683592569D-04/
+ DATA ALFA(67), ALFA(68), ALFA(69), ALFA(70), ALFA(71), ALFA(72),
+ 1 ALFA(73), ALFA(74), ALFA(75), ALFA(76), ALFA(77), ALFA(78),
+ 2 ALFA(79), ALFA(80), ALFA(81), ALFA(82), ALFA(83), ALFA(84),
+ 3 ALFA(85), ALFA(86), ALFA(87), ALFA(88)/
+ 4 1.56501427608594704D-04, 1.36339170977445120D-04,
+ 5 1.14886692029825128D-04, 9.45869093034688111D-05,
+ 6 7.64498419250898258D-05, 6.07570334965197354D-05,
+ 7 4.74394299290508799D-05, 3.62757512005344297D-05,
+ 8 2.69939714979224901D-05, 1.93210938247939253D-05,
+ 9 1.30056674793963203D-05, 7.82620866744496661D-06,
+ A 3.59257485819351583D-06, 1.44040049814251817D-07,
+ B -2.65396769697939116D-06, -4.91346867098485910D-06,
+ C -6.72739296091248287D-06, -8.17269379678657923D-06,
+ D -9.31304715093561232D-06, -1.02011418798016441D-05,
+ E -1.08805962510592880D-05, -1.13875481509603555D-05/
+ DATA ALFA(89), ALFA(90), ALFA(91), ALFA(92), ALFA(93), ALFA(94),
+ 1 ALFA(95), ALFA(96), ALFA(97), ALFA(98), ALFA(99), ALFA(100),
+ 2 ALFA(101), ALFA(102), ALFA(103), ALFA(104), ALFA(105),
+ 3 ALFA(106), ALFA(107), ALFA(108), ALFA(109), ALFA(110)/
+ 4 -1.17519675674556414D-05, -1.19987364870944141D-05,
+ 5 3.78194199201772914D-04, 2.02471952761816167D-04,
+ 6 -6.37938506318862408D-05, -2.38598230603005903D-04,
+ 7 -3.10916256027361568D-04, -3.13680115247576316D-04,
+ 8 -2.78950273791323387D-04, -2.28564082619141374D-04,
+ 9 -1.75245280340846749D-04, -1.25544063060690348D-04,
+ A -8.22982872820208365D-05, -4.62860730588116458D-05,
+ B -1.72334302366962267D-05, 5.60690482304602267D-06,
+ C 2.31395443148286800D-05, 3.62642745856793957D-05,
+ D 4.58006124490188752D-05, 5.24595294959114050D-05,
+ E 5.68396208545815266D-05, 5.94349820393104052D-05/
+ DATA ALFA(111), ALFA(112), ALFA(113), ALFA(114), ALFA(115),
+ 1 ALFA(116), ALFA(117), ALFA(118), ALFA(119), ALFA(120),
+ 2 ALFA(121), ALFA(122), ALFA(123), ALFA(124), ALFA(125),
+ 3 ALFA(126), ALFA(127), ALFA(128), ALFA(129), ALFA(130)/
+ 4 6.06478527578421742D-05, 6.08023907788436497D-05,
+ 5 6.01577894539460388D-05, 5.89199657344698500D-05,
+ 6 5.72515823777593053D-05, 5.52804375585852577D-05,
+ 7 5.31063773802880170D-05, 5.08069302012325706D-05,
+ 8 4.84418647620094842D-05, 4.60568581607475370D-05,
+ 9 -6.91141397288294174D-04, -4.29976633058871912D-04,
+ A 1.83067735980039018D-04, 6.60088147542014144D-04,
+ B 8.75964969951185931D-04, 8.77335235958235514D-04,
+ C 7.49369585378990637D-04, 5.63832329756980918D-04,
+ D 3.68059319971443156D-04, 1.88464535514455599D-04/
+ DATA ALFA(131), ALFA(132), ALFA(133), ALFA(134), ALFA(135),
+ 1 ALFA(136), ALFA(137), ALFA(138), ALFA(139), ALFA(140),
+ 2 ALFA(141), ALFA(142), ALFA(143), ALFA(144), ALFA(145),
+ 3 ALFA(146), ALFA(147), ALFA(148), ALFA(149), ALFA(150)/
+ 4 3.70663057664904149D-05, -8.28520220232137023D-05,
+ 5 -1.72751952869172998D-04, -2.36314873605872983D-04,
+ 6 -2.77966150694906658D-04, -3.02079514155456919D-04,
+ 7 -3.12594712643820127D-04, -3.12872558758067163D-04,
+ 8 -3.05678038466324377D-04, -2.93226470614557331D-04,
+ 9 -2.77255655582934777D-04, -2.59103928467031709D-04,
+ A -2.39784014396480342D-04, -2.20048260045422848D-04,
+ B -2.00443911094971498D-04, -1.81358692210970687D-04,
+ C -1.63057674478657464D-04, -1.45712672175205844D-04,
+ D -1.29425421983924587D-04, -1.14245691942445952D-04/
+ DATA ALFA(151), ALFA(152), ALFA(153), ALFA(154), ALFA(155),
+ 1 ALFA(156), ALFA(157), ALFA(158), ALFA(159), ALFA(160),
+ 2 ALFA(161), ALFA(162), ALFA(163), ALFA(164), ALFA(165),
+ 3 ALFA(166), ALFA(167), ALFA(168), ALFA(169), ALFA(170)/
+ 4 1.92821964248775885D-03, 1.35592576302022234D-03,
+ 5 -7.17858090421302995D-04, -2.58084802575270346D-03,
+ 6 -3.49271130826168475D-03, -3.46986299340960628D-03,
+ 7 -2.82285233351310182D-03, -1.88103076404891354D-03,
+ 8 -8.89531718383947600D-04, 3.87912102631035228D-06,
+ 9 7.28688540119691412D-04, 1.26566373053457758D-03,
+ A 1.62518158372674427D-03, 1.83203153216373172D-03,
+ B 1.91588388990527909D-03, 1.90588846755546138D-03,
+ C 1.82798982421825727D-03, 1.70389506421121530D-03,
+ D 1.55097127171097686D-03, 1.38261421852276159D-03/
+ DATA ALFA(171), ALFA(172), ALFA(173), ALFA(174), ALFA(175),
+ 1 ALFA(176), ALFA(177), ALFA(178), ALFA(179), ALFA(180)/
+ 2 1.20881424230064774D-03, 1.03676532638344962D-03,
+ 3 8.71437918068619115D-04, 7.16080155297701002D-04,
+ 4 5.72637002558129372D-04, 4.42089819465802277D-04,
+ 5 3.24724948503090564D-04, 2.20342042730246599D-04,
+ 6 1.28412898401353882D-04, 4.82005924552095464D-05/
+ DATA BETA(1), BETA(2), BETA(3), BETA(4), BETA(5), BETA(6),
+ 1 BETA(7), BETA(8), BETA(9), BETA(10), BETA(11), BETA(12),
+ 2 BETA(13), BETA(14), BETA(15), BETA(16), BETA(17), BETA(18),
+ 3 BETA(19), BETA(20), BETA(21), BETA(22)/
+ 4 1.79988721413553309D-02, 5.59964911064388073D-03,
+ 5 2.88501402231132779D-03, 1.80096606761053941D-03,
+ 6 1.24753110589199202D-03, 9.22878876572938311D-04,
+ 7 7.14430421727287357D-04, 5.71787281789704872D-04,
+ 8 4.69431007606481533D-04, 3.93232835462916638D-04,
+ 9 3.34818889318297664D-04, 2.88952148495751517D-04,
+ A 2.52211615549573284D-04, 2.22280580798883327D-04,
+ B 1.97541838033062524D-04, 1.76836855019718004D-04,
+ C 1.59316899661821081D-04, 1.44347930197333986D-04,
+ D 1.31448068119965379D-04, 1.20245444949302884D-04,
+ E 1.10449144504599392D-04, 1.01828770740567258D-04/
+ DATA BETA(23), BETA(24), BETA(25), BETA(26), BETA(27), BETA(28),
+ 1 BETA(29), BETA(30), BETA(31), BETA(32), BETA(33), BETA(34),
+ 2 BETA(35), BETA(36), BETA(37), BETA(38), BETA(39), BETA(40),
+ 3 BETA(41), BETA(42), BETA(43), BETA(44)/
+ 4 9.41998224204237509D-05, 8.74130545753834437D-05,
+ 5 8.13466262162801467D-05, 7.59002269646219339D-05,
+ 6 7.09906300634153481D-05, 6.65482874842468183D-05,
+ 7 6.25146958969275078D-05, 5.88403394426251749D-05,
+ 8 -1.49282953213429172D-03, -8.78204709546389328D-04,
+ 9 -5.02916549572034614D-04, -2.94822138512746025D-04,
+ A -1.75463996970782828D-04, -1.04008550460816434D-04,
+ B -5.96141953046457895D-05, -3.12038929076098340D-05,
+ C -1.26089735980230047D-05, -2.42892608575730389D-07,
+ D 8.05996165414273571D-06, 1.36507009262147391D-05,
+ E 1.73964125472926261D-05, 1.98672978842133780D-05/
+ DATA BETA(45), BETA(46), BETA(47), BETA(48), BETA(49), BETA(50),
+ 1 BETA(51), BETA(52), BETA(53), BETA(54), BETA(55), BETA(56),
+ 2 BETA(57), BETA(58), BETA(59), BETA(60), BETA(61), BETA(62),
+ 3 BETA(63), BETA(64), BETA(65), BETA(66)/
+ 4 2.14463263790822639D-05, 2.23954659232456514D-05,
+ 5 2.28967783814712629D-05, 2.30785389811177817D-05,
+ 6 2.30321976080909144D-05, 2.28236073720348722D-05,
+ 7 2.25005881105292418D-05, 2.20981015361991429D-05,
+ 8 2.16418427448103905D-05, 2.11507649256220843D-05,
+ 9 2.06388749782170737D-05, 2.01165241997081666D-05,
+ A 1.95913450141179244D-05, 1.90689367910436740D-05,
+ B 1.85533719641636667D-05, 1.80475722259674218D-05,
+ C 5.52213076721292790D-04, 4.47932581552384646D-04,
+ D 2.79520653992020589D-04, 1.52468156198446602D-04,
+ E 6.93271105657043598D-05, 1.76258683069991397D-05/
+ DATA BETA(67), BETA(68), BETA(69), BETA(70), BETA(71), BETA(72),
+ 1 BETA(73), BETA(74), BETA(75), BETA(76), BETA(77), BETA(78),
+ 2 BETA(79), BETA(80), BETA(81), BETA(82), BETA(83), BETA(84),
+ 3 BETA(85), BETA(86), BETA(87), BETA(88)/
+ 4 -1.35744996343269136D-05, -3.17972413350427135D-05,
+ 5 -4.18861861696693365D-05, -4.69004889379141029D-05,
+ 6 -4.87665447413787352D-05, -4.87010031186735069D-05,
+ 7 -4.74755620890086638D-05, -4.55813058138628452D-05,
+ 8 -4.33309644511266036D-05, -4.09230193157750364D-05,
+ 9 -3.84822638603221274D-05, -3.60857167535410501D-05,
+ A -3.37793306123367417D-05, -3.15888560772109621D-05,
+ B -2.95269561750807315D-05, -2.75978914828335759D-05,
+ C -2.58006174666883713D-05, -2.41308356761280200D-05,
+ D -2.25823509518346033D-05, -2.11479656768912971D-05,
+ E -1.98200638885294927D-05, -1.85909870801065077D-05/
+ DATA BETA(89), BETA(90), BETA(91), BETA(92), BETA(93), BETA(94),
+ 1 BETA(95), BETA(96), BETA(97), BETA(98), BETA(99), BETA(100),
+ 2 BETA(101), BETA(102), BETA(103), BETA(104), BETA(105),
+ 3 BETA(106), BETA(107), BETA(108), BETA(109), BETA(110)/
+ 4 -1.74532699844210224D-05, -1.63997823854497997D-05,
+ 5 -4.74617796559959808D-04, -4.77864567147321487D-04,
+ 6 -3.20390228067037603D-04, -1.61105016119962282D-04,
+ 7 -4.25778101285435204D-05, 3.44571294294967503D-05,
+ 8 7.97092684075674924D-05, 1.03138236708272200D-04,
+ 9 1.12466775262204158D-04, 1.13103642108481389D-04,
+ A 1.08651634848774268D-04, 1.01437951597661973D-04,
+ B 9.29298396593363896D-05, 8.40293133016089978D-05,
+ C 7.52727991349134062D-05, 6.69632521975730872D-05,
+ D 5.92564547323194704D-05, 5.22169308826975567D-05,
+ E 4.58539485165360646D-05, 4.01445513891486808D-05/
+ DATA BETA(111), BETA(112), BETA(113), BETA(114), BETA(115),
+ 1 BETA(116), BETA(117), BETA(118), BETA(119), BETA(120),
+ 2 BETA(121), BETA(122), BETA(123), BETA(124), BETA(125),
+ 3 BETA(126), BETA(127), BETA(128), BETA(129), BETA(130)/
+ 4 3.50481730031328081D-05, 3.05157995034346659D-05,
+ 5 2.64956119950516039D-05, 2.29363633690998152D-05,
+ 6 1.97893056664021636D-05, 1.70091984636412623D-05,
+ 7 1.45547428261524004D-05, 1.23886640995878413D-05,
+ 8 1.04775876076583236D-05, 8.79179954978479373D-06,
+ 9 7.36465810572578444D-04, 8.72790805146193976D-04,
+ A 6.22614862573135066D-04, 2.85998154194304147D-04,
+ B 3.84737672879366102D-06, -1.87906003636971558D-04,
+ C -2.97603646594554535D-04, -3.45998126832656348D-04,
+ D -3.53382470916037712D-04, -3.35715635775048757D-04/
+ DATA BETA(131), BETA(132), BETA(133), BETA(134), BETA(135),
+ 1 BETA(136), BETA(137), BETA(138), BETA(139), BETA(140),
+ 2 BETA(141), BETA(142), BETA(143), BETA(144), BETA(145),
+ 3 BETA(146), BETA(147), BETA(148), BETA(149), BETA(150)/
+ 4 -3.04321124789039809D-04, -2.66722723047612821D-04,
+ 5 -2.27654214122819527D-04, -1.89922611854562356D-04,
+ 6 -1.55058918599093870D-04, -1.23778240761873630D-04,
+ 7 -9.62926147717644187D-05, -7.25178327714425337D-05,
+ 8 -5.22070028895633801D-05, -3.50347750511900522D-05,
+ 9 -2.06489761035551757D-05, -8.70106096849767054D-06,
+ A 1.13698686675100290D-06, 9.16426474122778849D-06,
+ B 1.56477785428872620D-05, 2.08223629482466847D-05,
+ C 2.48923381004595156D-05, 2.80340509574146325D-05,
+ D 3.03987774629861915D-05, 3.21156731406700616D-05/
+ DATA BETA(151), BETA(152), BETA(153), BETA(154), BETA(155),
+ 1 BETA(156), BETA(157), BETA(158), BETA(159), BETA(160),
+ 2 BETA(161), BETA(162), BETA(163), BETA(164), BETA(165),
+ 3 BETA(166), BETA(167), BETA(168), BETA(169), BETA(170)/
+ 4 -1.80182191963885708D-03, -2.43402962938042533D-03,
+ 5 -1.83422663549856802D-03, -7.62204596354009765D-04,
+ 6 2.39079475256927218D-04, 9.49266117176881141D-04,
+ 7 1.34467449701540359D-03, 1.48457495259449178D-03,
+ 8 1.44732339830617591D-03, 1.30268261285657186D-03,
+ 9 1.10351597375642682D-03, 8.86047440419791759D-04,
+ A 6.73073208165665473D-04, 4.77603872856582378D-04,
+ B 3.05991926358789362D-04, 1.60315694594721630D-04,
+ C 4.00749555270613286D-05, -5.66607461635251611D-05,
+ D -1.32506186772982638D-04, -1.90296187989614057D-04/
+ DATA BETA(171), BETA(172), BETA(173), BETA(174), BETA(175),
+ 1 BETA(176), BETA(177), BETA(178), BETA(179), BETA(180),
+ 2 BETA(181), BETA(182), BETA(183), BETA(184), BETA(185),
+ 3 BETA(186), BETA(187), BETA(188), BETA(189), BETA(190)/
+ 4 -2.32811450376937408D-04, -2.62628811464668841D-04,
+ 5 -2.82050469867598672D-04, -2.93081563192861167D-04,
+ 6 -2.97435962176316616D-04, -2.96557334239348078D-04,
+ 7 -2.91647363312090861D-04, -2.83696203837734166D-04,
+ 8 -2.73512317095673346D-04, -2.61750155806768580D-04,
+ 9 6.38585891212050914D-03, 9.62374215806377941D-03,
+ A 7.61878061207001043D-03, 2.83219055545628054D-03,
+ B -2.09841352012720090D-03, -5.73826764216626498D-03,
+ C -7.70804244495414620D-03, -8.21011692264844401D-03,
+ D -7.65824520346905413D-03, -6.47209729391045177D-03/
+ DATA BETA(191), BETA(192), BETA(193), BETA(194), BETA(195),
+ 1 BETA(196), BETA(197), BETA(198), BETA(199), BETA(200),
+ 2 BETA(201), BETA(202), BETA(203), BETA(204), BETA(205),
+ 3 BETA(206), BETA(207), BETA(208), BETA(209), BETA(210)/
+ 4 -4.99132412004966473D-03, -3.45612289713133280D-03,
+ 5 -2.01785580014170775D-03, -7.59430686781961401D-04,
+ 6 2.84173631523859138D-04, 1.10891667586337403D-03,
+ 7 1.72901493872728771D-03, 2.16812590802684701D-03,
+ 8 2.45357710494539735D-03, 2.61281821058334862D-03,
+ 9 2.67141039656276912D-03, 2.65203073395980430D-03,
+ A 2.57411652877287315D-03, 2.45389126236094427D-03,
+ B 2.30460058071795494D-03, 2.13684837686712662D-03,
+ C 1.95896528478870911D-03, 1.77737008679454412D-03,
+ D 1.59690280765839059D-03, 1.42111975664438546D-03/
+ DATA GAMA(1), GAMA(2), GAMA(3), GAMA(4), GAMA(5), GAMA(6),
+ 1 GAMA(7), GAMA(8), GAMA(9), GAMA(10), GAMA(11), GAMA(12),
+ 2 GAMA(13), GAMA(14), GAMA(15), GAMA(16), GAMA(17), GAMA(18),
+ 3 GAMA(19), GAMA(20), GAMA(21), GAMA(22)/
+ 4 6.29960524947436582D-01, 2.51984209978974633D-01,
+ 5 1.54790300415655846D-01, 1.10713062416159013D-01,
+ 6 8.57309395527394825D-02, 6.97161316958684292D-02,
+ 7 5.86085671893713576D-02, 5.04698873536310685D-02,
+ 8 4.42600580689154809D-02, 3.93720661543509966D-02,
+ 9 3.54283195924455368D-02, 3.21818857502098231D-02,
+ A 2.94646240791157679D-02, 2.71581677112934479D-02,
+ B 2.51768272973861779D-02, 2.34570755306078891D-02,
+ C 2.19508390134907203D-02, 2.06210828235646240D-02,
+ D 1.94388240897880846D-02, 1.83810633800683158D-02,
+ E 1.74293213231963172D-02, 1.65685837786612353D-02/
+ DATA GAMA(23), GAMA(24), GAMA(25), GAMA(26), GAMA(27), GAMA(28),
+ 1 GAMA(29), GAMA(30)/
+ 2 1.57865285987918445D-02, 1.50729501494095594D-02,
+ 3 1.44193250839954639D-02, 1.38184805735341786D-02,
+ 4 1.32643378994276568D-02, 1.27517121970498651D-02,
+ 5 1.22761545318762767D-02, 1.18338262398482403D-02/
+ DATA EX1, EX2, HPI, GPI, THPI /
+ 1 3.33333333333333333D-01, 6.66666666666666667D-01,
+ 2 1.57079632679489662D+00, 3.14159265358979324D+00,
+ 3 4.71238898038468986D+00/
+ DATA ZEROR,ZEROI,CONER,CONEI / 0.0D0, 0.0D0, 1.0D0, 0.0D0 /
+ C
+ RFNU = 1.0D0/FNU
+ C-----------------------------------------------------------------------
+ C OVERFLOW TEST (Z/FNU TOO SMALL)
+ C-----------------------------------------------------------------------
+ TEST = D1MACH(1)*1.0D+3
+ AC = FNU*TEST
+ IF (DABS(ZR).GT.AC .OR. DABS(ZI).GT.AC) GO TO 15
+ ZETA1R = 2.0D0*DABS(DLOG(TEST))+FNU
+ ZETA1I = 0.0D0
+ ZETA2R = FNU
+ ZETA2I = 0.0D0
+ PHIR = 1.0D0
+ PHII = 0.0D0
+ ARGR = 1.0D0
+ ARGI = 0.0D0
+ RETURN
+ 15 CONTINUE
+ ZBR = ZR*RFNU
+ ZBI = ZI*RFNU
+ RFNU2 = RFNU*RFNU
+ C-----------------------------------------------------------------------
+ C COMPUTE IN THE FOURTH QUADRANT
+ C-----------------------------------------------------------------------
+ FN13 = FNU**EX1
+ FN23 = FN13*FN13
+ RFN13 = 1.0D0/FN13
+ W2R = CONER - ZBR*ZBR + ZBI*ZBI
+ W2I = CONEI - ZBR*ZBI - ZBR*ZBI
+ AW2 = XZABS(W2R,W2I)
+ IF (AW2.GT.0.25D0) GO TO 130
+ C-----------------------------------------------------------------------
+ C POWER SERIES FOR CABS(W2).LE.0.25D0
+ C-----------------------------------------------------------------------
+ K = 1
+ PR(1) = CONER
+ PI(1) = CONEI
+ SUMAR = GAMA(1)
+ SUMAI = ZEROI
+ AP(1) = 1.0D0
+ IF (AW2.LT.TOL) GO TO 20
+ DO 10 K=2,30
+ PR(K) = PR(K-1)*W2R - PI(K-1)*W2I
+ PI(K) = PR(K-1)*W2I + PI(K-1)*W2R
+ SUMAR = SUMAR + PR(K)*GAMA(K)
+ SUMAI = SUMAI + PI(K)*GAMA(K)
+ AP(K) = AP(K-1)*AW2
+ IF (AP(K).LT.TOL) GO TO 20
+ 10 CONTINUE
+ K = 30
+ 20 CONTINUE
+ KMAX = K
+ ZETAR = W2R*SUMAR - W2I*SUMAI
+ ZETAI = W2R*SUMAI + W2I*SUMAR
+ ARGR = ZETAR*FN23
+ ARGI = ZETAI*FN23
+ CALL XZSQRT(SUMAR, SUMAI, ZAR, ZAI)
+ CALL XZSQRT(W2R, W2I, STR, STI)
+ ZETA2R = STR*FNU
+ ZETA2I = STI*FNU
+ STR = CONER + EX2*(ZETAR*ZAR-ZETAI*ZAI)
+ STI = CONEI + EX2*(ZETAR*ZAI+ZETAI*ZAR)
+ ZETA1R = STR*ZETA2R - STI*ZETA2I
+ ZETA1I = STR*ZETA2I + STI*ZETA2R
+ ZAR = ZAR + ZAR
+ ZAI = ZAI + ZAI
+ CALL XZSQRT(ZAR, ZAI, STR, STI)
+ PHIR = STR*RFN13
+ PHII = STI*RFN13
+ IF (IPMTR.EQ.1) GO TO 120
+ C-----------------------------------------------------------------------
+ C SUM SERIES FOR ASUM AND BSUM
+ C-----------------------------------------------------------------------
+ SUMBR = ZEROR
+ SUMBI = ZEROI
+ DO 30 K=1,KMAX
+ SUMBR = SUMBR + PR(K)*BETA(K)
+ SUMBI = SUMBI + PI(K)*BETA(K)
+ 30 CONTINUE
+ ASUMR = ZEROR
+ ASUMI = ZEROI
+ BSUMR = SUMBR
+ BSUMI = SUMBI
+ L1 = 0
+ L2 = 30
+ BTOL = TOL*(DABS(BSUMR)+DABS(BSUMI))
+ ATOL = TOL
+ PP = 1.0D0
+ IAS = 0
+ IBS = 0
+ IF (RFNU2.LT.TOL) GO TO 110
+ DO 100 IS=2,7
+ ATOL = ATOL/RFNU2
+ PP = PP*RFNU2
+ IF (IAS.EQ.1) GO TO 60
+ SUMAR = ZEROR
+ SUMAI = ZEROI
+ DO 40 K=1,KMAX
+ M = L1 + K
+ SUMAR = SUMAR + PR(K)*ALFA(M)
+ SUMAI = SUMAI + PI(K)*ALFA(M)
+ IF (AP(K).LT.ATOL) GO TO 50
+ 40 CONTINUE
+ 50 CONTINUE
+ ASUMR = ASUMR + SUMAR*PP
+ ASUMI = ASUMI + SUMAI*PP
+ IF (PP.LT.TOL) IAS = 1
+ 60 CONTINUE
+ IF (IBS.EQ.1) GO TO 90
+ SUMBR = ZEROR
+ SUMBI = ZEROI
+ DO 70 K=1,KMAX
+ M = L2 + K
+ SUMBR = SUMBR + PR(K)*BETA(M)
+ SUMBI = SUMBI + PI(K)*BETA(M)
+ IF (AP(K).LT.ATOL) GO TO 80
+ 70 CONTINUE
+ 80 CONTINUE
+ BSUMR = BSUMR + SUMBR*PP
+ BSUMI = BSUMI + SUMBI*PP
+ IF (PP.LT.BTOL) IBS = 1
+ 90 CONTINUE
+ IF (IAS.EQ.1 .AND. IBS.EQ.1) GO TO 110
+ L1 = L1 + 30
+ L2 = L2 + 30
+ 100 CONTINUE
+ 110 CONTINUE
+ ASUMR = ASUMR + CONER
+ PP = RFNU*RFN13
+ BSUMR = BSUMR*PP
+ BSUMI = BSUMI*PP
+ 120 CONTINUE
+ RETURN
+ C-----------------------------------------------------------------------
+ C CABS(W2).GT.0.25D0
+ C-----------------------------------------------------------------------
+ 130 CONTINUE
+ CALL XZSQRT(W2R, W2I, WR, WI)
+ IF (WR.LT.0.0D0) WR = 0.0D0
+ IF (WI.LT.0.0D0) WI = 0.0D0
+ STR = CONER + WR
+ STI = WI
+ CALL ZDIV(STR, STI, ZBR, ZBI, ZAR, ZAI)
+ CALL XZLOG(ZAR, ZAI, ZCR, ZCI, IDUM)
+ IF (ZCI.LT.0.0D0) ZCI = 0.0D0
+ IF (ZCI.GT.HPI) ZCI = HPI
+ IF (ZCR.LT.0.0D0) ZCR = 0.0D0
+ ZTHR = (ZCR-WR)*1.5D0
+ ZTHI = (ZCI-WI)*1.5D0
+ ZETA1R = ZCR*FNU
+ ZETA1I = ZCI*FNU
+ ZETA2R = WR*FNU
+ ZETA2I = WI*FNU
+ AZTH = XZABS(ZTHR,ZTHI)
+ ANG = THPI
+ IF (ZTHR.GE.0.0D0 .AND. ZTHI.LT.0.0D0) GO TO 140
+ ANG = HPI
+ IF (ZTHR.EQ.0.0D0) GO TO 140
+ ANG = DATAN(ZTHI/ZTHR)
+ IF (ZTHR.LT.0.0D0) ANG = ANG + GPI
+ 140 CONTINUE
+ PP = AZTH**EX2
+ ANG = ANG*EX2
+ ZETAR = PP*DCOS(ANG)
+ ZETAI = PP*DSIN(ANG)
+ IF (ZETAI.LT.0.0D0) ZETAI = 0.0D0
+ ARGR = ZETAR*FN23
+ ARGI = ZETAI*FN23
+ CALL ZDIV(ZTHR, ZTHI, ZETAR, ZETAI, RTZTR, RTZTI)
+ CALL ZDIV(RTZTR, RTZTI, WR, WI, ZAR, ZAI)
+ TZAR = ZAR + ZAR
+ TZAI = ZAI + ZAI
+ CALL XZSQRT(TZAR, TZAI, STR, STI)
+ PHIR = STR*RFN13
+ PHII = STI*RFN13
+ IF (IPMTR.EQ.1) GO TO 120
+ RAW = 1.0D0/DSQRT(AW2)
+ STR = WR*RAW
+ STI = -WI*RAW
+ TFNR = STR*RFNU*RAW
+ TFNI = STI*RFNU*RAW
+ RAZTH = 1.0D0/AZTH
+ STR = ZTHR*RAZTH
+ STI = -ZTHI*RAZTH
+ RZTHR = STR*RAZTH*RFNU
+ RZTHI = STI*RAZTH*RFNU
+ ZCR = RZTHR*AR(2)
+ ZCI = RZTHI*AR(2)
+ RAW2 = 1.0D0/AW2
+ STR = W2R*RAW2
+ STI = -W2I*RAW2
+ T2R = STR*RAW2
+ T2I = STI*RAW2
+ STR = T2R*C(2) + C(3)
+ STI = T2I*C(2)
+ UPR(2) = STR*TFNR - STI*TFNI
+ UPI(2) = STR*TFNI + STI*TFNR
+ BSUMR = UPR(2) + ZCR
+ BSUMI = UPI(2) + ZCI
+ ASUMR = ZEROR
+ ASUMI = ZEROI
+ IF (RFNU.LT.TOL) GO TO 220
+ PRZTHR = RZTHR
+ PRZTHI = RZTHI
+ PTFNR = TFNR
+ PTFNI = TFNI
+ UPR(1) = CONER
+ UPI(1) = CONEI
+ PP = 1.0D0
+ BTOL = TOL*(DABS(BSUMR)+DABS(BSUMI))
+ KS = 0
+ KP1 = 2
+ L = 3
+ IAS = 0
+ IBS = 0
+ DO 210 LR=2,12,2
+ LRP1 = LR + 1
+ C-----------------------------------------------------------------------
+ C COMPUTE TWO ADDITIONAL CR, DR, AND UP FOR TWO MORE TERMS IN
+ C NEXT SUMA AND SUMB
+ C-----------------------------------------------------------------------
+ DO 160 K=LR,LRP1
+ KS = KS + 1
+ KP1 = KP1 + 1
+ L = L + 1
+ ZAR = C(L)
+ ZAI = ZEROI
+ DO 150 J=2,KP1
+ L = L + 1
+ STR = ZAR*T2R - T2I*ZAI + C(L)
+ ZAI = ZAR*T2I + ZAI*T2R
+ ZAR = STR
+ 150 CONTINUE
+ STR = PTFNR*TFNR - PTFNI*TFNI
+ PTFNI = PTFNR*TFNI + PTFNI*TFNR
+ PTFNR = STR
+ UPR(KP1) = PTFNR*ZAR - PTFNI*ZAI
+ UPI(KP1) = PTFNI*ZAR + PTFNR*ZAI
+ CRR(KS) = PRZTHR*BR(KS+1)
+ CRI(KS) = PRZTHI*BR(KS+1)
+ STR = PRZTHR*RZTHR - PRZTHI*RZTHI
+ PRZTHI = PRZTHR*RZTHI + PRZTHI*RZTHR
+ PRZTHR = STR
+ DRR(KS) = PRZTHR*AR(KS+2)
+ DRI(KS) = PRZTHI*AR(KS+2)
+ 160 CONTINUE
+ PP = PP*RFNU2
+ IF (IAS.EQ.1) GO TO 180
+ SUMAR = UPR(LRP1)
+ SUMAI = UPI(LRP1)
+ JU = LRP1
+ DO 170 JR=1,LR
+ JU = JU - 1
+ SUMAR = SUMAR + CRR(JR)*UPR(JU) - CRI(JR)*UPI(JU)
+ SUMAI = SUMAI + CRR(JR)*UPI(JU) + CRI(JR)*UPR(JU)
+ 170 CONTINUE
+ ASUMR = ASUMR + SUMAR
+ ASUMI = ASUMI + SUMAI
+ TEST = DABS(SUMAR) + DABS(SUMAI)
+ IF (PP.LT.TOL .AND. TEST.LT.TOL) IAS = 1
+ 180 CONTINUE
+ IF (IBS.EQ.1) GO TO 200
+ SUMBR = UPR(LR+2) + UPR(LRP1)*ZCR - UPI(LRP1)*ZCI
+ SUMBI = UPI(LR+2) + UPR(LRP1)*ZCI + UPI(LRP1)*ZCR
+ JU = LRP1
+ DO 190 JR=1,LR
+ JU = JU - 1
+ SUMBR = SUMBR + DRR(JR)*UPR(JU) - DRI(JR)*UPI(JU)
+ SUMBI = SUMBI + DRR(JR)*UPI(JU) + DRI(JR)*UPR(JU)
+ 190 CONTINUE
+ BSUMR = BSUMR + SUMBR
+ BSUMI = BSUMI + SUMBI
+ TEST = DABS(SUMBR) + DABS(SUMBI)
+ IF (PP.LT.BTOL .AND. TEST.LT.BTOL) IBS = 1
+ 200 CONTINUE
+ IF (IAS.EQ.1 .AND. IBS.EQ.1) GO TO 220
+ 210 CONTINUE
+ 220 CONTINUE
+ ASUMR = ASUMR + CONER
+ STR = -BSUMR*RFN13
+ STI = -BSUMI*RFN13
+ CALL ZDIV(STR, STI, RTZTR, RTZTI, BSUMR, BSUMI)
+ GO TO 120
+ END
diff -cNr octave-2.0.13/libcruft/amos/zuni1.f octave-2.0.14/libcruft/amos/zuni1.f
*** octave-2.0.13/libcruft/amos/zuni1.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zuni1.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,204 ----
+ SUBROUTINE ZUNI1(ZR, ZI, FNU, KODE, N, YR, YI, NZ, NLAST, FNUL,
+ * TOL, ELIM, ALIM)
+ C***BEGIN PROLOGUE ZUNI1
+ C***REFER TO ZBESI,ZBESK
+ C
+ C ZUNI1 COMPUTES I(FNU,Z) BY MEANS OF THE UNIFORM ASYMPTOTIC
+ C EXPANSION FOR I(FNU,Z) IN -PI/3.LE.ARG Z.LE.PI/3.
+ C
+ C FNUL IS THE SMALLEST ORDER PERMITTED FOR THE ASYMPTOTIC
+ C EXPANSION. NLAST=0 MEANS ALL OF THE Y VALUES WERE SET.
+ C NLAST.NE.0 IS THE NUMBER LEFT TO BE COMPUTED BY ANOTHER
+ C FORMULA FOR ORDERS FNU TO FNU+NLAST-1 BECAUSE FNU+NLAST-1.LT.FNUL.
+ C Y(I)=CZERO FOR I=NLAST+1,N
+ C
+ C***ROUTINES CALLED ZUCHK,ZUNIK,ZUOIK,D1MACH,XZABS
+ C***END PROLOGUE ZUNI1
+ C COMPLEX CFN,CONE,CRSC,CSCL,CSR,CSS,CWRK,CZERO,C1,C2,PHI,RZ,SUM,S1,
+ C *S2,Y,Z,ZETA1,ZETA2
+ DOUBLE PRECISION ALIM, APHI, ASCLE, BRY, CONER, CRSC,
+ * CSCL, CSRR, CSSR, CWRKI, CWRKR, C1R, C2I, C2M, C2R, ELIM, FN,
+ * FNU, FNUL, PHII, PHIR, RAST, RS1, RZI, RZR, STI, STR, SUMI,
+ * SUMR, S1I, S1R, S2I, S2R, TOL, YI, YR, ZEROI, ZEROR, ZETA1I,
+ * ZETA1R, ZETA2I, ZETA2R, ZI, ZR, CYR, CYI, D1MACH, XZABS
+ INTEGER I, IFLAG, INIT, K, KODE, M, N, ND, NLAST, NN, NUF, NW, NZ
+ DIMENSION BRY(3), YR(N), YI(N), CWRKR(16), CWRKI(16), CSSR(3),
+ * CSRR(3), CYR(2), CYI(2)
+ DATA ZEROR,ZEROI,CONER / 0.0D0, 0.0D0, 1.0D0 /
+ C
+ NZ = 0
+ ND = N
+ NLAST = 0
+ C-----------------------------------------------------------------------
+ C COMPUTED VALUES WITH EXPONENTS BETWEEN ALIM AND ELIM IN MAG-
+ C NITUDE ARE SCALED TO KEEP INTERMEDIATE ARITHMETIC ON SCALE,
+ C EXP(ALIM)=EXP(ELIM)*TOL
+ C-----------------------------------------------------------------------
+ CSCL = 1.0D0/TOL
+ CRSC = TOL
+ CSSR(1) = CSCL
+ CSSR(2) = CONER
+ CSSR(3) = CRSC
+ CSRR(1) = CRSC
+ CSRR(2) = CONER
+ CSRR(3) = CSCL
+ BRY(1) = 1.0D+3*D1MACH(1)/TOL
+ C-----------------------------------------------------------------------
+ C CHECK FOR UNDERFLOW AND OVERFLOW ON FIRST MEMBER
+ C-----------------------------------------------------------------------
+ FN = DMAX1(FNU,1.0D0)
+ INIT = 0
+ CALL ZUNIK(ZR, ZI, FN, 1, 1, TOL, INIT, PHIR, PHII, ZETA1R,
+ * ZETA1I, ZETA2R, ZETA2I, SUMR, SUMI, CWRKR, CWRKI)
+ IF (KODE.EQ.1) GO TO 10
+ STR = ZR + ZETA2R
+ STI = ZI + ZETA2I
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = -ZETA1R + STR
+ S1I = -ZETA1I + STI
+ GO TO 20
+ 10 CONTINUE
+ S1R = -ZETA1R + ZETA2R
+ S1I = -ZETA1I + ZETA2I
+ 20 CONTINUE
+ RS1 = S1R
+ IF (DABS(RS1).GT.ELIM) GO TO 130
+ 30 CONTINUE
+ NN = MIN0(2,ND)
+ DO 80 I=1,NN
+ FN = FNU + DBLE(FLOAT(ND-I))
+ INIT = 0
+ CALL ZUNIK(ZR, ZI, FN, 1, 0, TOL, INIT, PHIR, PHII, ZETA1R,
+ * ZETA1I, ZETA2R, ZETA2I, SUMR, SUMI, CWRKR, CWRKI)
+ IF (KODE.EQ.1) GO TO 40
+ STR = ZR + ZETA2R
+ STI = ZI + ZETA2I
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = -ZETA1R + STR
+ S1I = -ZETA1I + STI + ZI
+ GO TO 50
+ 40 CONTINUE
+ S1R = -ZETA1R + ZETA2R
+ S1I = -ZETA1I + ZETA2I
+ 50 CONTINUE
+ C-----------------------------------------------------------------------
+ C TEST FOR UNDERFLOW AND OVERFLOW
+ C-----------------------------------------------------------------------
+ RS1 = S1R
+ IF (DABS(RS1).GT.ELIM) GO TO 110
+ IF (I.EQ.1) IFLAG = 2
+ IF (DABS(RS1).LT.ALIM) GO TO 60
+ C-----------------------------------------------------------------------
+ C REFINE TEST AND SCALE
+ C-----------------------------------------------------------------------
+ APHI = XZABS(PHIR,PHII)
+ RS1 = RS1 + DLOG(APHI)
+ IF (DABS(RS1).GT.ELIM) GO TO 110
+ IF (I.EQ.1) IFLAG = 1
+ IF (RS1.LT.0.0D0) GO TO 60
+ IF (I.EQ.1) IFLAG = 3
+ 60 CONTINUE
+ C-----------------------------------------------------------------------
+ C SCALE S1 IF CABS(S1).LT.ASCLE
+ C-----------------------------------------------------------------------
+ S2R = PHIR*SUMR - PHII*SUMI
+ S2I = PHIR*SUMI + PHII*SUMR
+ STR = DEXP(S1R)*CSSR(IFLAG)
+ S1R = STR*DCOS(S1I)
+ S1I = STR*DSIN(S1I)
+ STR = S2R*S1R - S2I*S1I
+ S2I = S2R*S1I + S2I*S1R
+ S2R = STR
+ IF (IFLAG.NE.1) GO TO 70
+ CALL ZUCHK(S2R, S2I, NW, BRY(1), TOL)
+ IF (NW.NE.0) GO TO 110
+ 70 CONTINUE
+ CYR(I) = S2R
+ CYI(I) = S2I
+ M = ND - I + 1
+ YR(M) = S2R*CSRR(IFLAG)
+ YI(M) = S2I*CSRR(IFLAG)
+ 80 CONTINUE
+ IF (ND.LE.2) GO TO 100
+ RAST = 1.0D0/XZABS(ZR,ZI)
+ STR = ZR*RAST
+ STI = -ZI*RAST
+ RZR = (STR+STR)*RAST
+ RZI = (STI+STI)*RAST
+ BRY(2) = 1.0D0/BRY(1)
+ BRY(3) = D1MACH(2)
+ S1R = CYR(1)
+ S1I = CYI(1)
+ S2R = CYR(2)
+ S2I = CYI(2)
+ C1R = CSRR(IFLAG)
+ ASCLE = BRY(IFLAG)
+ K = ND - 2
+ FN = DBLE(FLOAT(K))
+ DO 90 I=3,ND
+ C2R = S2R
+ C2I = S2I
+ S2R = S1R + (FNU+FN)*(RZR*C2R-RZI*C2I)
+ S2I = S1I + (FNU+FN)*(RZR*C2I+RZI*C2R)
+ S1R = C2R
+ S1I = C2I
+ C2R = S2R*C1R
+ C2I = S2I*C1R
+ YR(K) = C2R
+ YI(K) = C2I
+ K = K - 1
+ FN = FN - 1.0D0
+ IF (IFLAG.GE.3) GO TO 90
+ STR = DABS(C2R)
+ STI = DABS(C2I)
+ C2M = DMAX1(STR,STI)
+ IF (C2M.LE.ASCLE) GO TO 90
+ IFLAG = IFLAG + 1
+ ASCLE = BRY(IFLAG)
+ S1R = S1R*C1R
+ S1I = S1I*C1R
+ S2R = C2R
+ S2I = C2I
+ S1R = S1R*CSSR(IFLAG)
+ S1I = S1I*CSSR(IFLAG)
+ S2R = S2R*CSSR(IFLAG)
+ S2I = S2I*CSSR(IFLAG)
+ C1R = CSRR(IFLAG)
+ 90 CONTINUE
+ 100 CONTINUE
+ RETURN
+ C-----------------------------------------------------------------------
+ C SET UNDERFLOW AND UPDATE PARAMETERS
+ C-----------------------------------------------------------------------
+ 110 CONTINUE
+ IF (RS1.GT.0.0D0) GO TO 120
+ YR(ND) = ZEROR
+ YI(ND) = ZEROI
+ NZ = NZ + 1
+ ND = ND - 1
+ IF (ND.EQ.0) GO TO 100
+ CALL ZUOIK(ZR, ZI, FNU, KODE, 1, ND, YR, YI, NUF, TOL, ELIM, ALIM)
+ IF (NUF.LT.0) GO TO 120
+ ND = ND - NUF
+ NZ = NZ + NUF
+ IF (ND.EQ.0) GO TO 100
+ FN = FNU + DBLE(FLOAT(ND-1))
+ IF (FN.GE.FNUL) GO TO 30
+ NLAST = ND
+ RETURN
+ 120 CONTINUE
+ NZ = -1
+ RETURN
+ 130 CONTINUE
+ IF (RS1.GT.0.0D0) GO TO 120
+ NZ = N
+ DO 140 I=1,N
+ YR(I) = ZEROR
+ YI(I) = ZEROI
+ 140 CONTINUE
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zuni2.f octave-2.0.14/libcruft/amos/zuni2.f
*** octave-2.0.13/libcruft/amos/zuni2.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zuni2.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,267 ----
+ SUBROUTINE ZUNI2(ZR, ZI, FNU, KODE, N, YR, YI, NZ, NLAST, FNUL,
+ * TOL, ELIM, ALIM)
+ C***BEGIN PROLOGUE ZUNI2
+ C***REFER TO ZBESI,ZBESK
+ C
+ C ZUNI2 COMPUTES I(FNU,Z) IN THE RIGHT HALF PLANE BY MEANS OF
+ C UNIFORM ASYMPTOTIC EXPANSION FOR J(FNU,ZN) WHERE ZN IS Z*I
+ C OR -Z*I AND ZN IS IN THE RIGHT HALF PLANE ALSO.
+ C
+ C FNUL IS THE SMALLEST ORDER PERMITTED FOR THE ASYMPTOTIC
+ C EXPANSION. NLAST=0 MEANS ALL OF THE Y VALUES WERE SET.
+ C NLAST.NE.0 IS THE NUMBER LEFT TO BE COMPUTED BY ANOTHER
+ C FORMULA FOR ORDERS FNU TO FNU+NLAST-1 BECAUSE FNU+NLAST-1.LT.FNUL.
+ C Y(I)=CZERO FOR I=NLAST+1,N
+ C
+ C***ROUTINES CALLED ZAIRY,ZUCHK,ZUNHJ,ZUOIK,D1MACH,XZABS
+ C***END PROLOGUE ZUNI2
+ C COMPLEX AI,ARG,ASUM,BSUM,CFN,CI,CID,CIP,CONE,CRSC,CSCL,CSR,CSS,
+ C *CZERO,C1,C2,DAI,PHI,RZ,S1,S2,Y,Z,ZB,ZETA1,ZETA2,ZN
+ DOUBLE PRECISION AARG, AIC, AII, AIR, ALIM, ANG, APHI, ARGI,
+ * ARGR, ASCLE, ASUMI, ASUMR, BRY, BSUMI, BSUMR, CIDI, CIPI, CIPR,
+ * CONER, CRSC, CSCL, CSRR, CSSR, C1R, C2I, C2M, C2R, DAII,
+ * DAIR, ELIM, FN, FNU, FNUL, HPI, PHII, PHIR, RAST, RAZ, RS1, RZI,
+ * RZR, STI, STR, S1I, S1R, S2I, S2R, TOL, YI, YR, ZBI, ZBR, ZEROI,
+ * ZEROR, ZETA1I, ZETA1R, ZETA2I, ZETA2R, ZI, ZNI, ZNR, ZR, CYR,
+ * CYI, D1MACH, XZABS, CAR, SAR
+ INTEGER I, IFLAG, IN, INU, J, K, KODE, N, NAI, ND, NDAI, NLAST,
+ * NN, NUF, NW, NZ, IDUM
+ DIMENSION BRY(3), YR(N), YI(N), CIPR(4), CIPI(4), CSSR(3),
+ * CSRR(3), CYR(2), CYI(2)
+ DATA ZEROR,ZEROI,CONER / 0.0D0, 0.0D0, 1.0D0 /
+ DATA CIPR(1),CIPI(1),CIPR(2),CIPI(2),CIPR(3),CIPI(3),CIPR(4),
+ * CIPI(4)/ 1.0D0,0.0D0, 0.0D0,1.0D0, -1.0D0,0.0D0, 0.0D0,-1.0D0/
+ DATA HPI, AIC /
+ 1 1.57079632679489662D+00, 1.265512123484645396D+00/
+ C
+ NZ = 0
+ ND = N
+ NLAST = 0
+ C-----------------------------------------------------------------------
+ C COMPUTED VALUES WITH EXPONENTS BETWEEN ALIM AND ELIM IN MAG-
+ C NITUDE ARE SCALED TO KEEP INTERMEDIATE ARITHMETIC ON SCALE,
+ C EXP(ALIM)=EXP(ELIM)*TOL
+ C-----------------------------------------------------------------------
+ CSCL = 1.0D0/TOL
+ CRSC = TOL
+ CSSR(1) = CSCL
+ CSSR(2) = CONER
+ CSSR(3) = CRSC
+ CSRR(1) = CRSC
+ CSRR(2) = CONER
+ CSRR(3) = CSCL
+ BRY(1) = 1.0D+3*D1MACH(1)/TOL
+ C-----------------------------------------------------------------------
+ C ZN IS IN THE RIGHT HALF PLANE AFTER ROTATION BY CI OR -CI
+ C-----------------------------------------------------------------------
+ ZNR = ZI
+ ZNI = -ZR
+ ZBR = ZR
+ ZBI = ZI
+ CIDI = -CONER
+ INU = INT(SNGL(FNU))
+ ANG = HPI*(FNU-DBLE(FLOAT(INU)))
+ C2R = DCOS(ANG)
+ C2I = DSIN(ANG)
+ CAR = C2R
+ SAR = C2I
+ IN = INU + N - 1
+ IN = MOD(IN,4) + 1
+ STR = C2R*CIPR(IN) - C2I*CIPI(IN)
+ C2I = C2R*CIPI(IN) + C2I*CIPR(IN)
+ C2R = STR
+ IF (ZI.GT.0.0D0) GO TO 10
+ ZNR = -ZNR
+ ZBI = -ZBI
+ CIDI = -CIDI
+ C2I = -C2I
+ 10 CONTINUE
+ C-----------------------------------------------------------------------
+ C CHECK FOR UNDERFLOW AND OVERFLOW ON FIRST MEMBER
+ C-----------------------------------------------------------------------
+ FN = DMAX1(FNU,1.0D0)
+ CALL ZUNHJ(ZNR, ZNI, FN, 1, TOL, PHIR, PHII, ARGR, ARGI, ZETA1R,
+ * ZETA1I, ZETA2R, ZETA2I, ASUMR, ASUMI, BSUMR, BSUMI)
+ IF (KODE.EQ.1) GO TO 20
+ STR = ZBR + ZETA2R
+ STI = ZBI + ZETA2I
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = -ZETA1R + STR
+ S1I = -ZETA1I + STI
+ GO TO 30
+ 20 CONTINUE
+ S1R = -ZETA1R + ZETA2R
+ S1I = -ZETA1I + ZETA2I
+ 30 CONTINUE
+ RS1 = S1R
+ IF (DABS(RS1).GT.ELIM) GO TO 150
+ 40 CONTINUE
+ NN = MIN0(2,ND)
+ DO 90 I=1,NN
+ FN = FNU + DBLE(FLOAT(ND-I))
+ CALL ZUNHJ(ZNR, ZNI, FN, 0, TOL, PHIR, PHII, ARGR, ARGI,
+ * ZETA1R, ZETA1I, ZETA2R, ZETA2I, ASUMR, ASUMI, BSUMR, BSUMI)
+ IF (KODE.EQ.1) GO TO 50
+ STR = ZBR + ZETA2R
+ STI = ZBI + ZETA2I
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = -ZETA1R + STR
+ S1I = -ZETA1I + STI + DABS(ZI)
+ GO TO 60
+ 50 CONTINUE
+ S1R = -ZETA1R + ZETA2R
+ S1I = -ZETA1I + ZETA2I
+ 60 CONTINUE
+ C-----------------------------------------------------------------------
+ C TEST FOR UNDERFLOW AND OVERFLOW
+ C-----------------------------------------------------------------------
+ RS1 = S1R
+ IF (DABS(RS1).GT.ELIM) GO TO 120
+ IF (I.EQ.1) IFLAG = 2
+ IF (DABS(RS1).LT.ALIM) GO TO 70
+ C-----------------------------------------------------------------------
+ C REFINE TEST AND SCALE
+ C-----------------------------------------------------------------------
+ C-----------------------------------------------------------------------
+ APHI = XZABS(PHIR,PHII)
+ AARG = XZABS(ARGR,ARGI)
+ RS1 = RS1 + DLOG(APHI) - 0.25D0*DLOG(AARG) - AIC
+ IF (DABS(RS1).GT.ELIM) GO TO 120
+ IF (I.EQ.1) IFLAG = 1
+ IF (RS1.LT.0.0D0) GO TO 70
+ IF (I.EQ.1) IFLAG = 3
+ 70 CONTINUE
+ C-----------------------------------------------------------------------
+ C SCALE S1 TO KEEP INTERMEDIATE ARITHMETIC ON SCALE NEAR
+ C EXPONENT EXTREMES
+ C-----------------------------------------------------------------------
+ CALL ZAIRY(ARGR, ARGI, 0, 2, AIR, AII, NAI, IDUM)
+ CALL ZAIRY(ARGR, ARGI, 1, 2, DAIR, DAII, NDAI, IDUM)
+ STR = DAIR*BSUMR - DAII*BSUMI
+ STI = DAIR*BSUMI + DAII*BSUMR
+ STR = STR + (AIR*ASUMR-AII*ASUMI)
+ STI = STI + (AIR*ASUMI+AII*ASUMR)
+ S2R = PHIR*STR - PHII*STI
+ S2I = PHIR*STI + PHII*STR
+ STR = DEXP(S1R)*CSSR(IFLAG)
+ S1R = STR*DCOS(S1I)
+ S1I = STR*DSIN(S1I)
+ STR = S2R*S1R - S2I*S1I
+ S2I = S2R*S1I + S2I*S1R
+ S2R = STR
+ IF (IFLAG.NE.1) GO TO 80
+ CALL ZUCHK(S2R, S2I, NW, BRY(1), TOL)
+ IF (NW.NE.0) GO TO 120
+ 80 CONTINUE
+ IF (ZI.LE.0.0D0) S2I = -S2I
+ STR = S2R*C2R - S2I*C2I
+ S2I = S2R*C2I + S2I*C2R
+ S2R = STR
+ CYR(I) = S2R
+ CYI(I) = S2I
+ J = ND - I + 1
+ YR(J) = S2R*CSRR(IFLAG)
+ YI(J) = S2I*CSRR(IFLAG)
+ STR = -C2I*CIDI
+ C2I = C2R*CIDI
+ C2R = STR
+ 90 CONTINUE
+ IF (ND.LE.2) GO TO 110
+ RAZ = 1.0D0/XZABS(ZR,ZI)
+ STR = ZR*RAZ
+ STI = -ZI*RAZ
+ RZR = (STR+STR)*RAZ
+ RZI = (STI+STI)*RAZ
+ BRY(2) = 1.0D0/BRY(1)
+ BRY(3) = D1MACH(2)
+ S1R = CYR(1)
+ S1I = CYI(1)
+ S2R = CYR(2)
+ S2I = CYI(2)
+ C1R = CSRR(IFLAG)
+ ASCLE = BRY(IFLAG)
+ K = ND - 2
+ FN = DBLE(FLOAT(K))
+ DO 100 I=3,ND
+ C2R = S2R
+ C2I = S2I
+ S2R = S1R + (FNU+FN)*(RZR*C2R-RZI*C2I)
+ S2I = S1I + (FNU+FN)*(RZR*C2I+RZI*C2R)
+ S1R = C2R
+ S1I = C2I
+ C2R = S2R*C1R
+ C2I = S2I*C1R
+ YR(K) = C2R
+ YI(K) = C2I
+ K = K - 1
+ FN = FN - 1.0D0
+ IF (IFLAG.GE.3) GO TO 100
+ STR = DABS(C2R)
+ STI = DABS(C2I)
+ C2M = DMAX1(STR,STI)
+ IF (C2M.LE.ASCLE) GO TO 100
+ IFLAG = IFLAG + 1
+ ASCLE = BRY(IFLAG)
+ S1R = S1R*C1R
+ S1I = S1I*C1R
+ S2R = C2R
+ S2I = C2I
+ S1R = S1R*CSSR(IFLAG)
+ S1I = S1I*CSSR(IFLAG)
+ S2R = S2R*CSSR(IFLAG)
+ S2I = S2I*CSSR(IFLAG)
+ C1R = CSRR(IFLAG)
+ 100 CONTINUE
+ 110 CONTINUE
+ RETURN
+ 120 CONTINUE
+ IF (RS1.GT.0.0D0) GO TO 140
+ C-----------------------------------------------------------------------
+ C SET UNDERFLOW AND UPDATE PARAMETERS
+ C-----------------------------------------------------------------------
+ YR(ND) = ZEROR
+ YI(ND) = ZEROI
+ NZ = NZ + 1
+ ND = ND - 1
+ IF (ND.EQ.0) GO TO 110
+ CALL ZUOIK(ZR, ZI, FNU, KODE, 1, ND, YR, YI, NUF, TOL, ELIM, ALIM)
+ IF (NUF.LT.0) GO TO 140
+ ND = ND - NUF
+ NZ = NZ + NUF
+ IF (ND.EQ.0) GO TO 110
+ FN = FNU + DBLE(FLOAT(ND-1))
+ IF (FN.LT.FNUL) GO TO 130
+ C FN = CIDI
+ C J = NUF + 1
+ C K = MOD(J,4) + 1
+ C S1R = CIPR(K)
+ C S1I = CIPI(K)
+ C IF (FN.LT.0.0D0) S1I = -S1I
+ C STR = C2R*S1R - C2I*S1I
+ C C2I = C2R*S1I + C2I*S1R
+ C C2R = STR
+ IN = INU + ND - 1
+ IN = MOD(IN,4) + 1
+ C2R = CAR*CIPR(IN) - SAR*CIPI(IN)
+ C2I = CAR*CIPI(IN) + SAR*CIPR(IN)
+ IF (ZI.LE.0.0D0) C2I = -C2I
+ GO TO 40
+ 130 CONTINUE
+ NLAST = ND
+ RETURN
+ 140 CONTINUE
+ NZ = -1
+ RETURN
+ 150 CONTINUE
+ IF (RS1.GT.0.0D0) GO TO 140
+ NZ = N
+ DO 160 I=1,N
+ YR(I) = ZEROR
+ YI(I) = ZEROI
+ 160 CONTINUE
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zunik.f octave-2.0.14/libcruft/amos/zunik.f
*** octave-2.0.13/libcruft/amos/zunik.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zunik.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,211 ----
+ SUBROUTINE ZUNIK(ZRR, ZRI, FNU, IKFLG, IPMTR, TOL, INIT, PHIR,
+ * PHII, ZETA1R, ZETA1I, ZETA2R, ZETA2I, SUMR, SUMI, CWRKR, CWRKI)
+ C***BEGIN PROLOGUE ZUNIK
+ C***REFER TO ZBESI,ZBESK
+ C
+ C ZUNIK COMPUTES PARAMETERS FOR THE UNIFORM ASYMPTOTIC
+ C EXPANSIONS OF THE I AND K FUNCTIONS ON IKFLG= 1 OR 2
+ C RESPECTIVELY BY
+ C
+ C W(FNU,ZR) = PHI*EXP(ZETA)*SUM
+ C
+ C WHERE ZETA=-ZETA1 + ZETA2 OR
+ C ZETA1 - ZETA2
+ C
+ C THE FIRST CALL MUST HAVE INIT=0. SUBSEQUENT CALLS WITH THE
+ C SAME ZR AND FNU WILL RETURN THE I OR K FUNCTION ON IKFLG=
+ C 1 OR 2 WITH NO CHANGE IN INIT. CWRK IS A COMPLEX WORK
+ C ARRAY. IPMTR=0 COMPUTES ALL PARAMETERS. IPMTR=1 COMPUTES PHI,
+ C ZETA1,ZETA2.
+ C
+ C***ROUTINES CALLED ZDIV,XZLOG,XZSQRT,D1MACH
+ C***END PROLOGUE ZUNIK
+ C COMPLEX CFN,CON,CONE,CRFN,CWRK,CZERO,PHI,S,SR,SUM,T,T2,ZETA1,
+ C *ZETA2,ZN,ZR
+ DOUBLE PRECISION AC, C, CON, CONEI, CONER, CRFNI, CRFNR, CWRKI,
+ * CWRKR, FNU, PHII, PHIR, RFN, SI, SR, SRI, SRR, STI, STR, SUMI,
+ * SUMR, TEST, TI, TOL, TR, T2I, T2R, ZEROI, ZEROR, ZETA1I, ZETA1R,
+ * ZETA2I, ZETA2R, ZNI, ZNR, ZRI, ZRR, D1MACH
+ INTEGER I, IDUM, IKFLG, INIT, IPMTR, J, K, L
+ DIMENSION C(120), CWRKR(16), CWRKI(16), CON(2)
+ DATA ZEROR,ZEROI,CONER,CONEI / 0.0D0, 0.0D0, 1.0D0, 0.0D0 /
+ DATA CON(1), CON(2) /
+ 1 3.98942280401432678D-01, 1.25331413731550025D+00 /
+ DATA C(1), C(2), C(3), C(4), C(5), C(6), C(7), C(8), C(9), C(10),
+ 1 C(11), C(12), C(13), C(14), C(15), C(16), C(17), C(18),
+ 2 C(19), C(20), C(21), C(22), C(23), C(24)/
+ 3 1.00000000000000000D+00, -2.08333333333333333D-01,
+ 4 1.25000000000000000D-01, 3.34201388888888889D-01,
+ 5 -4.01041666666666667D-01, 7.03125000000000000D-02,
+ 6 -1.02581259645061728D+00, 1.84646267361111111D+00,
+ 7 -8.91210937500000000D-01, 7.32421875000000000D-02,
+ 8 4.66958442342624743D+00, -1.12070026162229938D+01,
+ 9 8.78912353515625000D+00, -2.36408691406250000D+00,
+ A 1.12152099609375000D-01, -2.82120725582002449D+01,
+ B 8.46362176746007346D+01, -9.18182415432400174D+01,
+ C 4.25349987453884549D+01, -7.36879435947963170D+00,
+ D 2.27108001708984375D-01, 2.12570130039217123D+02,
+ E -7.65252468141181642D+02, 1.05999045252799988D+03/
+ DATA C(25), C(26), C(27), C(28), C(29), C(30), C(31), C(32),
+ 1 C(33), C(34), C(35), C(36), C(37), C(38), C(39), C(40),
+ 2 C(41), C(42), C(43), C(44), C(45), C(46), C(47), C(48)/
+ 3 -6.99579627376132541D+02, 2.18190511744211590D+02,
+ 4 -2.64914304869515555D+01, 5.72501420974731445D-01,
+ 5 -1.91945766231840700D+03, 8.06172218173730938D+03,
+ 6 -1.35865500064341374D+04, 1.16553933368645332D+04,
+ 7 -5.30564697861340311D+03, 1.20090291321635246D+03,
+ 8 -1.08090919788394656D+02, 1.72772750258445740D+00,
+ 9 2.02042913309661486D+04, -9.69805983886375135D+04,
+ A 1.92547001232531532D+05, -2.03400177280415534D+05,
+ B 1.22200464983017460D+05, -4.11926549688975513D+04,
+ C 7.10951430248936372D+03, -4.93915304773088012D+02,
+ D 6.07404200127348304D+00, -2.42919187900551333D+05,
+ E 1.31176361466297720D+06, -2.99801591853810675D+06/
+ DATA C(49), C(50), C(51), C(52), C(53), C(54), C(55), C(56),
+ 1 C(57), C(58), C(59), C(60), C(61), C(62), C(63), C(64),
+ 2 C(65), C(66), C(67), C(68), C(69), C(70), C(71), C(72)/
+ 3 3.76327129765640400D+06, -2.81356322658653411D+06,
+ 4 1.26836527332162478D+06, -3.31645172484563578D+05,
+ 5 4.52187689813627263D+04, -2.49983048181120962D+03,
+ 6 2.43805296995560639D+01, 3.28446985307203782D+06,
+ 7 -1.97068191184322269D+07, 5.09526024926646422D+07,
+ 8 -7.41051482115326577D+07, 6.63445122747290267D+07,
+ 9 -3.75671766607633513D+07, 1.32887671664218183D+07,
+ A -2.78561812808645469D+06, 3.08186404612662398D+05,
+ B -1.38860897537170405D+04, 1.10017140269246738D+02,
+ C -4.93292536645099620D+07, 3.25573074185765749D+08,
+ D -9.39462359681578403D+08, 1.55359689957058006D+09,
+ E -1.62108055210833708D+09, 1.10684281682301447D+09/
+ DATA C(73), C(74), C(75), C(76), C(77), C(78), C(79), C(80),
+ 1 C(81), C(82), C(83), C(84), C(85), C(86), C(87), C(88),
+ 2 C(89), C(90), C(91), C(92), C(93), C(94), C(95), C(96)/
+ 3 -4.95889784275030309D+08, 1.42062907797533095D+08,
+ 4 -2.44740627257387285D+07, 2.24376817792244943D+06,
+ 5 -8.40054336030240853D+04, 5.51335896122020586D+02,
+ 6 8.14789096118312115D+08, -5.86648149205184723D+09,
+ 7 1.86882075092958249D+10, -3.46320433881587779D+10,
+ 8 4.12801855797539740D+10, -3.30265997498007231D+10,
+ 9 1.79542137311556001D+10, -6.56329379261928433D+09,
+ A 1.55927986487925751D+09, -2.25105661889415278D+08,
+ B 1.73951075539781645D+07, -5.49842327572288687D+05,
+ C 3.03809051092238427D+03, -1.46792612476956167D+10,
+ D 1.14498237732025810D+11, -3.99096175224466498D+11,
+ E 8.19218669548577329D+11, -1.09837515608122331D+12/
+ DATA C(97), C(98), C(99), C(100), C(101), C(102), C(103), C(104),
+ 1 C(105), C(106), C(107), C(108), C(109), C(110), C(111),
+ 2 C(112), C(113), C(114), C(115), C(116), C(117), C(118)/
+ 3 1.00815810686538209D+12, -6.45364869245376503D+11,
+ 4 2.87900649906150589D+11, -8.78670721780232657D+10,
+ 5 1.76347306068349694D+10, -2.16716498322379509D+09,
+ 6 1.43157876718888981D+08, -3.87183344257261262D+06,
+ 7 1.82577554742931747D+04, 2.86464035717679043D+11,
+ 8 -2.40629790002850396D+12, 9.10934118523989896D+12,
+ 9 -2.05168994109344374D+13, 3.05651255199353206D+13,
+ A -3.16670885847851584D+13, 2.33483640445818409D+13,
+ B -1.23204913055982872D+13, 4.61272578084913197D+12,
+ C -1.19655288019618160D+12, 2.05914503232410016D+11,
+ D -2.18229277575292237D+10, 1.24700929351271032D+09/
+ DATA C(119), C(120)/
+ 1 -2.91883881222208134D+07, 1.18838426256783253D+05/
+ C
+ IF (INIT.NE.0) GO TO 40
+ C-----------------------------------------------------------------------
+ C INITIALIZE ALL VARIABLES
+ C-----------------------------------------------------------------------
+ RFN = 1.0D0/FNU
+ C-----------------------------------------------------------------------
+ C OVERFLOW TEST (ZR/FNU TOO SMALL)
+ C-----------------------------------------------------------------------
+ TEST = D1MACH(1)*1.0D+3
+ AC = FNU*TEST
+ IF (DABS(ZRR).GT.AC .OR. DABS(ZRI).GT.AC) GO TO 15
+ ZETA1R = 2.0D0*DABS(DLOG(TEST))+FNU
+ ZETA1I = 0.0D0
+ ZETA2R = FNU
+ ZETA2I = 0.0D0
+ PHIR = 1.0D0
+ PHII = 0.0D0
+ RETURN
+ 15 CONTINUE
+ TR = ZRR*RFN
+ TI = ZRI*RFN
+ SR = CONER + (TR*TR-TI*TI)
+ SI = CONEI + (TR*TI+TI*TR)
+ CALL XZSQRT(SR, SI, SRR, SRI)
+ STR = CONER + SRR
+ STI = CONEI + SRI
+ CALL ZDIV(STR, STI, TR, TI, ZNR, ZNI)
+ CALL XZLOG(ZNR, ZNI, STR, STI, IDUM)
+ ZETA1R = FNU*STR
+ ZETA1I = FNU*STI
+ ZETA2R = FNU*SRR
+ ZETA2I = FNU*SRI
+ CALL ZDIV(CONER, CONEI, SRR, SRI, TR, TI)
+ SRR = TR*RFN
+ SRI = TI*RFN
+ CALL XZSQRT(SRR, SRI, CWRKR(16), CWRKI(16))
+ PHIR = CWRKR(16)*CON(IKFLG)
+ PHII = CWRKI(16)*CON(IKFLG)
+ IF (IPMTR.NE.0) RETURN
+ CALL ZDIV(CONER, CONEI, SR, SI, T2R, T2I)
+ CWRKR(1) = CONER
+ CWRKI(1) = CONEI
+ CRFNR = CONER
+ CRFNI = CONEI
+ AC = 1.0D0
+ L = 1
+ DO 20 K=2,15
+ SR = ZEROR
+ SI = ZEROI
+ DO 10 J=1,K
+ L = L + 1
+ STR = SR*T2R - SI*T2I + C(L)
+ SI = SR*T2I + SI*T2R
+ SR = STR
+ 10 CONTINUE
+ STR = CRFNR*SRR - CRFNI*SRI
+ CRFNI = CRFNR*SRI + CRFNI*SRR
+ CRFNR = STR
+ CWRKR(K) = CRFNR*SR - CRFNI*SI
+ CWRKI(K) = CRFNR*SI + CRFNI*SR
+ AC = AC*RFN
+ TEST = DABS(CWRKR(K)) + DABS(CWRKI(K))
+ IF (AC.LT.TOL .AND. TEST.LT.TOL) GO TO 30
+ 20 CONTINUE
+ K = 15
+ 30 CONTINUE
+ INIT = K
+ 40 CONTINUE
+ IF (IKFLG.EQ.2) GO TO 60
+ C-----------------------------------------------------------------------
+ C COMPUTE SUM FOR THE I FUNCTION
+ C-----------------------------------------------------------------------
+ SR = ZEROR
+ SI = ZEROI
+ DO 50 I=1,INIT
+ SR = SR + CWRKR(I)
+ SI = SI + CWRKI(I)
+ 50 CONTINUE
+ SUMR = SR
+ SUMI = SI
+ PHIR = CWRKR(16)*CON(1)
+ PHII = CWRKI(16)*CON(1)
+ RETURN
+ 60 CONTINUE
+ C-----------------------------------------------------------------------
+ C COMPUTE SUM FOR THE K FUNCTION
+ C-----------------------------------------------------------------------
+ SR = ZEROR
+ SI = ZEROI
+ TR = CONER
+ DO 70 I=1,INIT
+ SR = SR + TR*CWRKR(I)
+ SI = SI + TR*CWRKI(I)
+ TR = -TR
+ 70 CONTINUE
+ SUMR = SR
+ SUMI = SI
+ PHIR = CWRKR(16)*CON(2)
+ PHII = CWRKI(16)*CON(2)
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zunk1.f octave-2.0.14/libcruft/amos/zunk1.f
*** octave-2.0.13/libcruft/amos/zunk1.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zunk1.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,426 ----
+ SUBROUTINE ZUNK1(ZR, ZI, FNU, KODE, MR, N, YR, YI, NZ, TOL, ELIM,
+ * ALIM)
+ C***BEGIN PROLOGUE ZUNK1
+ C***REFER TO ZBESK
+ C
+ C ZUNK1 COMPUTES K(FNU,Z) AND ITS ANALYTIC CONTINUATION FROM THE
+ C RIGHT HALF PLANE TO THE LEFT HALF PLANE BY MEANS OF THE
+ C UNIFORM ASYMPTOTIC EXPANSION.
+ C MR INDICATES THE DIRECTION OF ROTATION FOR ANALYTIC CONTINUATION.
+ C NZ=-1 MEANS AN OVERFLOW WILL OCCUR
+ C
+ C***ROUTINES CALLED ZKSCL,ZS1S2,ZUCHK,ZUNIK,D1MACH,XZABS
+ C***END PROLOGUE ZUNK1
+ C COMPLEX CFN,CK,CONE,CRSC,CS,CSCL,CSGN,CSPN,CSR,CSS,CWRK,CY,CZERO,
+ C *C1,C2,PHI,PHID,RZ,SUM,SUMD,S1,S2,Y,Z,ZETA1,ZETA1D,ZETA2,ZETA2D,ZR
+ DOUBLE PRECISION ALIM, ANG, APHI, ASC, ASCLE, BRY, CKI, CKR,
+ * CONER, CRSC, CSCL, CSGNI, CSPNI, CSPNR, CSR, CSRR, CSSR,
+ * CWRKI, CWRKR, CYI, CYR, C1I, C1R, C2I, C2M, C2R, ELIM, FMR, FN,
+ * FNF, FNU, PHIDI, PHIDR, PHII, PHIR, PI, RAST, RAZR, RS1, RZI,
+ * RZR, SGN, STI, STR, SUMDI, SUMDR, SUMI, SUMR, S1I, S1R, S2I,
+ * S2R, TOL, YI, YR, ZEROI, ZEROR, ZETA1I, ZETA1R, ZETA2I, ZETA2R,
+ * ZET1DI, ZET1DR, ZET2DI, ZET2DR, ZI, ZR, ZRI, ZRR, D1MACH, XZABS
+ INTEGER I, IB, IFLAG, IFN, IL, INIT, INU, IUF, K, KDFLG, KFLAG,
+ * KK, KODE, MR, N, NW, NZ, INITD, IC, IPARD, J
+ DIMENSION BRY(3), INIT(2), YR(N), YI(N), SUMR(2), SUMI(2),
+ * ZETA1R(2), ZETA1I(2), ZETA2R(2), ZETA2I(2), CYR(2), CYI(2),
+ * CWRKR(16,3), CWRKI(16,3), CSSR(3), CSRR(3), PHIR(2), PHII(2)
+ DATA ZEROR,ZEROI,CONER / 0.0D0, 0.0D0, 1.0D0 /
+ DATA PI / 3.14159265358979324D0 /
+ C
+ KDFLG = 1
+ NZ = 0
+ C-----------------------------------------------------------------------
+ C EXP(-ALIM)=EXP(-ELIM)/TOL=APPROX. ONE PRECISION GREATER THAN
+ C THE UNDERFLOW LIMIT
+ C-----------------------------------------------------------------------
+ CSCL = 1.0D0/TOL
+ CRSC = TOL
+ CSSR(1) = CSCL
+ CSSR(2) = CONER
+ CSSR(3) = CRSC
+ CSRR(1) = CRSC
+ CSRR(2) = CONER
+ CSRR(3) = CSCL
+ BRY(1) = 1.0D+3*D1MACH(1)/TOL
+ BRY(2) = 1.0D0/BRY(1)
+ BRY(3) = D1MACH(2)
+ ZRR = ZR
+ ZRI = ZI
+ IF (ZR.GE.0.0D0) GO TO 10
+ ZRR = -ZR
+ ZRI = -ZI
+ 10 CONTINUE
+ J = 2
+ DO 70 I=1,N
+ C-----------------------------------------------------------------------
+ C J FLIP FLOPS BETWEEN 1 AND 2 IN J = 3 - J
+ C-----------------------------------------------------------------------
+ J = 3 - J
+ FN = FNU + DBLE(FLOAT(I-1))
+ INIT(J) = 0
+ CALL ZUNIK(ZRR, ZRI, FN, 2, 0, TOL, INIT(J), PHIR(J), PHII(J),
+ * ZETA1R(J), ZETA1I(J), ZETA2R(J), ZETA2I(J), SUMR(J), SUMI(J),
+ * CWRKR(1,J), CWRKI(1,J))
+ IF (KODE.EQ.1) GO TO 20
+ STR = ZRR + ZETA2R(J)
+ STI = ZRI + ZETA2I(J)
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = ZETA1R(J) - STR
+ S1I = ZETA1I(J) - STI
+ GO TO 30
+ 20 CONTINUE
+ S1R = ZETA1R(J) - ZETA2R(J)
+ S1I = ZETA1I(J) - ZETA2I(J)
+ 30 CONTINUE
+ RS1 = S1R
+ C-----------------------------------------------------------------------
+ C TEST FOR UNDERFLOW AND OVERFLOW
+ C-----------------------------------------------------------------------
+ IF (DABS(RS1).GT.ELIM) GO TO 60
+ IF (KDFLG.EQ.1) KFLAG = 2
+ IF (DABS(RS1).LT.ALIM) GO TO 40
+ C-----------------------------------------------------------------------
+ C REFINE TEST AND SCALE
+ C-----------------------------------------------------------------------
+ APHI = XZABS(PHIR(J),PHII(J))
+ RS1 = RS1 + DLOG(APHI)
+ IF (DABS(RS1).GT.ELIM) GO TO 60
+ IF (KDFLG.EQ.1) KFLAG = 1
+ IF (RS1.LT.0.0D0) GO TO 40
+ IF (KDFLG.EQ.1) KFLAG = 3
+ 40 CONTINUE
+ C-----------------------------------------------------------------------
+ C SCALE S1 TO KEEP INTERMEDIATE ARITHMETIC ON SCALE NEAR
+ C EXPONENT EXTREMES
+ C-----------------------------------------------------------------------
+ S2R = PHIR(J)*SUMR(J) - PHII(J)*SUMI(J)
+ S2I = PHIR(J)*SUMI(J) + PHII(J)*SUMR(J)
+ STR = DEXP(S1R)*CSSR(KFLAG)
+ S1R = STR*DCOS(S1I)
+ S1I = STR*DSIN(S1I)
+ STR = S2R*S1R - S2I*S1I
+ S2I = S1R*S2I + S2R*S1I
+ S2R = STR
+ IF (KFLAG.NE.1) GO TO 50
+ CALL ZUCHK(S2R, S2I, NW, BRY(1), TOL)
+ IF (NW.NE.0) GO TO 60
+ 50 CONTINUE
+ CYR(KDFLG) = S2R
+ CYI(KDFLG) = S2I
+ YR(I) = S2R*CSRR(KFLAG)
+ YI(I) = S2I*CSRR(KFLAG)
+ IF (KDFLG.EQ.2) GO TO 75
+ KDFLG = 2
+ GO TO 70
+ 60 CONTINUE
+ IF (RS1.GT.0.0D0) GO TO 300
+ C-----------------------------------------------------------------------
+ C FOR ZR.LT.0.0, THE I FUNCTION TO BE ADDED WILL OVERFLOW
+ C-----------------------------------------------------------------------
+ IF (ZR.LT.0.0D0) GO TO 300
+ KDFLG = 1
+ YR(I)=ZEROR
+ YI(I)=ZEROI
+ NZ=NZ+1
+ IF (I.EQ.1) GO TO 70
+ IF ((YR(I-1).EQ.ZEROR).AND.(YI(I-1).EQ.ZEROI)) GO TO 70
+ YR(I-1)=ZEROR
+ YI(I-1)=ZEROI
+ NZ=NZ+1
+ 70 CONTINUE
+ I = N
+ 75 CONTINUE
+ RAZR = 1.0D0/XZABS(ZRR,ZRI)
+ STR = ZRR*RAZR
+ STI = -ZRI*RAZR
+ RZR = (STR+STR)*RAZR
+ RZI = (STI+STI)*RAZR
+ CKR = FN*RZR
+ CKI = FN*RZI
+ IB = I + 1
+ IF (N.LT.IB) GO TO 160
+ C-----------------------------------------------------------------------
+ C TEST LAST MEMBER FOR UNDERFLOW AND OVERFLOW. SET SEQUENCE TO ZERO
+ C ON UNDERFLOW.
+ C-----------------------------------------------------------------------
+ FN = FNU + DBLE(FLOAT(N-1))
+ IPARD = 1
+ IF (MR.NE.0) IPARD = 0
+ INITD = 0
+ CALL ZUNIK(ZRR, ZRI, FN, 2, IPARD, TOL, INITD, PHIDR, PHIDI,
+ * ZET1DR, ZET1DI, ZET2DR, ZET2DI, SUMDR, SUMDI, CWRKR(1,3),
+ * CWRKI(1,3))
+ IF (KODE.EQ.1) GO TO 80
+ STR = ZRR + ZET2DR
+ STI = ZRI + ZET2DI
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = ZET1DR - STR
+ S1I = ZET1DI - STI
+ GO TO 90
+ 80 CONTINUE
+ S1R = ZET1DR - ZET2DR
+ S1I = ZET1DI - ZET2DI
+ 90 CONTINUE
+ RS1 = S1R
+ IF (DABS(RS1).GT.ELIM) GO TO 95
+ IF (DABS(RS1).LT.ALIM) GO TO 100
+ C----------------------------------------------------------------------------
+ C REFINE ESTIMATE AND TEST
+ C-------------------------------------------------------------------------
+ APHI = XZABS(PHIDR,PHIDI)
+ RS1 = RS1+DLOG(APHI)
+ IF (DABS(RS1).LT.ELIM) GO TO 100
+ 95 CONTINUE
+ IF (DABS(RS1).GT.0.0D0) GO TO 300
+ C-----------------------------------------------------------------------
+ C FOR ZR.LT.0.0, THE I FUNCTION TO BE ADDED WILL OVERFLOW
+ C-----------------------------------------------------------------------
+ IF (ZR.LT.0.0D0) GO TO 300
+ NZ = N
+ DO 96 I=1,N
+ YR(I) = ZEROR
+ YI(I) = ZEROI
+ 96 CONTINUE
+ RETURN
+ C---------------------------------------------------------------------------
+ C FORWARD RECUR FOR REMAINDER OF THE SEQUENCE
+ C----------------------------------------------------------------------------
+ 100 CONTINUE
+ S1R = CYR(1)
+ S1I = CYI(1)
+ S2R = CYR(2)
+ S2I = CYI(2)
+ C1R = CSRR(KFLAG)
+ ASCLE = BRY(KFLAG)
+ DO 120 I=IB,N
+ C2R = S2R
+ C2I = S2I
+ S2R = CKR*C2R - CKI*C2I + S1R
+ S2I = CKR*C2I + CKI*C2R + S1I
+ S1R = C2R
+ S1I = C2I
+ CKR = CKR + RZR
+ CKI = CKI + RZI
+ C2R = S2R*C1R
+ C2I = S2I*C1R
+ YR(I) = C2R
+ YI(I) = C2I
+ IF (KFLAG.GE.3) GO TO 120
+ STR = DABS(C2R)
+ STI = DABS(C2I)
+ C2M = DMAX1(STR,STI)
+ IF (C2M.LE.ASCLE) GO TO 120
+ KFLAG = KFLAG + 1
+ ASCLE = BRY(KFLAG)
+ S1R = S1R*C1R
+ S1I = S1I*C1R
+ S2R = C2R
+ S2I = C2I
+ S1R = S1R*CSSR(KFLAG)
+ S1I = S1I*CSSR(KFLAG)
+ S2R = S2R*CSSR(KFLAG)
+ S2I = S2I*CSSR(KFLAG)
+ C1R = CSRR(KFLAG)
+ 120 CONTINUE
+ 160 CONTINUE
+ IF (MR.EQ.0) RETURN
+ C-----------------------------------------------------------------------
+ C ANALYTIC CONTINUATION FOR RE(Z).LT.0.0D0
+ C-----------------------------------------------------------------------
+ NZ = 0
+ FMR = DBLE(FLOAT(MR))
+ SGN = -DSIGN(PI,FMR)
+ C-----------------------------------------------------------------------
+ C CSPN AND CSGN ARE COEFF OF K AND I FUNCTIONS RESP.
+ C-----------------------------------------------------------------------
+ CSGNI = SGN
+ INU = INT(SNGL(FNU))
+ FNF = FNU - DBLE(FLOAT(INU))
+ IFN = INU + N - 1
+ ANG = FNF*SGN
+ CSPNR = DCOS(ANG)
+ CSPNI = DSIN(ANG)
+ IF (MOD(IFN,2).EQ.0) GO TO 170
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ 170 CONTINUE
+ ASC = BRY(1)
+ IUF = 0
+ KK = N
+ KDFLG = 1
+ IB = IB - 1
+ IC = IB - 1
+ DO 270 K=1,N
+ FN = FNU + DBLE(FLOAT(KK-1))
+ C-----------------------------------------------------------------------
+ C LOGIC TO SORT OUT CASES WHOSE PARAMETERS WERE SET FOR THE K
+ C FUNCTION ABOVE
+ C-----------------------------------------------------------------------
+ M=3
+ IF (N.GT.2) GO TO 175
+ 172 CONTINUE
+ INITD = INIT(J)
+ PHIDR = PHIR(J)
+ PHIDI = PHII(J)
+ ZET1DR = ZETA1R(J)
+ ZET1DI = ZETA1I(J)
+ ZET2DR = ZETA2R(J)
+ ZET2DI = ZETA2I(J)
+ SUMDR = SUMR(J)
+ SUMDI = SUMI(J)
+ M = J
+ J = 3 - J
+ GO TO 180
+ 175 CONTINUE
+ IF ((KK.EQ.N).AND.(IB.LT.N)) GO TO 180
+ IF ((KK.EQ.IB).OR.(KK.EQ.IC)) GO TO 172
+ INITD = 0
+ 180 CONTINUE
+ CALL ZUNIK(ZRR, ZRI, FN, 1, 0, TOL, INITD, PHIDR, PHIDI,
+ * ZET1DR, ZET1DI, ZET2DR, ZET2DI, SUMDR, SUMDI,
+ * CWRKR(1,M), CWRKI(1,M))
+ IF (KODE.EQ.1) GO TO 200
+ STR = ZRR + ZET2DR
+ STI = ZRI + ZET2DI
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = -ZET1DR + STR
+ S1I = -ZET1DI + STI
+ GO TO 210
+ 200 CONTINUE
+ S1R = -ZET1DR + ZET2DR
+ S1I = -ZET1DI + ZET2DI
+ 210 CONTINUE
+ C-----------------------------------------------------------------------
+ C TEST FOR UNDERFLOW AND OVERFLOW
+ C-----------------------------------------------------------------------
+ RS1 = S1R
+ IF (DABS(RS1).GT.ELIM) GO TO 260
+ IF (KDFLG.EQ.1) IFLAG = 2
+ IF (DABS(RS1).LT.ALIM) GO TO 220
+ C-----------------------------------------------------------------------
+ C REFINE TEST AND SCALE
+ C-----------------------------------------------------------------------
+ APHI = XZABS(PHIDR,PHIDI)
+ RS1 = RS1 + DLOG(APHI)
+ IF (DABS(RS1).GT.ELIM) GO TO 260
+ IF (KDFLG.EQ.1) IFLAG = 1
+ IF (RS1.LT.0.0D0) GO TO 220
+ IF (KDFLG.EQ.1) IFLAG = 3
+ 220 CONTINUE
+ STR = PHIDR*SUMDR - PHIDI*SUMDI
+ STI = PHIDR*SUMDI + PHIDI*SUMDR
+ S2R = -CSGNI*STI
+ S2I = CSGNI*STR
+ STR = DEXP(S1R)*CSSR(IFLAG)
+ S1R = STR*DCOS(S1I)
+ S1I = STR*DSIN(S1I)
+ STR = S2R*S1R - S2I*S1I
+ S2I = S2R*S1I + S2I*S1R
+ S2R = STR
+ IF (IFLAG.NE.1) GO TO 230
+ CALL ZUCHK(S2R, S2I, NW, BRY(1), TOL)
+ IF (NW.EQ.0) GO TO 230
+ S2R = ZEROR
+ S2I = ZEROI
+ 230 CONTINUE
+ CYR(KDFLG) = S2R
+ CYI(KDFLG) = S2I
+ C2R = S2R
+ C2I = S2I
+ S2R = S2R*CSRR(IFLAG)
+ S2I = S2I*CSRR(IFLAG)
+ C-----------------------------------------------------------------------
+ C ADD I AND K FUNCTIONS, K SEQUENCE IN Y(I), I=1,N
+ C-----------------------------------------------------------------------
+ S1R = YR(KK)
+ S1I = YI(KK)
+ IF (KODE.EQ.1) GO TO 250
+ CALL ZS1S2(ZRR, ZRI, S1R, S1I, S2R, S2I, NW, ASC, ALIM, IUF)
+ NZ = NZ + NW
+ 250 CONTINUE
+ YR(KK) = S1R*CSPNR - S1I*CSPNI + S2R
+ YI(KK) = CSPNR*S1I + CSPNI*S1R + S2I
+ KK = KK - 1
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ IF (C2R.NE.0.0D0 .OR. C2I.NE.0.0D0) GO TO 255
+ KDFLG = 1
+ GO TO 270
+ 255 CONTINUE
+ IF (KDFLG.EQ.2) GO TO 275
+ KDFLG = 2
+ GO TO 270
+ 260 CONTINUE
+ IF (RS1.GT.0.0D0) GO TO 300
+ S2R = ZEROR
+ S2I = ZEROI
+ GO TO 230
+ 270 CONTINUE
+ K = N
+ 275 CONTINUE
+ IL = N - K
+ IF (IL.EQ.0) RETURN
+ C-----------------------------------------------------------------------
+ C RECUR BACKWARD FOR REMAINDER OF I SEQUENCE AND ADD IN THE
+ C K FUNCTIONS, SCALING THE I SEQUENCE DURING RECURRENCE TO KEEP
+ C INTERMEDIATE ARITHMETIC ON SCALE NEAR EXPONENT EXTREMES.
+ C-----------------------------------------------------------------------
+ S1R = CYR(1)
+ S1I = CYI(1)
+ S2R = CYR(2)
+ S2I = CYI(2)
+ CSR = CSRR(IFLAG)
+ ASCLE = BRY(IFLAG)
+ FN = DBLE(FLOAT(INU+IL))
+ DO 290 I=1,IL
+ C2R = S2R
+ C2I = S2I
+ S2R = S1R + (FN+FNF)*(RZR*C2R-RZI*C2I)
+ S2I = S1I + (FN+FNF)*(RZR*C2I+RZI*C2R)
+ S1R = C2R
+ S1I = C2I
+ FN = FN - 1.0D0
+ C2R = S2R*CSR
+ C2I = S2I*CSR
+ CKR = C2R
+ CKI = C2I
+ C1R = YR(KK)
+ C1I = YI(KK)
+ IF (KODE.EQ.1) GO TO 280
+ CALL ZS1S2(ZRR, ZRI, C1R, C1I, C2R, C2I, NW, ASC, ALIM, IUF)
+ NZ = NZ + NW
+ 280 CONTINUE
+ YR(KK) = C1R*CSPNR - C1I*CSPNI + C2R
+ YI(KK) = C1R*CSPNI + C1I*CSPNR + C2I
+ KK = KK - 1
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ IF (IFLAG.GE.3) GO TO 290
+ C2R = DABS(CKR)
+ C2I = DABS(CKI)
+ C2M = DMAX1(C2R,C2I)
+ IF (C2M.LE.ASCLE) GO TO 290
+ IFLAG = IFLAG + 1
+ ASCLE = BRY(IFLAG)
+ S1R = S1R*CSR
+ S1I = S1I*CSR
+ S2R = CKR
+ S2I = CKI
+ S1R = S1R*CSSR(IFLAG)
+ S1I = S1I*CSSR(IFLAG)
+ S2R = S2R*CSSR(IFLAG)
+ S2I = S2I*CSSR(IFLAG)
+ CSR = CSRR(IFLAG)
+ 290 CONTINUE
+ RETURN
+ 300 CONTINUE
+ NZ = -1
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zunk2.f octave-2.0.14/libcruft/amos/zunk2.f
*** octave-2.0.13/libcruft/amos/zunk2.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zunk2.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,505 ----
+ SUBROUTINE ZUNK2(ZR, ZI, FNU, KODE, MR, N, YR, YI, NZ, TOL, ELIM,
+ * ALIM)
+ C***BEGIN PROLOGUE ZUNK2
+ C***REFER TO ZBESK
+ C
+ C ZUNK2 COMPUTES K(FNU,Z) AND ITS ANALYTIC CONTINUATION FROM THE
+ C RIGHT HALF PLANE TO THE LEFT HALF PLANE BY MEANS OF THE
+ C UNIFORM ASYMPTOTIC EXPANSIONS FOR H(KIND,FNU,ZN) AND J(FNU,ZN)
+ C WHERE ZN IS IN THE RIGHT HALF PLANE, KIND=(3-MR)/2, MR=+1 OR
+ C -1. HERE ZN=ZR*I OR -ZR*I WHERE ZR=Z IF Z IS IN THE RIGHT
+ C HALF PLANE OR ZR=-Z IF Z IS IN THE LEFT HALF PLANE. MR INDIC-
+ C ATES THE DIRECTION OF ROTATION FOR ANALYTIC CONTINUATION.
+ C NZ=-1 MEANS AN OVERFLOW WILL OCCUR
+ C
+ C***ROUTINES CALLED ZAIRY,ZKSCL,ZS1S2,ZUCHK,ZUNHJ,D1MACH,XZABS
+ C***END PROLOGUE ZUNK2
+ C COMPLEX AI,ARG,ARGD,ASUM,ASUMD,BSUM,BSUMD,CFN,CI,CIP,CK,CONE,CRSC,
+ C *CR1,CR2,CS,CSCL,CSGN,CSPN,CSR,CSS,CY,CZERO,C1,C2,DAI,PHI,PHID,RZ,
+ C *S1,S2,Y,Z,ZB,ZETA1,ZETA1D,ZETA2,ZETA2D,ZN,ZR
+ DOUBLE PRECISION AARG, AIC, AII, AIR, ALIM, ANG, APHI, ARGDI,
+ * ARGDR, ARGI, ARGR, ASC, ASCLE, ASUMDI, ASUMDR, ASUMI, ASUMR,
+ * BRY, BSUMDI, BSUMDR, BSUMI, BSUMR, CAR, CIPI, CIPR, CKI, CKR,
+ * CONER, CRSC, CR1I, CR1R, CR2I, CR2R, CSCL, CSGNI, CSI,
+ * CSPNI, CSPNR, CSR, CSRR, CSSR, CYI, CYR, C1I, C1R, C2I, C2M,
+ * C2R, DAII, DAIR, ELIM, FMR, FN, FNF, FNU, HPI, PHIDI, PHIDR,
+ * PHII, PHIR, PI, PTI, PTR, RAST, RAZR, RS1, RZI, RZR, SAR, SGN,
+ * STI, STR, S1I, S1R, S2I, S2R, TOL, YI, YR, YY, ZBI, ZBR, ZEROI,
+ * ZEROR, ZETA1I, ZETA1R, ZETA2I, ZETA2R, ZET1DI, ZET1DR, ZET2DI,
+ * ZET2DR, ZI, ZNI, ZNR, ZR, ZRI, ZRR, D1MACH, XZABS
+ INTEGER I, IB, IFLAG, IFN, IL, IN, INU, IUF, K, KDFLG, KFLAG, KK,
+ * KODE, MR, N, NAI, NDAI, NW, NZ, IDUM, J, IPARD, IC
+ DIMENSION BRY(3), YR(N), YI(N), ASUMR(2), ASUMI(2), BSUMR(2),
+ * BSUMI(2), PHIR(2), PHII(2), ARGR(2), ARGI(2), ZETA1R(2),
+ * ZETA1I(2), ZETA2R(2), ZETA2I(2), CYR(2), CYI(2), CIPR(4),
+ * CIPI(4), CSSR(3), CSRR(3)
+ DATA ZEROR,ZEROI,CONER,CR1R,CR1I,CR2R,CR2I /
+ 1 0.0D0, 0.0D0, 1.0D0,
+ 1 1.0D0,1.73205080756887729D0 , -0.5D0,-8.66025403784438647D-01 /
+ DATA HPI, PI, AIC /
+ 1 1.57079632679489662D+00, 3.14159265358979324D+00,
+ 1 1.26551212348464539D+00/
+ DATA CIPR(1),CIPI(1),CIPR(2),CIPI(2),CIPR(3),CIPI(3),CIPR(4),
+ * CIPI(4) /
+ 1 1.0D0,0.0D0 , 0.0D0,-1.0D0 , -1.0D0,0.0D0 , 0.0D0,1.0D0 /
+ C
+ KDFLG = 1
+ NZ = 0
+ C-----------------------------------------------------------------------
+ C EXP(-ALIM)=EXP(-ELIM)/TOL=APPROX. ONE PRECISION GREATER THAN
+ C THE UNDERFLOW LIMIT
+ C-----------------------------------------------------------------------
+ CSCL = 1.0D0/TOL
+ CRSC = TOL
+ CSSR(1) = CSCL
+ CSSR(2) = CONER
+ CSSR(3) = CRSC
+ CSRR(1) = CRSC
+ CSRR(2) = CONER
+ CSRR(3) = CSCL
+ BRY(1) = 1.0D+3*D1MACH(1)/TOL
+ BRY(2) = 1.0D0/BRY(1)
+ BRY(3) = D1MACH(2)
+ ZRR = ZR
+ ZRI = ZI
+ IF (ZR.GE.0.0D0) GO TO 10
+ ZRR = -ZR
+ ZRI = -ZI
+ 10 CONTINUE
+ YY = ZRI
+ ZNR = ZRI
+ ZNI = -ZRR
+ ZBR = ZRR
+ ZBI = ZRI
+ INU = INT(SNGL(FNU))
+ FNF = FNU - DBLE(FLOAT(INU))
+ ANG = -HPI*FNF
+ CAR = DCOS(ANG)
+ SAR = DSIN(ANG)
+ C2R = HPI*SAR
+ C2I = -HPI*CAR
+ KK = MOD(INU,4) + 1
+ STR = C2R*CIPR(KK) - C2I*CIPI(KK)
+ STI = C2R*CIPI(KK) + C2I*CIPR(KK)
+ CSR = CR1R*STR - CR1I*STI
+ CSI = CR1R*STI + CR1I*STR
+ IF (YY.GT.0.0D0) GO TO 20
+ ZNR = -ZNR
+ ZBI = -ZBI
+ 20 CONTINUE
+ C-----------------------------------------------------------------------
+ C K(FNU,Z) IS COMPUTED FROM H(2,FNU,-I*Z) WHERE Z IS IN THE FIRST
+ C QUADRANT. FOURTH QUADRANT VALUES (YY.LE.0.0E0) ARE COMPUTED BY
+ C CONJUGATION SINCE THE K FUNCTION IS REAL ON THE POSITIVE REAL AXIS
+ C-----------------------------------------------------------------------
+ J = 2
+ DO 80 I=1,N
+ C-----------------------------------------------------------------------
+ C J FLIP FLOPS BETWEEN 1 AND 2 IN J = 3 - J
+ C-----------------------------------------------------------------------
+ J = 3 - J
+ FN = FNU + DBLE(FLOAT(I-1))
+ CALL ZUNHJ(ZNR, ZNI, FN, 0, TOL, PHIR(J), PHII(J), ARGR(J),
+ * ARGI(J), ZETA1R(J), ZETA1I(J), ZETA2R(J), ZETA2I(J), ASUMR(J),
+ * ASUMI(J), BSUMR(J), BSUMI(J))
+ IF (KODE.EQ.1) GO TO 30
+ STR = ZBR + ZETA2R(J)
+ STI = ZBI + ZETA2I(J)
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = ZETA1R(J) - STR
+ S1I = ZETA1I(J) - STI
+ GO TO 40
+ 30 CONTINUE
+ S1R = ZETA1R(J) - ZETA2R(J)
+ S1I = ZETA1I(J) - ZETA2I(J)
+ 40 CONTINUE
+ C-----------------------------------------------------------------------
+ C TEST FOR UNDERFLOW AND OVERFLOW
+ C-----------------------------------------------------------------------
+ RS1 = S1R
+ IF (DABS(RS1).GT.ELIM) GO TO 70
+ IF (KDFLG.EQ.1) KFLAG = 2
+ IF (DABS(RS1).LT.ALIM) GO TO 50
+ C-----------------------------------------------------------------------
+ C REFINE TEST AND SCALE
+ C-----------------------------------------------------------------------
+ APHI = XZABS(PHIR(J),PHII(J))
+ AARG = XZABS(ARGR(J),ARGI(J))
+ RS1 = RS1 + DLOG(APHI) - 0.25D0*DLOG(AARG) - AIC
+ IF (DABS(RS1).GT.ELIM) GO TO 70
+ IF (KDFLG.EQ.1) KFLAG = 1
+ IF (RS1.LT.0.0D0) GO TO 50
+ IF (KDFLG.EQ.1) KFLAG = 3
+ 50 CONTINUE
+ C-----------------------------------------------------------------------
+ C SCALE S1 TO KEEP INTERMEDIATE ARITHMETIC ON SCALE NEAR
+ C EXPONENT EXTREMES
+ C-----------------------------------------------------------------------
+ C2R = ARGR(J)*CR2R - ARGI(J)*CR2I
+ C2I = ARGR(J)*CR2I + ARGI(J)*CR2R
+ CALL ZAIRY(C2R, C2I, 0, 2, AIR, AII, NAI, IDUM)
+ CALL ZAIRY(C2R, C2I, 1, 2, DAIR, DAII, NDAI, IDUM)
+ STR = DAIR*BSUMR(J) - DAII*BSUMI(J)
+ STI = DAIR*BSUMI(J) + DAII*BSUMR(J)
+ PTR = STR*CR2R - STI*CR2I
+ PTI = STR*CR2I + STI*CR2R
+ STR = PTR + (AIR*ASUMR(J)-AII*ASUMI(J))
+ STI = PTI + (AIR*ASUMI(J)+AII*ASUMR(J))
+ PTR = STR*PHIR(J) - STI*PHII(J)
+ PTI = STR*PHII(J) + STI*PHIR(J)
+ S2R = PTR*CSR - PTI*CSI
+ S2I = PTR*CSI + PTI*CSR
+ STR = DEXP(S1R)*CSSR(KFLAG)
+ S1R = STR*DCOS(S1I)
+ S1I = STR*DSIN(S1I)
+ STR = S2R*S1R - S2I*S1I
+ S2I = S1R*S2I + S2R*S1I
+ S2R = STR
+ IF (KFLAG.NE.1) GO TO 60
+ CALL ZUCHK(S2R, S2I, NW, BRY(1), TOL)
+ IF (NW.NE.0) GO TO 70
+ 60 CONTINUE
+ IF (YY.LE.0.0D0) S2I = -S2I
+ CYR(KDFLG) = S2R
+ CYI(KDFLG) = S2I
+ YR(I) = S2R*CSRR(KFLAG)
+ YI(I) = S2I*CSRR(KFLAG)
+ STR = CSI
+ CSI = -CSR
+ CSR = STR
+ IF (KDFLG.EQ.2) GO TO 85
+ KDFLG = 2
+ GO TO 80
+ 70 CONTINUE
+ IF (RS1.GT.0.0D0) GO TO 320
+ C-----------------------------------------------------------------------
+ C FOR ZR.LT.0.0, THE I FUNCTION TO BE ADDED WILL OVERFLOW
+ C-----------------------------------------------------------------------
+ IF (ZR.LT.0.0D0) GO TO 320
+ KDFLG = 1
+ YR(I)=ZEROR
+ YI(I)=ZEROI
+ NZ=NZ+1
+ STR = CSI
+ CSI =-CSR
+ CSR = STR
+ IF (I.EQ.1) GO TO 80
+ IF ((YR(I-1).EQ.ZEROR).AND.(YI(I-1).EQ.ZEROI)) GO TO 80
+ YR(I-1)=ZEROR
+ YI(I-1)=ZEROI
+ NZ=NZ+1
+ 80 CONTINUE
+ I = N
+ 85 CONTINUE
+ RAZR = 1.0D0/XZABS(ZRR,ZRI)
+ STR = ZRR*RAZR
+ STI = -ZRI*RAZR
+ RZR = (STR+STR)*RAZR
+ RZI = (STI+STI)*RAZR
+ CKR = FN*RZR
+ CKI = FN*RZI
+ IB = I + 1
+ IF (N.LT.IB) GO TO 180
+ C-----------------------------------------------------------------------
+ C TEST LAST MEMBER FOR UNDERFLOW AND OVERFLOW. SET SEQUENCE TO ZERO
+ C ON UNDERFLOW.
+ C-----------------------------------------------------------------------
+ FN = FNU + DBLE(FLOAT(N-1))
+ IPARD = 1
+ IF (MR.NE.0) IPARD = 0
+ CALL ZUNHJ(ZNR, ZNI, FN, IPARD, TOL, PHIDR, PHIDI, ARGDR, ARGDI,
+ * ZET1DR, ZET1DI, ZET2DR, ZET2DI, ASUMDR, ASUMDI, BSUMDR, BSUMDI)
+ IF (KODE.EQ.1) GO TO 90
+ STR = ZBR + ZET2DR
+ STI = ZBI + ZET2DI
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = ZET1DR - STR
+ S1I = ZET1DI - STI
+ GO TO 100
+ 90 CONTINUE
+ S1R = ZET1DR - ZET2DR
+ S1I = ZET1DI - ZET2DI
+ 100 CONTINUE
+ RS1 = S1R
+ IF (DABS(RS1).GT.ELIM) GO TO 105
+ IF (DABS(RS1).LT.ALIM) GO TO 120
+ C----------------------------------------------------------------------------
+ C REFINE ESTIMATE AND TEST
+ C-------------------------------------------------------------------------
+ APHI = XZABS(PHIDR,PHIDI)
+ RS1 = RS1+DLOG(APHI)
+ IF (DABS(RS1).LT.ELIM) GO TO 120
+ 105 CONTINUE
+ IF (RS1.GT.0.0D0) GO TO 320
+ C-----------------------------------------------------------------------
+ C FOR ZR.LT.0.0, THE I FUNCTION TO BE ADDED WILL OVERFLOW
+ C-----------------------------------------------------------------------
+ IF (ZR.LT.0.0D0) GO TO 320
+ NZ = N
+ DO 106 I=1,N
+ YR(I) = ZEROR
+ YI(I) = ZEROI
+ 106 CONTINUE
+ RETURN
+ 120 CONTINUE
+ S1R = CYR(1)
+ S1I = CYI(1)
+ S2R = CYR(2)
+ S2I = CYI(2)
+ C1R = CSRR(KFLAG)
+ ASCLE = BRY(KFLAG)
+ DO 130 I=IB,N
+ C2R = S2R
+ C2I = S2I
+ S2R = CKR*C2R - CKI*C2I + S1R
+ S2I = CKR*C2I + CKI*C2R + S1I
+ S1R = C2R
+ S1I = C2I
+ CKR = CKR + RZR
+ CKI = CKI + RZI
+ C2R = S2R*C1R
+ C2I = S2I*C1R
+ YR(I) = C2R
+ YI(I) = C2I
+ IF (KFLAG.GE.3) GO TO 130
+ STR = DABS(C2R)
+ STI = DABS(C2I)
+ C2M = DMAX1(STR,STI)
+ IF (C2M.LE.ASCLE) GO TO 130
+ KFLAG = KFLAG + 1
+ ASCLE = BRY(KFLAG)
+ S1R = S1R*C1R
+ S1I = S1I*C1R
+ S2R = C2R
+ S2I = C2I
+ S1R = S1R*CSSR(KFLAG)
+ S1I = S1I*CSSR(KFLAG)
+ S2R = S2R*CSSR(KFLAG)
+ S2I = S2I*CSSR(KFLAG)
+ C1R = CSRR(KFLAG)
+ 130 CONTINUE
+ 180 CONTINUE
+ IF (MR.EQ.0) RETURN
+ C-----------------------------------------------------------------------
+ C ANALYTIC CONTINUATION FOR RE(Z).LT.0.0D0
+ C-----------------------------------------------------------------------
+ NZ = 0
+ FMR = DBLE(FLOAT(MR))
+ SGN = -DSIGN(PI,FMR)
+ C-----------------------------------------------------------------------
+ C CSPN AND CSGN ARE COEFF OF K AND I FUNCIONS RESP.
+ C-----------------------------------------------------------------------
+ CSGNI = SGN
+ IF (YY.LE.0.0D0) CSGNI = -CSGNI
+ IFN = INU + N - 1
+ ANG = FNF*SGN
+ CSPNR = DCOS(ANG)
+ CSPNI = DSIN(ANG)
+ IF (MOD(IFN,2).EQ.0) GO TO 190
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ 190 CONTINUE
+ C-----------------------------------------------------------------------
+ C CS=COEFF OF THE J FUNCTION TO GET THE I FUNCTION. I(FNU,Z) IS
+ C COMPUTED FROM EXP(I*FNU*HPI)*J(FNU,-I*Z) WHERE Z IS IN THE FIRST
+ C QUADRANT. FOURTH QUADRANT VALUES (YY.LE.0.0E0) ARE COMPUTED BY
+ C CONJUGATION SINCE THE I FUNCTION IS REAL ON THE POSITIVE REAL AXIS
+ C-----------------------------------------------------------------------
+ CSR = SAR*CSGNI
+ CSI = CAR*CSGNI
+ IN = MOD(IFN,4) + 1
+ C2R = CIPR(IN)
+ C2I = CIPI(IN)
+ STR = CSR*C2R + CSI*C2I
+ CSI = -CSR*C2I + CSI*C2R
+ CSR = STR
+ ASC = BRY(1)
+ IUF = 0
+ KK = N
+ KDFLG = 1
+ IB = IB - 1
+ IC = IB - 1
+ DO 290 K=1,N
+ FN = FNU + DBLE(FLOAT(KK-1))
+ C-----------------------------------------------------------------------
+ C LOGIC TO SORT OUT CASES WHOSE PARAMETERS WERE SET FOR THE K
+ C FUNCTION ABOVE
+ C-----------------------------------------------------------------------
+ IF (N.GT.2) GO TO 175
+ 172 CONTINUE
+ PHIDR = PHIR(J)
+ PHIDI = PHII(J)
+ ARGDR = ARGR(J)
+ ARGDI = ARGI(J)
+ ZET1DR = ZETA1R(J)
+ ZET1DI = ZETA1I(J)
+ ZET2DR = ZETA2R(J)
+ ZET2DI = ZETA2I(J)
+ ASUMDR = ASUMR(J)
+ ASUMDI = ASUMI(J)
+ BSUMDR = BSUMR(J)
+ BSUMDI = BSUMI(J)
+ J = 3 - J
+ GO TO 210
+ 175 CONTINUE
+ IF ((KK.EQ.N).AND.(IB.LT.N)) GO TO 210
+ IF ((KK.EQ.IB).OR.(KK.EQ.IC)) GO TO 172
+ CALL ZUNHJ(ZNR, ZNI, FN, 0, TOL, PHIDR, PHIDI, ARGDR,
+ * ARGDI, ZET1DR, ZET1DI, ZET2DR, ZET2DI, ASUMDR,
+ * ASUMDI, BSUMDR, BSUMDI)
+ 210 CONTINUE
+ IF (KODE.EQ.1) GO TO 220
+ STR = ZBR + ZET2DR
+ STI = ZBI + ZET2DI
+ RAST = FN/XZABS(STR,STI)
+ STR = STR*RAST*RAST
+ STI = -STI*RAST*RAST
+ S1R = -ZET1DR + STR
+ S1I = -ZET1DI + STI
+ GO TO 230
+ 220 CONTINUE
+ S1R = -ZET1DR + ZET2DR
+ S1I = -ZET1DI + ZET2DI
+ 230 CONTINUE
+ C-----------------------------------------------------------------------
+ C TEST FOR UNDERFLOW AND OVERFLOW
+ C-----------------------------------------------------------------------
+ RS1 = S1R
+ IF (DABS(RS1).GT.ELIM) GO TO 280
+ IF (KDFLG.EQ.1) IFLAG = 2
+ IF (DABS(RS1).LT.ALIM) GO TO 240
+ C-----------------------------------------------------------------------
+ C REFINE TEST AND SCALE
+ C-----------------------------------------------------------------------
+ APHI = XZABS(PHIDR,PHIDI)
+ AARG = XZABS(ARGDR,ARGDI)
+ RS1 = RS1 + DLOG(APHI) - 0.25D0*DLOG(AARG) - AIC
+ IF (DABS(RS1).GT.ELIM) GO TO 280
+ IF (KDFLG.EQ.1) IFLAG = 1
+ IF (RS1.LT.0.0D0) GO TO 240
+ IF (KDFLG.EQ.1) IFLAG = 3
+ 240 CONTINUE
+ CALL ZAIRY(ARGDR, ARGDI, 0, 2, AIR, AII, NAI, IDUM)
+ CALL ZAIRY(ARGDR, ARGDI, 1, 2, DAIR, DAII, NDAI, IDUM)
+ STR = DAIR*BSUMDR - DAII*BSUMDI
+ STI = DAIR*BSUMDI + DAII*BSUMDR
+ STR = STR + (AIR*ASUMDR-AII*ASUMDI)
+ STI = STI + (AIR*ASUMDI+AII*ASUMDR)
+ PTR = STR*PHIDR - STI*PHIDI
+ PTI = STR*PHIDI + STI*PHIDR
+ S2R = PTR*CSR - PTI*CSI
+ S2I = PTR*CSI + PTI*CSR
+ STR = DEXP(S1R)*CSSR(IFLAG)
+ S1R = STR*DCOS(S1I)
+ S1I = STR*DSIN(S1I)
+ STR = S2R*S1R - S2I*S1I
+ S2I = S2R*S1I + S2I*S1R
+ S2R = STR
+ IF (IFLAG.NE.1) GO TO 250
+ CALL ZUCHK(S2R, S2I, NW, BRY(1), TOL)
+ IF (NW.EQ.0) GO TO 250
+ S2R = ZEROR
+ S2I = ZEROI
+ 250 CONTINUE
+ IF (YY.LE.0.0D0) S2I = -S2I
+ CYR(KDFLG) = S2R
+ CYI(KDFLG) = S2I
+ C2R = S2R
+ C2I = S2I
+ S2R = S2R*CSRR(IFLAG)
+ S2I = S2I*CSRR(IFLAG)
+ C-----------------------------------------------------------------------
+ C ADD I AND K FUNCTIONS, K SEQUENCE IN Y(I), I=1,N
+ C-----------------------------------------------------------------------
+ S1R = YR(KK)
+ S1I = YI(KK)
+ IF (KODE.EQ.1) GO TO 270
+ CALL ZS1S2(ZRR, ZRI, S1R, S1I, S2R, S2I, NW, ASC, ALIM, IUF)
+ NZ = NZ + NW
+ 270 CONTINUE
+ YR(KK) = S1R*CSPNR - S1I*CSPNI + S2R
+ YI(KK) = S1R*CSPNI + S1I*CSPNR + S2I
+ KK = KK - 1
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ STR = CSI
+ CSI = -CSR
+ CSR = STR
+ IF (C2R.NE.0.0D0 .OR. C2I.NE.0.0D0) GO TO 255
+ KDFLG = 1
+ GO TO 290
+ 255 CONTINUE
+ IF (KDFLG.EQ.2) GO TO 295
+ KDFLG = 2
+ GO TO 290
+ 280 CONTINUE
+ IF (RS1.GT.0.0D0) GO TO 320
+ S2R = ZEROR
+ S2I = ZEROI
+ GO TO 250
+ 290 CONTINUE
+ K = N
+ 295 CONTINUE
+ IL = N - K
+ IF (IL.EQ.0) RETURN
+ C-----------------------------------------------------------------------
+ C RECUR BACKWARD FOR REMAINDER OF I SEQUENCE AND ADD IN THE
+ C K FUNCTIONS, SCALING THE I SEQUENCE DURING RECURRENCE TO KEEP
+ C INTERMEDIATE ARITHMETIC ON SCALE NEAR EXPONENT EXTREMES.
+ C-----------------------------------------------------------------------
+ S1R = CYR(1)
+ S1I = CYI(1)
+ S2R = CYR(2)
+ S2I = CYI(2)
+ CSR = CSRR(IFLAG)
+ ASCLE = BRY(IFLAG)
+ FN = DBLE(FLOAT(INU+IL))
+ DO 310 I=1,IL
+ C2R = S2R
+ C2I = S2I
+ S2R = S1R + (FN+FNF)*(RZR*C2R-RZI*C2I)
+ S2I = S1I + (FN+FNF)*(RZR*C2I+RZI*C2R)
+ S1R = C2R
+ S1I = C2I
+ FN = FN - 1.0D0
+ C2R = S2R*CSR
+ C2I = S2I*CSR
+ CKR = C2R
+ CKI = C2I
+ C1R = YR(KK)
+ C1I = YI(KK)
+ IF (KODE.EQ.1) GO TO 300
+ CALL ZS1S2(ZRR, ZRI, C1R, C1I, C2R, C2I, NW, ASC, ALIM, IUF)
+ NZ = NZ + NW
+ 300 CONTINUE
+ YR(KK) = C1R*CSPNR - C1I*CSPNI + C2R
+ YI(KK) = C1R*CSPNI + C1I*CSPNR + C2I
+ KK = KK - 1
+ CSPNR = -CSPNR
+ CSPNI = -CSPNI
+ IF (IFLAG.GE.3) GO TO 310
+ C2R = DABS(CKR)
+ C2I = DABS(CKI)
+ C2M = DMAX1(C2R,C2I)
+ IF (C2M.LE.ASCLE) GO TO 310
+ IFLAG = IFLAG + 1
+ ASCLE = BRY(IFLAG)
+ S1R = S1R*CSR
+ S1I = S1I*CSR
+ S2R = CKR
+ S2I = CKI
+ S1R = S1R*CSSR(IFLAG)
+ S1I = S1I*CSSR(IFLAG)
+ S2R = S2R*CSSR(IFLAG)
+ S2I = S2I*CSSR(IFLAG)
+ CSR = CSRR(IFLAG)
+ 310 CONTINUE
+ RETURN
+ 320 CONTINUE
+ NZ = -1
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zuoik.f octave-2.0.14/libcruft/amos/zuoik.f
*** octave-2.0.13/libcruft/amos/zuoik.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zuoik.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,194 ----
+ SUBROUTINE ZUOIK(ZR, ZI, FNU, KODE, IKFLG, N, YR, YI, NUF, TOL,
+ * ELIM, ALIM)
+ C***BEGIN PROLOGUE ZUOIK
+ C***REFER TO ZBESI,ZBESK,ZBESH
+ C
+ C ZUOIK COMPUTES THE LEADING TERMS OF THE UNIFORM ASYMPTOTIC
+ C EXPANSIONS FOR THE I AND K FUNCTIONS AND COMPARES THEM
+ C (IN LOGARITHMIC FORM) TO ALIM AND ELIM FOR OVER AND UNDERFLOW
+ C WHERE ALIM.LT.ELIM. IF THE MAGNITUDE, BASED ON THE LEADING
+ C EXPONENTIAL, IS LESS THAN ALIM OR GREATER THAN -ALIM, THEN
+ C THE RESULT IS ON SCALE. IF NOT, THEN A REFINED TEST USING OTHER
+ C MULTIPLIERS (IN LOGARITHMIC FORM) IS MADE BASED ON ELIM. HERE
+ C EXP(-ELIM)=SMALLEST MACHINE NUMBER*1.0E+3 AND EXP(-ALIM)=
+ C EXP(-ELIM)/TOL
+ C
+ C IKFLG=1 MEANS THE I SEQUENCE IS TESTED
+ C =2 MEANS THE K SEQUENCE IS TESTED
+ C NUF = 0 MEANS THE LAST MEMBER OF THE SEQUENCE IS ON SCALE
+ C =-1 MEANS AN OVERFLOW WOULD OCCUR
+ C IKFLG=1 AND NUF.GT.0 MEANS THE LAST NUF Y VALUES WERE SET TO ZERO
+ C THE FIRST N-NUF VALUES MUST BE SET BY ANOTHER ROUTINE
+ C IKFLG=2 AND NUF.EQ.N MEANS ALL Y VALUES WERE SET TO ZERO
+ C IKFLG=2 AND 0.LT.NUF.LT.N NOT CONSIDERED. Y MUST BE SET BY
+ C ANOTHER ROUTINE
+ C
+ C***ROUTINES CALLED ZUCHK,ZUNHJ,ZUNIK,D1MACH,XZABS,XZLOG
+ C***END PROLOGUE ZUOIK
+ C COMPLEX ARG,ASUM,BSUM,CWRK,CZ,CZERO,PHI,SUM,Y,Z,ZB,ZETA1,ZETA2,ZN,
+ C *ZR
+ DOUBLE PRECISION AARG, AIC, ALIM, APHI, ARGI, ARGR, ASUMI, ASUMR,
+ * ASCLE, AX, AY, BSUMI, BSUMR, CWRKI, CWRKR, CZI, CZR, ELIM, FNN,
+ * FNU, GNN, GNU, PHII, PHIR, RCZ, STR, STI, SUMI, SUMR, TOL, YI,
+ * YR, ZBI, ZBR, ZEROI, ZEROR, ZETA1I, ZETA1R, ZETA2I, ZETA2R, ZI,
+ * ZNI, ZNR, ZR, ZRI, ZRR, D1MACH, XZABS
+ INTEGER I, IDUM, IFORM, IKFLG, INIT, KODE, N, NN, NUF, NW
+ DIMENSION YR(N), YI(N), CWRKR(16), CWRKI(16)
+ DATA ZEROR,ZEROI / 0.0D0, 0.0D0 /
+ DATA AIC / 1.265512123484645396D+00 /
+ NUF = 0
+ NN = N
+ ZRR = ZR
+ ZRI = ZI
+ IF (ZR.GE.0.0D0) GO TO 10
+ ZRR = -ZR
+ ZRI = -ZI
+ 10 CONTINUE
+ ZBR = ZRR
+ ZBI = ZRI
+ AX = DABS(ZR)*1.7321D0
+ AY = DABS(ZI)
+ IFORM = 1
+ IF (AY.GT.AX) IFORM = 2
+ GNU = DMAX1(FNU,1.0D0)
+ IF (IKFLG.EQ.1) GO TO 20
+ FNN = DBLE(FLOAT(NN))
+ GNN = FNU + FNN - 1.0D0
+ GNU = DMAX1(GNN,FNN)
+ 20 CONTINUE
+ C-----------------------------------------------------------------------
+ C ONLY THE MAGNITUDE OF ARG AND PHI ARE NEEDED ALONG WITH THE
+ C REAL PARTS OF ZETA1, ZETA2 AND ZB. NO ATTEMPT IS MADE TO GET
+ C THE SIGN OF THE IMAGINARY PART CORRECT.
+ C-----------------------------------------------------------------------
+ IF (IFORM.EQ.2) GO TO 30
+ INIT = 0
+ CALL ZUNIK(ZRR, ZRI, GNU, IKFLG, 1, TOL, INIT, PHIR, PHII,
+ * ZETA1R, ZETA1I, ZETA2R, ZETA2I, SUMR, SUMI, CWRKR, CWRKI)
+ CZR = -ZETA1R + ZETA2R
+ CZI = -ZETA1I + ZETA2I
+ GO TO 50
+ 30 CONTINUE
+ ZNR = ZRI
+ ZNI = -ZRR
+ IF (ZI.GT.0.0D0) GO TO 40
+ ZNR = -ZNR
+ 40 CONTINUE
+ CALL ZUNHJ(ZNR, ZNI, GNU, 1, TOL, PHIR, PHII, ARGR, ARGI, ZETA1R,
+ * ZETA1I, ZETA2R, ZETA2I, ASUMR, ASUMI, BSUMR, BSUMI)
+ CZR = -ZETA1R + ZETA2R
+ CZI = -ZETA1I + ZETA2I
+ AARG = XZABS(ARGR,ARGI)
+ 50 CONTINUE
+ IF (KODE.EQ.1) GO TO 60
+ CZR = CZR - ZBR
+ CZI = CZI - ZBI
+ 60 CONTINUE
+ IF (IKFLG.EQ.1) GO TO 70
+ CZR = -CZR
+ CZI = -CZI
+ 70 CONTINUE
+ APHI = XZABS(PHIR,PHII)
+ RCZ = CZR
+ C-----------------------------------------------------------------------
+ C OVERFLOW TEST
+ C-----------------------------------------------------------------------
+ IF (RCZ.GT.ELIM) GO TO 210
+ IF (RCZ.LT.ALIM) GO TO 80
+ RCZ = RCZ + DLOG(APHI)
+ IF (IFORM.EQ.2) RCZ = RCZ - 0.25D0*DLOG(AARG) - AIC
+ IF (RCZ.GT.ELIM) GO TO 210
+ GO TO 130
+ 80 CONTINUE
+ C-----------------------------------------------------------------------
+ C UNDERFLOW TEST
+ C-----------------------------------------------------------------------
+ IF (RCZ.LT.(-ELIM)) GO TO 90
+ IF (RCZ.GT.(-ALIM)) GO TO 130
+ RCZ = RCZ + DLOG(APHI)
+ IF (IFORM.EQ.2) RCZ = RCZ - 0.25D0*DLOG(AARG) - AIC
+ IF (RCZ.GT.(-ELIM)) GO TO 110
+ 90 CONTINUE
+ DO 100 I=1,NN
+ YR(I) = ZEROR
+ YI(I) = ZEROI
+ 100 CONTINUE
+ NUF = NN
+ RETURN
+ 110 CONTINUE
+ ASCLE = 1.0D+3*D1MACH(1)/TOL
+ CALL XZLOG(PHIR, PHII, STR, STI, IDUM)
+ CZR = CZR + STR
+ CZI = CZI + STI
+ IF (IFORM.EQ.1) GO TO 120
+ CALL XZLOG(ARGR, ARGI, STR, STI, IDUM)
+ CZR = CZR - 0.25D0*STR - AIC
+ CZI = CZI - 0.25D0*STI
+ 120 CONTINUE
+ AX = DEXP(RCZ)/TOL
+ AY = CZI
+ CZR = AX*DCOS(AY)
+ CZI = AX*DSIN(AY)
+ CALL ZUCHK(CZR, CZI, NW, ASCLE, TOL)
+ IF (NW.NE.0) GO TO 90
+ 130 CONTINUE
+ IF (IKFLG.EQ.2) RETURN
+ IF (N.EQ.1) RETURN
+ C-----------------------------------------------------------------------
+ C SET UNDERFLOWS ON I SEQUENCE
+ C-----------------------------------------------------------------------
+ 140 CONTINUE
+ GNU = FNU + DBLE(FLOAT(NN-1))
+ IF (IFORM.EQ.2) GO TO 150
+ INIT = 0
+ CALL ZUNIK(ZRR, ZRI, GNU, IKFLG, 1, TOL, INIT, PHIR, PHII,
+ * ZETA1R, ZETA1I, ZETA2R, ZETA2I, SUMR, SUMI, CWRKR, CWRKI)
+ CZR = -ZETA1R + ZETA2R
+ CZI = -ZETA1I + ZETA2I
+ GO TO 160
+ 150 CONTINUE
+ CALL ZUNHJ(ZNR, ZNI, GNU, 1, TOL, PHIR, PHII, ARGR, ARGI, ZETA1R,
+ * ZETA1I, ZETA2R, ZETA2I, ASUMR, ASUMI, BSUMR, BSUMI)
+ CZR = -ZETA1R + ZETA2R
+ CZI = -ZETA1I + ZETA2I
+ AARG = XZABS(ARGR,ARGI)
+ 160 CONTINUE
+ IF (KODE.EQ.1) GO TO 170
+ CZR = CZR - ZBR
+ CZI = CZI - ZBI
+ 170 CONTINUE
+ APHI = XZABS(PHIR,PHII)
+ RCZ = CZR
+ IF (RCZ.LT.(-ELIM)) GO TO 180
+ IF (RCZ.GT.(-ALIM)) RETURN
+ RCZ = RCZ + DLOG(APHI)
+ IF (IFORM.EQ.2) RCZ = RCZ - 0.25D0*DLOG(AARG) - AIC
+ IF (RCZ.GT.(-ELIM)) GO TO 190
+ 180 CONTINUE
+ YR(NN) = ZEROR
+ YI(NN) = ZEROI
+ NN = NN - 1
+ NUF = NUF + 1
+ IF (NN.EQ.0) RETURN
+ GO TO 140
+ 190 CONTINUE
+ ASCLE = 1.0D+3*D1MACH(1)/TOL
+ CALL XZLOG(PHIR, PHII, STR, STI, IDUM)
+ CZR = CZR + STR
+ CZI = CZI + STI
+ IF (IFORM.EQ.1) GO TO 200
+ CALL XZLOG(ARGR, ARGI, STR, STI, IDUM)
+ CZR = CZR - 0.25D0*STR - AIC
+ CZI = CZI - 0.25D0*STI
+ 200 CONTINUE
+ AX = DEXP(RCZ)/TOL
+ AY = CZI
+ CZR = AX*DCOS(AY)
+ CZI = AX*DSIN(AY)
+ CALL ZUCHK(CZR, CZI, NW, ASCLE, TOL)
+ IF (NW.NE.0) GO TO 180
+ RETURN
+ 210 CONTINUE
+ NUF = -1
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/amos/zwrsk.f octave-2.0.14/libcruft/amos/zwrsk.f
*** octave-2.0.13/libcruft/amos/zwrsk.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/amos/zwrsk.f Wed Nov 11 17:24:54 1998
***************
*** 0 ****
--- 1,94 ----
+ SUBROUTINE ZWRSK(ZRR, ZRI, FNU, KODE, N, YR, YI, NZ, CWR, CWI,
+ * TOL, ELIM, ALIM)
+ C***BEGIN PROLOGUE ZWRSK
+ C***REFER TO ZBESI,ZBESK
+ C
+ C ZWRSK COMPUTES THE I BESSEL FUNCTION FOR RE(Z).GE.0.0 BY
+ C NORMALIZING THE I FUNCTION RATIOS FROM ZRATI BY THE WRONSKIAN
+ C
+ C***ROUTINES CALLED D1MACH,ZBKNU,ZRATI,XZABS
+ C***END PROLOGUE ZWRSK
+ C COMPLEX CINU,CSCL,CT,CW,C1,C2,RCT,ST,Y,ZR
+ DOUBLE PRECISION ACT, ACW, ALIM, ASCLE, CINUI, CINUR, CSCLR, CTI,
+ * CTR, CWI, CWR, C1I, C1R, C2I, C2R, ELIM, FNU, PTI, PTR, RACT,
+ * STI, STR, TOL, YI, YR, ZRI, ZRR, XZABS, D1MACH
+ INTEGER I, KODE, N, NW, NZ
+ DIMENSION YR(N), YI(N), CWR(2), CWI(2)
+ C-----------------------------------------------------------------------
+ C I(FNU+I-1,Z) BY BACKWARD RECURRENCE FOR RATIOS
+ C Y(I)=I(FNU+I,Z)/I(FNU+I-1,Z) FROM CRATI NORMALIZED BY THE
+ C WRONSKIAN WITH K(FNU,Z) AND K(FNU+1,Z) FROM CBKNU.
+ C-----------------------------------------------------------------------
+ NZ = 0
+ CALL ZBKNU(ZRR, ZRI, FNU, KODE, 2, CWR, CWI, NW, TOL, ELIM, ALIM)
+ IF (NW.NE.0) GO TO 50
+ CALL ZRATI(ZRR, ZRI, FNU, N, YR, YI, TOL)
+ C-----------------------------------------------------------------------
+ C RECUR FORWARD ON I(FNU+1,Z) = R(FNU,Z)*I(FNU,Z),
+ C R(FNU+J-1,Z)=Y(J), J=1,...,N
+ C-----------------------------------------------------------------------
+ CINUR = 1.0D0
+ CINUI = 0.0D0
+ IF (KODE.EQ.1) GO TO 10
+ CINUR = DCOS(ZRI)
+ CINUI = DSIN(ZRI)
+ 10 CONTINUE
+ C-----------------------------------------------------------------------
+ C ON LOW EXPONENT MACHINES THE K FUNCTIONS CAN BE CLOSE TO BOTH
+ C THE UNDER AND OVERFLOW LIMITS AND THE NORMALIZATION MUST BE
+ C SCALED TO PREVENT OVER OR UNDERFLOW. CUOIK HAS DETERMINED THAT
+ C THE RESULT IS ON SCALE.
+ C-----------------------------------------------------------------------
+ ACW = XZABS(CWR(2),CWI(2))
+ ASCLE = 1.0D+3*D1MACH(1)/TOL
+ CSCLR = 1.0D0
+ IF (ACW.GT.ASCLE) GO TO 20
+ CSCLR = 1.0D0/TOL
+ GO TO 30
+ 20 CONTINUE
+ ASCLE = 1.0D0/ASCLE
+ IF (ACW.LT.ASCLE) GO TO 30
+ CSCLR = TOL
+ 30 CONTINUE
+ C1R = CWR(1)*CSCLR
+ C1I = CWI(1)*CSCLR
+ C2R = CWR(2)*CSCLR
+ C2I = CWI(2)*CSCLR
+ STR = YR(1)
+ STI = YI(1)
+ C-----------------------------------------------------------------------
+ C CINU=CINU*(CONJG(CT)/CABS(CT))*(1.0D0/CABS(CT) PREVENTS
+ C UNDER- OR OVERFLOW PREMATURELY BY SQUARING CABS(CT)
+ C-----------------------------------------------------------------------
+ PTR = STR*C1R - STI*C1I
+ PTI = STR*C1I + STI*C1R
+ PTR = PTR + C2R
+ PTI = PTI + C2I
+ CTR = ZRR*PTR - ZRI*PTI
+ CTI = ZRR*PTI + ZRI*PTR
+ ACT = XZABS(CTR,CTI)
+ RACT = 1.0D0/ACT
+ CTR = CTR*RACT
+ CTI = -CTI*RACT
+ PTR = CINUR*RACT
+ PTI = CINUI*RACT
+ CINUR = PTR*CTR - PTI*CTI
+ CINUI = PTR*CTI + PTI*CTR
+ YR(1) = CINUR*CSCLR
+ YI(1) = CINUI*CSCLR
+ IF (N.EQ.1) RETURN
+ DO 40 I=2,N
+ PTR = STR*CINUR - STI*CINUI
+ CINUI = STR*CINUI + STI*CINUR
+ CINUR = PTR
+ STR = YR(I)
+ STI = YI(I)
+ YR(I) = CINUR*CSCLR
+ YI(I) = CINUI*CSCLR
+ 40 CONTINUE
+ RETURN
+ 50 CONTINUE
+ NZ = -1
+ IF(NW.EQ.(-2)) NZ=-2
+ RETURN
+ END
diff -cNr octave-2.0.13/libcruft/ranlib/HOWTOGET octave-2.0.14/libcruft/ranlib/HOWTOGET
*** octave-2.0.13/libcruft/ranlib/HOWTOGET Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/ranlib/HOWTOGET Thu Oct 15 00:19:38 1998
***************
*** 0 ****
--- 1,31 ----
+
+ WHERE TO GET IT
+
+ Software written by members of the section is freely available to
+ anyone. Reposting on other archives is encouraged. The code is
+ furnished in source form and as DOS and Macintosh executables. Readers
+ with Internet access and a browser might note the following web site
+ addresses:
+
+ University of Texas M. D. Anderson Cancer Center Home Page:
+ http://utmdacc.mdacc.tmc.edu/
+
+ Department of Biomathematics Home Page:
+ http://odin.mdacc.tmc.edu/
+
+
+ Available Software:
+ http://odin.mdacc.tmc.edu/anonftp/
+
+
+ Our code can also be obtained by anonymous ftp to odin.mdacc.tmc.edu.
+ The index is on file ./pub/index.
+
+ Our statistical code is also posted to statlib after some delay.
+ Statlib can be accessed at:
+ http://lib.stat.cmu.edu/
+ See in particular:
+ http://lib.stat.cmu.edu/general/Utexas/
+
+ The code is also archived at many other sites (at their option). Use
+ your favorite search engine to find one close to you.
diff -cNr octave-2.0.13/libcruft/ranlib/Makefile.in octave-2.0.14/libcruft/ranlib/Makefile.in
*** octave-2.0.13/libcruft/ranlib/Makefile.in Tue Sep 19 23:23:34 1995
--- octave-2.0.14/libcruft/ranlib/Makefile.in Thu Oct 15 00:43:05 1998
***************
*** 12,19 ****
top_srcdir = @top_srcdir@
VPATH = @srcdir@
! SPECIAL = README ranlib.chs ranlib.fdoc tstbot.for tstgmn.for \
! tstmid.for
EXTERNAL_DISTFILES = $(DISTFILES)
--- 12,19 ----
top_srcdir = @top_srcdir@
VPATH = @srcdir@
! SPECIAL = HOWTOGET README randlib.chs randlib.fdoc \
! tstbot.for tstgmn.for tstmid.for
EXTERNAL_DISTFILES = $(DISTFILES)
diff -cNr octave-2.0.13/libcruft/ranlib/README octave-2.0.14/libcruft/ranlib/README
*** octave-2.0.13/libcruft/ranlib/README Thu Jul 18 20:45:46 1996
--- octave-2.0.14/libcruft/ranlib/README Thu Oct 15 00:19:38 1998
***************
*** 9,21 ****
! RANLIB
Library of Fortran Routines for Random Number Generation
!
!
--- 9,20 ----
! RANDLIB
Library of Fortran Routines for Random Number Generation
! Version 1.3 -- August, 1997
***************
*** 33,39 ****
Barry W. Brown
James Lovato
!
--- 32,39 ----
Barry W. Brown
James Lovato
! Kathy Russell
! John Venier
***************
*** 52,58 ****
This work was supported by grant CA-16672 from the National Cancer Institute.
! SUMMARY OF RANLIB
The bottom level routines provide 32 virtual random number generators.
Each generator can provide 1,048,576 blocks of numbers, and each block
--- 52,68 ----
This work was supported by grant CA-16672 from the National Cancer Institute.
!
! THANKS TO OUR SUPPORTERS
!
! This work was supported in part by grant CA-16672 from the National
! Cancer Institute. We are grateful to Larry and Pat McNeil of Corpus
! Cristi for their generous support. Some equipment used in this effort
! was provided by IBM as part of a cooperative study agreement; we thank
! them.
!
!
! SUMMARY OF RANDLIB
The bottom level routines provide 32 virtual random number generators.
Each generator can provide 1,048,576 blocks of numbers, and each block
***************
*** 75,93 ****
(10) Random permutations of an integer array
(11) Real uniform random deviates between specified limits
(12) Binomial random deviates
! (13) Poisson random deviates
! (14) Integer uniform deviates between specified limits
! (15) Seeds for the random number generator calculated from a
character string
INSTALLATION
! Directory src contains the Fortran source for most of the routines.
! Directory linpack contains two linpack routines needed by the
! multivariate generator. If linpack is present on your machine, you
! won't need these routines. The Fortran code from these directories
! should be compiled and placed in a library. Directory test contains
! three test programs for this code.
DOCUMENTATION
--- 85,107 ----
(10) Random permutations of an integer array
(11) Real uniform random deviates between specified limits
(12) Binomial random deviates
! (13) Negative Binomial random deviates
! (14) Multinomial random deviates
! (15) Poisson random deviates
! (16) Integer uniform deviates between specified limits
! (17) Seeds for the random number generator calculated from a
character string
INSTALLATION
! Directory src contains the Fortran source. The Fortran code from this
! directory should be compiled and placed in a library. Directory test
! contains three test programs for this code.
!
!
!
!
!
DOCUMENTATION
***************
*** 95,114 ****
documentation is in the form of character (ASCII) files. An
explanation of the concepts involved in the base generator and details
of its implementation are contained in Basegen.doc. A summary of all
! of the available routines is contained in ranlib.chs (chs is an
abbreviation of 'cheat sheet'). The 'chs' file will probably be the
! reference to ranlib that is primarily used. The file, ranlib.fdoc,
contains all comments heading each routine. There is somewhat more
information in 'fdoc' than 'chs', but the additional information
consists primarily of references to the literature.
-
SOURCES
The following routines, which were written by others and lightly
! modified for consistency in packaging, are included in RANLIB.
Bottom Level Routines
--- 109,127 ----
documentation is in the form of character (ASCII) files. An
explanation of the concepts involved in the base generator and details
of its implementation are contained in Basegen.doc. A summary of all
! of the available routines is contained in randlib.chs (chs is an
abbreviation of 'cheat sheet'). The 'chs' file will probably be the
! reference to randlib that is primarily used. The file, randlib.fdoc,
contains all comments heading each routine. There is somewhat more
information in 'fdoc' than 'chs', but the additional information
consists primarily of references to the literature.
SOURCES
The following routines, which were written by others and lightly
! modified for consistency in packaging, are included in RANDLIB.
Bottom Level Routines
***************
*** 140,145 ****
--- 153,163 ----
Ahrens, J.H. and Dieter, U. Computer Methods for Sampling from Gamma,
Beta, Poisson and Binomial Distributions. Computing, 12 (1974),
223-246. Adaptation of algorithm GS.
+
+
+
+
+
Normal
***************
*** 156,161 ****
--- 174,180 ----
Kachitvichyanukul, V. and Schmeiser, B. W. Binomial Random Variate
Generation. Communications of the ACM, 31, 2 (February, 1988) 216.
+
Poisson
This code was obtained from netlib.
***************
*** 163,171 ****
Ahrens, J.H. and Dieter, U. Computer Generation of Poisson Deviates
From Modified Normal Distributions. ACM Trans. Math. Software, 8, 2
(June 1982),163-179
-
-
-
Beta
--- 182,187 ----
***************
*** 183,188 ****
--- 199,206 ----
Dongarra, J. J., Moler, C. B., Bunch, J. R. and Stewart, G. W.
Linpack User's Guide. SIAM Press, Philadelphia. (1979)
+
+
LEGALITIES
***************
*** 203,209 ****
Krogh, F. Algorithms Policy. ACM Tran. Math. Softw. 13(1987),
183-186.
! We place the Ranlib code that we have written in the public domain.
NO WARRANTY
--- 221,227 ----
Krogh, F. Algorithms Policy. ACM Tran. Math. Softw. 13(1987),
183-186.
! We place the Randlib code that we have written in the public domain.
NO WARRANTY
***************
*** 223,225 ****
--- 241,346 ----
PARTIES) THE PROGRAM.
(Above NO WARRANTY modified from the GNU NO WARRANTY statement.)
+
+
+
+ WHAT'S NEW IN VERSION 1.1?
+
+
+ Random number generation for the Negative Binomial and Multinomial
+ distributions has been included.
+
+ Two errors in the code which generates random numbers from the Gamma
+ distribution were fixed.
+
+
+ WHAT'S NEW IN VERSION 1.2?
+
+ We changed the name of the package from 'ranlib' to 'randlib'. This
+ was done so that we can determine who archives it. 'ranlib' is the
+ name of a Unix utility which produces many spurious hits on a web
+ search engine.
+
+
+ The linpack routines are now housed in the /src directory.
+
+ In several routines, some variables were given an explicit SAVE
+ attribute and some dummy initial values were changed to prevent
+ potential errors.
+ 'genbet.f' 'ignbin.f' 'ignpoi.f' 'phrtsd.f' 'sexpo.f' 'sgamma.f'
+ 'snorm.f'
+
+ In several routines, argument checking was implemented; the code now
+ breaks if inappropriate values are passed to it.
+ 'genbet.f' A and B must be >= 1.0E-37 instead of 0.0
+ 'genexp.f' AV must be >= 0.0
+ 'gengam.f' A and R both must be > 0.0
+ 'gennor.f' SD must be >= 0.0
+ 'ignbin.f' N must be >= 0, and 0.0 <= PP <= 1.0.
+ 'ignnbn.f' N must be > 0, 0.0 < P < 1.0 (previously allowed N = 0)
+ 'ignpoi.f' MU must be >= 0.0
+
+ For the Non-Central Chi-Squared and Non-Central F distributions, the
+ case DF = 1.0 (DFN = 1.0 for the F) is now allowed.
+ 'gennch.f' 'gennf.f'
+
+ Wherever possible, the user-accessible code now calls the base
+ generators directly. This means improved performance and fewer
+ dependencies, but the routines should work exactly as before from the
+ user's point of view.
+ 'genchi.f' 'genf.f' 'gennch.f' 'gennf.f' 'ignnbn.f'
+
+ Many minor modifications have been made which should make the code
+ more robust, without changing how the code is used.
+ 'genbet.f' 'gengam.f' 'ignpoi.f' 'ignuin.f' 'sgamma.f' 'tstmid.f'
+
+ Finally, five distributions have been added to the mid-level tester,
+ which test the Exponential, Gamma, Multinomial, Negative Binomial, and
+ Normal distributions.
+ 'tstmid.f'
+
+
+
+
+ WHAT'S NOT NEW IN VERSION 1.2 ?
+
+ No calling sequences have changed.
+
+ WHAT'S NEW IN VERSION 1.3?
+
+ The calling sequence of SETGMN has been changed! We added an argument
+ (INTEGER LDCOVM) representing the leading actual dimension of COVM, to
+ allow the user to use this routine in the case that COVM is contained
+ in a larger array. This change also makes the routine more compatible
+ with LINPACK routines. See the following files for details:
+ 'setgmn.f' in the /src directory, and 'randlib.fdoc' and 'randlib.chs'
+ in the /doc directory.
+
+ Briefly, the declaration of SETGMN has been changed
+ from:
+ SUBROUTINE setgmn(meanv,covm,p,parm)
+ to:
+ SUBROUTINE setgmn(meanv,covm,ldcovm,p,parm)
+
+ The program 'tstgmn.f' (in the /test directory) was changed to reflect
+ the change in the calling sequence of SETGMN.
+
+ 'randlib.fdoc' and 'randlib.chs' in the /doc directory were changed to
+ relect the change in the calling sequence of SETGMN.
+
+ Minor changes were made in two routines ('sgamma.f' and 'sexpo.f') to
+ fix unusual bugs.
+
+ The protection from overflow in deviate generation in two routines
+ ('genf.f' and 'gennf.f') was changed to prevent a constant from
+ underflowing at compile time.
+
+ WHAT'S NOT NEW IN VERSION 1.3 ?
+
+ No calling sequences (other than SETGMN) have changed.
+
+ MANY THANKS
+
+ The authors would like to thank the many users who have reported bugs
+ and suggested improvements; Randlib would not be the same today
+ without them. We heartily encourage others to join them.
diff -cNr octave-2.0.13/libcruft/ranlib/advnst.f octave-2.0.14/libcruft/ranlib/advnst.f
*** octave-2.0.13/libcruft/ranlib/advnst.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/advnst.f Thu Oct 15 00:19:38 1998
***************
*** 60,67 ****
IF (qrgnin()) GO TO 10
WRITE (*,*) ' ADVNST called before random number generator ',
+ ' initialized -- abort!'
! CALL XSTOPX
! + (' ADVNST called before random number generator initialized')
10 CALL getcgn(g)
C
--- 60,66 ----
IF (qrgnin()) GO TO 10
WRITE (*,*) ' ADVNST called before random number generator ',
+ ' initialized -- abort!'
! STOP ' ADVNST called before random number generator initialized'
10 CALL getcgn(g)
C
diff -cNr octave-2.0.13/libcruft/ranlib/genbet.f octave-2.0.14/libcruft/ranlib/genbet.f
*** octave-2.0.13/libcruft/ranlib/genbet.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/genbet.f Thu Oct 15 00:19:38 1998
***************
*** 18,33 ****
C
C A --> First parameter of the beta distribution
C REAL A
C
C B --> Second parameter of the beta distribution
C REAL B
C
C
C Method
C
C
C R. C. H. Cheng
! C Generating Beta Variatew with Nonintegral Shape Parameters
C Communications of the ACM, 21:317-322 (1978)
C (Algorithms BB and BC)
C
--- 18,35 ----
C
C A --> First parameter of the beta distribution
C REAL A
+ C JJV (A > 1.0E-37)
C
C B --> Second parameter of the beta distribution
C REAL B
+ C JJV (B > 1.0E-37)
C
C
C Method
C
C
C R. C. H. Cheng
! C Generating Beta Variates with Nonintegral Shape Parameters
C Communications of the ACM, 21:317-322 (1978)
C (Algorithms BB and BC)
C
***************
*** 35,44 ****
C .. Parameters ..
C Close to the largest number that can be exponentiated
REAL expmax
! PARAMETER (expmax=89.0)
C Close to the largest representable single precision number
REAL infnty
PARAMETER (infnty=1.0E38)
C ..
C .. Scalar Arguments ..
REAL aa,bb
--- 37,51 ----
C .. Parameters ..
C Close to the largest number that can be exponentiated
REAL expmax
! C JJV changed this - 89 was too high, and LOG(1.0E38) = 87.49823
! PARAMETER (expmax=87.49823)
C Close to the largest representable single precision number
REAL infnty
PARAMETER (infnty=1.0E38)
+ C JJV added the parameter minlog
+ C Close to the smallest number of which a LOG can be taken.
+ REAL minlog
+ PARAMETER (minlog=1.0E-37)
C ..
C .. Scalar Arguments ..
REAL aa,bb
***************
*** 56,73 ****
INTRINSIC exp,log,max,min,sqrt
C ..
C .. Save statement ..
! SAVE olda,oldb,alpha,beta,gamma,k1,k2
C ..
C .. Data statements ..
! DATA olda,oldb/-1,-1/
C ..
C .. Executable Statements ..
qsame = (olda.EQ.aa) .AND. (oldb.EQ.bb)
IF (qsame) GO TO 20
! IF (.NOT. (aa.LE.0.0.OR.bb.LE.0.0)) GO TO 10
! WRITE (*,*) ' AA or BB <= 0 in GENBET - Abort!'
WRITE (*,*) ' AA: ',aa,' BB ',bb
! CALL XSTOPX (' AA or BB <= 0 in GENBET - Abort!')
10 olda = aa
oldb = bb
--- 63,83 ----
INTRINSIC exp,log,max,min,sqrt
C ..
C .. Save statement ..
! C JJV added a,b
! SAVE olda,oldb,alpha,beta,gamma,k1,k2,a,b
C ..
C .. Data statements ..
! C JJV changed these to ridiculous values
! DATA olda,oldb/-1.0E37,-1.0E37/
C ..
C .. Executable Statements ..
qsame = (olda.EQ.aa) .AND. (oldb.EQ.bb)
IF (qsame) GO TO 20
! C JJV added small minimum for small log problem in calc of W
! IF (.NOT. (aa.LT.minlog.OR.bb.LT.minlog)) GO TO 10
! WRITE (*,*) ' AA or BB < ',minlog,' in GENBET - Abort!'
WRITE (*,*) ' AA: ',aa,' BB ',bb
! STOP ' AA or BB too small in GENBET - Abort!'
10 olda = aa
oldb = bb
***************
*** 92,102 ****
C
u2 = ranf()
v = beta*log(u1/ (1.0-u1))
! IF (.NOT. (v.GT.expmax)) GO TO 50
! w = infnty
GO TO 60
- 50 w = a*exp(v)
60 z = u1**2*u2
r = gamma*v - 1.3862944
s = a + r - w
--- 102,117 ----
C
u2 = ranf()
v = beta*log(u1/ (1.0-u1))
! C JJV altered this
! IF (v.GT.expmax) GO TO 55
! C JJV added checker to see if a*exp(v) will overflow
! C JJV 50 _was_ w = a*exp(v); also note here a > 1.0
! 50 w = exp(v)
! IF (w.GT.infnty/a) GO TO 55
! w = a*w
GO TO 60
+ 55 w = infnty
60 z = u1**2*u2
r = gamma*v - 1.3862944
s = a + r - w
***************
*** 112,117 ****
--- 127,139 ----
C
C Step 4
C
+ C JJV added checker to see if log(alpha/(b+w)) will
+ C JJV overflow. If so, we count the log as -INF, and
+ C JJV consequently evaluate conditional as true, i.e.
+ C JJV the algorithm rejects the trial and starts over
+ C JJV May not need this here since ALPHA > 2.0
+ IF (alpha/(b+w).LT.minlog) GO TO 40
+
IF ((r+alpha*log(alpha/ (b+w))).LT.t) GO TO 40
C
C Step 5
***************
*** 157,168 ****
130 z = u1**2*u2
IF (.NOT. (z.LE.0.25)) GO TO 160
v = beta*log(u1/ (1.0-u1))
- IF (.NOT. (v.GT.expmax)) GO TO 140
- w = infnty
- GO TO 150
! 140 w = a*exp(v)
! 150 GO TO 200
160 IF (z.GE.k2) GO TO 120
C
--- 179,206 ----
130 z = u1**2*u2
IF (.NOT. (z.LE.0.25)) GO TO 160
v = beta*log(u1/ (1.0-u1))
! C JJV instead of checking v > expmax at top, I will check
! C JJV if a < 1, then check the appropriate values
!
! IF (a.GT.1.0) GO TO 135
! C JJV A < 1 so it can help out if EXP(V) would overflow
! IF (v.GT.expmax) GO TO 132
! w = a*exp(v)
! GO TO 200
! 132 w = v + log(a)
! IF (w.GT.expmax) GO TO 140
! w = exp(w)
! GO TO 200
!
! C JJV in this case A > 1
! 135 IF (v.GT.expmax) GO TO 140
! w = exp(v)
! IF (w.GT.infnty/a) GO TO 140
! w = a*w
! GO TO 200
! 140 w = infnty
! GO TO 200
160 IF (z.GE.k2) GO TO 120
C
***************
*** 172,183 ****
C Step 5
C
170 v = beta*log(u1/ (1.0-u1))
! IF (.NOT. (v.GT.expmax)) GO TO 180
! w = infnty
GO TO 190
! 180 w = a*exp(v)
! 190 IF ((alpha* (log(alpha/ (b+w))+v)-1.3862944).LT.log(z)) GO TO 120
C
C Step 6
C
--- 210,240 ----
C Step 5
C
170 v = beta*log(u1/ (1.0-u1))
!
! C JJV same kind of checking as above
! IF (a.GT.1.0) GO TO 175
! C JJV A < 1 so it can help out if EXP(V) would overflow
! IF (v.GT.expmax) GO TO 172
! w = a*exp(v)
! GO TO 190
! 172 w = v + log(a)
! IF (w.GT.expmax) GO TO 180
! w = exp(w)
GO TO 190
! C JJV in this case A > 1
! 175 IF (v.GT.expmax) GO TO 180
! w = exp(v)
! IF (w.GT.infnty/a) GO TO 180
! w = a*w
! GO TO 190
!
! 180 w = infnty
!
! C JJV here we also check to see if log overlows; if so, we treat it
! C JJV as -INF, which means condition is true, i.e. restart
! 190 IF (alpha/(b+w).LT.minlog) GO TO 120
! IF ((alpha* (log(alpha/ (b+w))+v)-1.3862944).LT.log(z)) GO TO 120
C
C Step 6
C
diff -cNr octave-2.0.13/libcruft/ranlib/genchi.f octave-2.0.14/libcruft/ranlib/genchi.f
*** octave-2.0.13/libcruft/ranlib/genchi.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/genchi.f Thu Oct 15 00:19:38 1998
***************
*** 30,45 ****
REAL df
C ..
C .. External Functions ..
! REAL gengam
! EXTERNAL gengam
C ..
C .. Executable Statements ..
IF (.NOT. (df.LE.0.0)) GO TO 10
WRITE (*,*) 'DF <= 0 in GENCHI - ABORT'
WRITE (*,*) 'Value of DF: ',df
! CALL XSTOPX ('DF <= 0 in GENCHI - ABORT')
! 10 genchi = 2.0*gengam(1.0,df/2.0)
RETURN
END
--- 30,49 ----
REAL df
C ..
C .. External Functions ..
! C REAL gengam
! C EXTERNAL gengam
! REAL sgamma
! EXTERNAL sgamma
C ..
C .. Executable Statements ..
IF (.NOT. (df.LE.0.0)) GO TO 10
WRITE (*,*) 'DF <= 0 in GENCHI - ABORT'
WRITE (*,*) 'Value of DF: ',df
! STOP 'DF <= 0 in GENCHI - ABORT'
! C JJV changed this to call sgamma directly
! C 10 genchi = 2.0*gengam(1.0,df/2.0)
! 10 genchi = 2.0*sgamma(df/2.0)
RETURN
END
diff -cNr octave-2.0.13/libcruft/ranlib/genexp.f octave-2.0.14/libcruft/ranlib/genexp.f
*** octave-2.0.13/libcruft/ranlib/genexp.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/genexp.f Thu Oct 15 00:19:38 1998
***************
*** 1,4 ****
--- 1,5 ----
REAL FUNCTION genexp(av)
+
C**********************************************************************
C
C REAL FUNCTION GENEXP( AV )
***************
*** 19,24 ****
--- 20,26 ----
C AV --> The mean of the exponential distribution from which
C a random deviate is to be generated.
C REAL AV
+ C JJV (AV >= 0)
C
C GENEXP <-- The random deviate.
C REAL GENEXP
***************
*** 46,52 ****
EXTERNAL sexpo
C ..
C .. Executable Statements ..
! genexp = sexpo()*av
RETURN
END
--- 48,60 ----
EXTERNAL sexpo
C ..
C .. Executable Statements ..
! C JJV added check to ensure AV >= 0.0
! IF (av.GE.0.0) GO TO 10
! WRITE (*,*) 'AV < 0.0 in GENEXP - ABORT'
! WRITE (*,*) 'Value of AV: ',av
! STOP 'AV < 0.0 in GENEXP - ABORT'
!
! 10 genexp = sexpo()*av
RETURN
END
diff -cNr octave-2.0.13/libcruft/ranlib/genf.f octave-2.0.14/libcruft/ranlib/genf.f
*** octave-2.0.13/libcruft/ranlib/genf.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/genf.f Thu Oct 15 00:19:38 1998
***************
*** 36,59 ****
C .. Local Scalars ..
REAL xden,xnum
C ..
C .. External Functions ..
! REAL genchi
! EXTERNAL genchi
C ..
C .. Executable Statements ..
IF (.NOT. (dfn.LE.0.0.OR.dfd.LE.0.0)) GO TO 10
WRITE (*,*) 'Degrees of freedom nonpositive in GENF - abort!'
WRITE (*,*) 'DFN value: ',dfn,'DFD value: ',dfd
! CALL XSTOPX ('Degrees of freedom nonpositive in GENF - abort!')
- 10 xnum = genchi(dfn)/dfn
C GENF = ( GENCHI( DFN ) / DFN ) / ( GENCHI( DFD ) / DFD )
! xden = genchi(dfd)/dfd
! IF (.NOT. (xden.LE. (1.2E-38*xnum))) GO TO 20
WRITE (*,*) ' GENF - generated numbers would cause overflow'
WRITE (*,*) ' Numerator ',xnum,' Denominator ',xden
! WRITE (*,*) ' GENF returning 1.0E38'
! genf = 1.0E38
GO TO 30
20 genf = xnum/xden
--- 36,69 ----
C .. Local Scalars ..
REAL xden,xnum
C ..
+ C JJV changed this code to call sgamma directly
C .. External Functions ..
! C REAL genchi
! C EXTERNAL genchi
! REAL sgamma
! EXTERNAL sgamma
C ..
C .. Executable Statements ..
IF (.NOT. (dfn.LE.0.0.OR.dfd.LE.0.0)) GO TO 10
WRITE (*,*) 'Degrees of freedom nonpositive in GENF - abort!'
WRITE (*,*) 'DFN value: ',dfn,'DFD value: ',dfd
! STOP 'Degrees of freedom nonpositive in GENF - abort!'
!
! 10 xnum = 2.0*sgamma(dfn/2.0)/dfn
C GENF = ( GENCHI( DFN ) / DFN ) / ( GENCHI( DFD ) / DFD )
! xden = 2.0*sgamma(dfd/2.0)/dfd
! C JJV changed constant so that it will not underflow at compile time
! C JJV while not slowing generator by using double precision or logs.
! C IF (.NOT. (xden.LE. (1.0E-38*xnum))) GO TO 20
! IF (.NOT. (xden.LE. (1.0E-37*xnum))) GO TO 20
WRITE (*,*) ' GENF - generated numbers would cause overflow'
WRITE (*,*) ' Numerator ',xnum,' Denominator ',xden
! C JJV next 2 lines changed to maintain truncation of large deviates.
! C WRITE (*,*) ' GENF returning 1.0E38'
! C genf = 1.0E38
! WRITE (*,*) ' GENF returning 1.0E37'
! genf = 1.0E37
GO TO 30
20 genf = xnum/xden
diff -cNr octave-2.0.13/libcruft/ranlib/gengam.f octave-2.0.14/libcruft/ranlib/gengam.f
*** octave-2.0.13/libcruft/ranlib/gengam.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/gengam.f Thu Oct 15 00:19:38 1998
***************
*** 16,26 ****
C Arguments
C
C
C A --> Location parameter of Gamma distribution
! C REAL A
C
C R --> Shape parameter of Gamma distribution
! C REAL R
C
C
C Method
--- 16,27 ----
C Arguments
C
C
+ C JJV added the argument ranges supported
C A --> Location parameter of Gamma distribution
! C REAL A ( A > 0 )
C
C R --> Shape parameter of Gamma distribution
! C REAL R ( R > 0 )
C
C
C Method
***************
*** 37,43 ****
C Comm. ACM, 25,1 (Jan. 1982), 47 - 54.
C Algorithm GD
C
! C (Case 0.0 <= R <= 1.0)
C Ahrens, J.H. and Dieter, U.
C Computer Methods for Sampling from Gamma,
C Beta, Poisson and Binomial Distributions.
--- 38,45 ----
C Comm. ACM, 25,1 (Jan. 1982), 47 - 54.
C Algorithm GD
C
! C JJV altered the following to reflect sgamma argument ranges
! C (Case 0.0 < R < 1.0)
C Ahrens, J.H. and Dieter, U.
C Computer Methods for Sampling from Gamma,
C Beta, Poisson and Binomial Distributions.
***************
*** 53,60 ****
EXTERNAL sgamma
C ..
C .. Executable Statements ..
! gengam = sgamma(r)
! gengam = gengam/a
RETURN
END
--- 55,71 ----
EXTERNAL sgamma
C ..
C .. Executable Statements ..
!
! C JJV added argument value checker
! IF ( a.GT.0.0 .AND. r.GT.0.0 ) GO TO 10
! WRITE (*,*) 'In GENGAM - Either (1) Location param A <= 0.0 or'
! WRITE (*,*) '(2) Shape param R <= 0.0 - ABORT!'
! WRITE (*,*) 'A value: ',a,'R value: ',r
! STOP 'Location or shape param out of range in GENGAM - ABORT!'
! C JJV end addition
!
! 10 gengam = sgamma(r)/a
! C gengam = gengam/a
RETURN
END
diff -cNr octave-2.0.13/libcruft/ranlib/genmul.f octave-2.0.14/libcruft/ranlib/genmul.f
*** octave-2.0.13/libcruft/ranlib/genmul.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/ranlib/genmul.f Thu Oct 15 00:19:38 1998
***************
*** 0 ****
--- 1,92 ----
+ SUBROUTINE genmul(n,p,ncat,ix)
+ C**********************************************************************
+ C
+ C SUBROUTINE GENMUL( N, P, NCAT, IX )
+ C GENerate an observation from the MULtinomial distribution
+ C
+ C
+ C Arguments
+ C
+ C
+ C N --> Number of events that will be classified into one of
+ C the categories 1..NCAT
+ C INTEGER N
+ C
+ C P --> Vector of probabilities. P(i) is the probability that
+ C an event will be classified into category i. Thus, P(i)
+ C must be [0,1]. Only the first NCAT-1 P(i) must be defined
+ C since P(NCAT) is 1.0 minus the sum of the first
+ C NCAT-1 P(i).
+ C REAL P(NCAT-1)
+ C
+ C NCAT --> Number of categories. Length of P and IX.
+ C INTEGER NCAT
+ C
+ C IX <-- Observation from multinomial distribution. All IX(i)
+ C will be nonnegative and their sum will be N.
+ C INTEGER IX(NCAT)
+ C
+ C
+ C Method
+ C
+ C
+ C Algorithm from page 559 of
+ C
+ C Devroye, Luc
+ C
+ C Non-Uniform Random Variate Generation. Springer-Verlag,
+ C New York, 1986.
+ C
+ C**********************************************************************
+ C .. Scalar Arguments ..
+ INTEGER n,ncat
+ C ..
+ C .. Array Arguments ..
+ REAL p(*)
+ INTEGER ix(*)
+ C ..
+ C .. Local Scalars ..
+ REAL prob,ptot,sum
+ INTEGER i,icat,ntot
+ C ..
+ C .. External Functions ..
+ INTEGER ignbin
+ EXTERNAL ignbin
+ C ..
+ C .. Intrinsic Functions ..
+ INTRINSIC abs
+ C ..
+ C .. Executable Statements ..
+
+ C Check Arguments
+ IF (n.LT.0) STOP 'N < 0 in GENMUL'
+ IF (ncat.LE.1) STOP 'NCAT <= 1 in GENMUL'
+ ptot = 0.0
+ DO 10,i = 1,ncat - 1
+ IF (p(i).LT.0.0) STOP 'Some P(i) < 0 in GENMUL'
+ IF (p(i).GT.1.0) STOP 'Some P(i) > 1 in GENMUL'
+ ptot = ptot + p(i)
+ 10 CONTINUE
+ IF (ptot.GT.0.99999) STOP 'Sum of P(i) > 1 in GENMUL'
+
+ C Initialize variables
+ ntot = n
+ sum = 1.0
+ DO 20,i = 1,ncat
+ ix(i) = 0
+ 20 CONTINUE
+
+ C Generate the observation
+ DO 30,icat = 1,ncat - 1
+ prob = p(icat)/sum
+ ix(icat) = ignbin(ntot,prob)
+ ntot = ntot - ix(icat)
+ IF (ntot.LE.0) RETURN
+ sum = sum - p(icat)
+ 30 CONTINUE
+ ix(ncat) = ntot
+
+ C Finished
+ RETURN
+
+ END
diff -cNr octave-2.0.13/libcruft/ranlib/gennch.f octave-2.0.14/libcruft/ranlib/gennch.f
*** octave-2.0.13/libcruft/ranlib/gennch.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/gennch.f Thu Oct 15 00:19:38 1998
***************
*** 18,24 ****
C
C
C DF --> Degrees of freedom of the chisquare
! C (Must be > 1.0)
C REAL DF
C
C XNONC --> Noncentrality parameter of the chisquare
--- 18,24 ----
C
C
C DF --> Degrees of freedom of the chisquare
! C (Must be >= 1.0)
C REAL DF
C
C XNONC --> Noncentrality parameter of the chisquare
***************
*** 31,56 ****
C
C Uses fact that noncentral chisquare is the sum of a chisquare
C deviate with DF-1 degrees of freedom plus the square of a normal
! C deviate with mean XNONC and standard deviation 1.
C
C**********************************************************************
C .. Scalar Arguments ..
REAL df,xnonc
C ..
C .. External Functions ..
! REAL genchi,gennor
! EXTERNAL genchi,gennor
C ..
C .. Intrinsic Functions ..
INTRINSIC sqrt
C ..
C .. Executable Statements ..
! IF (.NOT. (df.LE.1.0.OR.xnonc.LT.0.0)) GO TO 10
! WRITE (*,*) 'DF <= 1 or XNONC < 0 in GENNCH - ABORT'
WRITE (*,*) 'Value of DF: ',df,' Value of XNONC',xnonc
! CALL XSTOPX ('DF <= 1 or XNONC < 0 in GENNCH - ABORT')
! 10 gennch = genchi(df-1.0) + gennor(sqrt(xnonc),1.0)**2
! RETURN
END
--- 31,69 ----
C
C Uses fact that noncentral chisquare is the sum of a chisquare
C deviate with DF-1 degrees of freedom plus the square of a normal
! C deviate with mean sqrt(XNONC) and standard deviation 1.
C
C**********************************************************************
C .. Scalar Arguments ..
REAL df,xnonc
C ..
C .. External Functions ..
! C JJV changed these to call SGAMMA and SNORM directly
! C REAL genchi,gennor
! C EXTERNAL genchi,gennor
! REAL sgamma,snorm
! EXTERNAL sgamma,snorm
C ..
C .. Intrinsic Functions ..
INTRINSIC sqrt
C ..
+ C JJV changed abort to df < 1, and added case: df = 1
C .. Executable Statements ..
! IF (.NOT. (df.LT.1.0.OR.xnonc.LT.0.0)) GO TO 10
! WRITE (*,*) 'DF < 1 or XNONC < 0 in GENNCH - ABORT'
WRITE (*,*) 'Value of DF: ',df,' Value of XNONC',xnonc
! STOP 'DF < 1 or XNONC < 0 in GENNCH - ABORT'
! C JJV changed this to call SGAMMA and SNORM directly
! C gennch = genchi(df-1.0) + gennor(sqrt(xnonc),1.0)**2
+ 10 IF (df.GE.1.000001) GO TO 20
+ C JJV case DF = 1.0
+ gennch = (snorm() + sqrt(xnonc))**2
+ GO TO 30
+
+ C JJV case DF > 1.0
+ 20 gennch = 2.0*sgamma((df-1.0)/2.0) + (snorm() + sqrt(xnonc))**2
+ 30 RETURN
+
END
diff -cNr octave-2.0.13/libcruft/ranlib/gennf.f octave-2.0.14/libcruft/ranlib/gennf.f
*** octave-2.0.13/libcruft/ranlib/gennf.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/gennf.f Thu Oct 15 00:19:38 1998
***************
*** 45,75 ****
LOGICAL qcond
C ..
C .. External Functions ..
! REAL genchi,gennch
! EXTERNAL genchi,gennch
C ..
C .. Executable Statements ..
! qcond = dfn .LE. 1.0 .OR. dfd .LE. 0.0 .OR. xnonc .LT. 0.0
IF (.NOT. (qcond)) GO TO 10
! WRITE (*,*) 'In GENNF - Either (1) Numerator DF <= 1.0 or'
! WRITE (*,*) '(2) Denominator DF < 0.0 or '
WRITE (*,*) '(3) Noncentrality parameter < 0.0'
WRITE (*,*) 'DFN value: ',dfn,'DFD value: ',dfd,'XNONC value: ',
+ xnonc
! CALL XSTOPX
! + ('Degrees of freedom or noncent param our of range in GENNF')
- 10 xnum = gennch(dfn,xnonc)/dfn
C GENNF = ( GENNCH( DFN, XNONC ) / DFN ) / ( GENCHI( DFD ) / DFD )
! xden = genchi(dfd)/dfd
! IF (.NOT. (xden.LE. (1.2E-38*xnum))) GO TO 20
WRITE (*,*) ' GENNF - generated numbers would cause overflow'
WRITE (*,*) ' Numerator ',xnum,' Denominator ',xden
! WRITE (*,*) ' GENNF returning 1.0E38'
! gennf = 1.0E38
! GO TO 30
! 20 gennf = xnum/xden
! 30 RETURN
END
--- 45,96 ----
LOGICAL qcond
C ..
C .. External Functions ..
! C JJV changed the code to call SGAMMA and SNORM directly
! C REAL genchi,gennch
! C EXTERNAL genchi,gennch
! REAL sgamma,snorm
! EXTERNAL sgamma,snorm
C ..
C .. Executable Statements ..
! C JJV changed the argument checker to allow DFN = 1.0
! C JJV in the same way as GENNCH was changed.
! qcond = dfn .LT. 1.0 .OR. dfd .LE. 0.0 .OR. xnonc .LT. 0.0
IF (.NOT. (qcond)) GO TO 10
! WRITE (*,*) 'In GENNF - Either (1) Numerator DF < 1.0 or'
! WRITE (*,*) '(2) Denominator DF <= 0.0 or '
WRITE (*,*) '(3) Noncentrality parameter < 0.0'
WRITE (*,*) 'DFN value: ',dfn,'DFD value: ',dfd,'XNONC value: ',
+ xnonc
! STOP 'Degrees of freedom or noncent param out of range in GENNF'
C GENNF = ( GENNCH( DFN, XNONC ) / DFN ) / ( GENCHI( DFD ) / DFD )
! C JJV changed this to call SGAMMA and SNORM directly
! C xnum = gennch(dfn,xnonc)/dfn
! 10 IF (dfn.GE.1.000001) GO TO 20
! C JJV case dfn = 1.0 - here I am treating dfn as exactly 1.0
! xnum = (snorm() + sqrt(xnonc))**2
! GO TO 30
!
! C JJV case dfn > 1.0
! 20 xnum = (2.0*sgamma((dfn-1.0)/2.0) + (snorm()+sqrt(xnonc))**2)/dfn
!
! C xden = genchi(dfd)/dfd
! 30 xden = 2.0*sgamma(dfd/2.0)/dfd
!
! C JJV changed constant so that it will not underflow at compile time
! C JJV while not slowing generator by using double precision or logs.
! C IF (.NOT. (xden.LE. (1.0E-38*xnum))) GO TO 40
! IF (.NOT. (xden.LE. (1.0E-37*xnum))) GO TO 40
WRITE (*,*) ' GENNF - generated numbers would cause overflow'
WRITE (*,*) ' Numerator ',xnum,' Denominator ',xden
! C JJV next 2 lines changed to maintain truncation of large deviates.
! C WRITE (*,*) ' GENNF returning 1.0E38'
! C gennf = 1.0E38
! WRITE (*,*) ' GENNF returning 1.0E37'
! gennf = 1.0E37
! GO TO 50
! 40 gennf = xnum/xden
! 50 RETURN
END
diff -cNr octave-2.0.13/libcruft/ranlib/gennor.f octave-2.0.14/libcruft/ranlib/gennor.f
*** octave-2.0.13/libcruft/ranlib/gennor.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/gennor.f Thu Oct 15 00:19:38 1998
***************
*** 21,26 ****
--- 21,27 ----
C
C SD --> Standard deviation of the normal distribution.
C REAL SD
+ C JJV (SD >= 0)
C
C GENNOR <-- Generated normal deviate.
C REAL GENNOR
***************
*** 48,54 ****
EXTERNAL snorm
C ..
C .. Executable Statements ..
! gennor = sd*snorm() + av
RETURN
END
--- 49,61 ----
EXTERNAL snorm
C ..
C .. Executable Statements ..
! C JJV added check to ensure SD >= 0.0
! IF (sd.GE.0.0) GO TO 10
! WRITE (*,*) 'SD < 0.0 in GENNOR - ABORT'
! WRITE (*,*) 'Value of SD: ',sd
! STOP 'SD < 0.0 in GENNOR - ABORT'
!
! 10 gennor = sd*snorm() + av
RETURN
END
diff -cNr octave-2.0.13/libcruft/ranlib/genunf.f octave-2.0.14/libcruft/ranlib/genunf.f
*** octave-2.0.13/libcruft/ranlib/genunf.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/genunf.f Thu Oct 15 00:19:38 1998
***************
*** 33,39 ****
IF (.NOT. (low.GT.high)) GO TO 10
WRITE (*,*) 'LOW > HIGH in GENUNF: LOW ',low,' HIGH: ',high
WRITE (*,*) 'Abort'
! CALL XSTOPX ('LOW > High in GENUNF - Abort')
10 genunf = low + (high-low)*ranf()
--- 33,39 ----
IF (.NOT. (low.GT.high)) GO TO 10
WRITE (*,*) 'LOW > HIGH in GENUNF: LOW ',low,' HIGH: ',high
WRITE (*,*) 'Abort'
! STOP 'LOW > High in GENUNF - Abort'
10 genunf = low + (high-low)*ranf()
diff -cNr octave-2.0.13/libcruft/ranlib/getcgn.f octave-2.0.14/libcruft/ranlib/getcgn.f
*** octave-2.0.13/libcruft/ranlib/getcgn.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/getcgn.f Thu Oct 15 00:19:38 1998
***************
*** 47,53 ****
IF (.NOT. (g.LT.0.OR.g.GT.numg)) GO TO 10
WRITE (*,*) ' Generator number out of range in SETCGN:',
+ ' Legal range is 1 to ',numg,' -- ABORT!'
! CALL XSTOPX (' Generator number out of range in SETCGN')
10 curntg = g
RETURN
--- 47,53 ----
IF (.NOT. (g.LT.0.OR.g.GT.numg)) GO TO 10
WRITE (*,*) ' Generator number out of range in SETCGN:',
+ ' Legal range is 1 to ',numg,' -- ABORT!'
! STOP ' Generator number out of range in SETCGN'
10 curntg = g
RETURN
diff -cNr octave-2.0.13/libcruft/ranlib/getsd.f octave-2.0.14/libcruft/ranlib/getsd.f
*** octave-2.0.13/libcruft/ranlib/getsd.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/getsd.f Thu Oct 15 00:19:38 1998
***************
*** 1,7 ****
SUBROUTINE getsd(iseed1,iseed2)
C**********************************************************************
C
! C SUBROUTINE GETSD(ISEED1,ISEED2)
C GET SeeD
C
C Returns the value of two integer seeds of the current generator
--- 1,7 ----
SUBROUTINE getsd(iseed1,iseed2)
C**********************************************************************
C
! C SUBROUTINE GETSD(G,ISEED1,ISEED2)
C GET SeeD
C
C Returns the value of two integer seeds of the current generator
***************
*** 62,69 ****
IF (qrgnin()) GO TO 10
WRITE (*,*) ' GETSD called before random number generator ',
+ ' initialized -- abort!'
! CALL XSTOPX
! + (' GETSD called before random number generator initialized')
10 CALL getcgn(g)
iseed1 = cg1(g)
--- 62,68 ----
IF (qrgnin()) GO TO 10
WRITE (*,*) ' GETSD called before random number generator ',
+ ' initialized -- abort!'
! STOP ' GETSD called before random number generator initialized'
10 CALL getcgn(g)
iseed1 = cg1(g)
diff -cNr octave-2.0.13/libcruft/ranlib/ignbin.f octave-2.0.14/libcruft/ranlib/ignbin.f
*** octave-2.0.13/libcruft/ranlib/ignbin.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/ignbin.f Thu Oct 15 00:19:38 1998
***************
*** 1,7 ****
INTEGER FUNCTION ignbin(n,pp)
C**********************************************************************
C
! C INTEGER FUNCTION IGNBIN( N, P )
C
C GENerate BINomial random deviate
C
--- 1,7 ----
INTEGER FUNCTION ignbin(n,pp)
C**********************************************************************
C
! C INTEGER FUNCTION IGNBIN( N, PP )
C
C GENerate BINomial random deviate
C
***************
*** 20,30 ****
C N --> The number of trials in the binomial distribution
C from which a random deviate is to be generated.
C INTEGER N
C
! C P --> The probability of an event in each trial of the
C binomial distribution from which a random deviate
C is to be generated.
! C REAL P
C
C IGNBIN <-- A random deviate yielding the number of events
C from N independent trials, each of which has
--- 20,32 ----
C N --> The number of trials in the binomial distribution
C from which a random deviate is to be generated.
C INTEGER N
+ C JJV (N >= 0)
C
! C PP --> The probability of an event in each trial of the
C binomial distribution from which a random deviate
C is to be generated.
! C REAL PP
! C JJV (0.0 <= pp <= 1.0)
C
C IGNBIN <-- A random deviate yielding the number of events
C from N independent trials, each of which has
***************
*** 162,170 ****
C ..
C .. Intrinsic Functions ..
INTRINSIC abs,alog,amin1,iabs,int,sqrt
C ..
C .. Data statements ..
! DATA psave,nsave/-1.,-1/
C ..
C .. Executable Statements ..
IF (pp.NE.psave) GO TO 10
--- 164,179 ----
C ..
C .. Intrinsic Functions ..
INTRINSIC abs,alog,amin1,iabs,int,sqrt
+ C JJV ..
+ C JJV .. Save statement ..
+ SAVE p,q,m,fm,xnp,xnpq,p1,xm,xl,xr,c,xll,xlr,p2,p3,p4,qn,r,g,
+ + psave,nsave
+ C JJV I am including the variables in data statements
C ..
C .. Data statements ..
! C JJV made these ridiculous starting values - the hope is that
! C JJV no one will call this the first time with them as args
! DATA psave,nsave/-1.0E37,-214748365/
C ..
C .. Executable Statements ..
IF (pp.NE.psave) GO TO 10
***************
*** 173,182 ****
C
C*****SETUP, PERFORM ONLY WHEN PARAMETERS CHANGE
C
! 10 psave = pp
p = amin1(psave,1.-psave)
q = 1. - p
! 20 xnp = n*p
nsave = n
IF (xnp.LT.30.) GO TO 140
ffm = xnp + p
--- 182,199 ----
C
C*****SETUP, PERFORM ONLY WHEN PARAMETERS CHANGE
C
!
! C JJV added the argument checker - involved only renaming 10
! C JJV and 20 to the checkers and adding checkers
! C JJV Only remaining problem - if called initially with the
! C JJV initial values of psave and nsave, it will hang
! 10 IF (pp.LT.0.0) STOP 'PP < 0.0 in IGNBIN - ABORT!'
! IF (pp.GT.1.0) STOP 'PP > 1.0 in IGNBIN - ABORT!'
! psave = pp
p = amin1(psave,1.-psave)
q = 1. - p
! 20 IF (n.LT.0) STOP 'N < 0 in IGNBIN - ABORT!'
! xnp = n*p
nsave = n
IF (xnp.LT.30.) GO TO 140
ffm = xnp + p
diff -cNr octave-2.0.13/libcruft/ranlib/ignnbn.f octave-2.0.14/libcruft/ranlib/ignnbn.f
*** octave-2.0.13/libcruft/ranlib/ignnbn.f Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/ranlib/ignnbn.f Thu Oct 15 00:19:38 1998
***************
*** 0 ****
--- 1,78 ----
+ INTEGER FUNCTION ignnbn(n,p)
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNNBN( N, P )
+ C
+ C GENerate Negative BiNomial random deviate
+ C
+ C
+ C Function
+ C
+ C
+ C Generates a single random deviate from a negative binomial
+ C distribution.
+ C
+ C
+ C Arguments
+ C
+ C
+ C N --> Required number of events.
+ C INTEGER N
+ C JJV (N > 0)
+ C
+ C P --> The probability of an event during a Bernoulli trial.
+ C REAL P
+ C JJV (0.0 < P < 1.0)
+ C
+ C
+ C
+ C Method
+ C
+ C
+ C Algorithm from page 480 of
+ C
+ C Devroye, Luc
+ C
+ C Non-Uniform Random Variate Generation. Springer-Verlag,
+ C New York, 1986.
+ C
+ C**********************************************************************
+ C ..
+ C .. Scalar Arguments ..
+ REAL p
+ INTEGER n
+ C ..
+ C .. Local Scalars ..
+ REAL y,a,r
+ C ..
+ C .. External Functions ..
+ C JJV changed to call SGAMMA directly
+ C REAL gengam
+ REAL sgamma
+ INTEGER ignpoi
+ C EXTERNAL gengam,ignpoi
+ EXTERNAL sgamma,ignpoi
+ C ..
+ C .. Intrinsic Functions ..
+ INTRINSIC real
+ C ..
+ C .. Executable Statements ..
+ C Check Arguments
+ C JJV changed argumnet checker to abort if N <= 0
+ IF (n.LE.0) STOP 'N <= 0 in IGNNBN'
+ IF (p.LE.0.0) STOP 'P <= 0.0 in IGNNBN'
+ IF (p.GE.1.0) STOP 'P >= 1.0 in IGNNBN'
+
+ C Generate Y, a random gamma (n,(1-p)/p) variable
+ C JJV Note: the above parametrization is consistent with Devroye,
+ C JJV but gamma (p/(1-p),n) is the equivalent in our code
+ 10 r = real(n)
+ a = p/ (1.0-p)
+ C y = gengam(a,r)
+ y = sgamma(r)/a
+
+ C Generate a random Poisson(y) variable
+ ignnbn = ignpoi(y)
+ RETURN
+
+ END
diff -cNr octave-2.0.13/libcruft/ranlib/ignpoi.f octave-2.0.14/libcruft/ranlib/ignpoi.f
*** octave-2.0.13/libcruft/ranlib/ignpoi.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/ignpoi.f Thu Oct 15 00:19:38 1998
***************
*** 1,7 ****
INTEGER FUNCTION ignpoi(mu)
C**********************************************************************
C
! C INTEGER FUNCTION IGNPOI( AV )
C
C GENerate POIsson random deviate
C
--- 1,7 ----
INTEGER FUNCTION ignpoi(mu)
C**********************************************************************
C
! C INTEGER FUNCTION IGNPOI( MU )
C
C GENerate POIsson random deviate
C
***************
*** 10,27 ****
C
C
C Generates a single random deviate from a Poisson
! C distribution with mean AV.
C
C
C Arguments
C
C
! C AV --> The mean of the Poisson distribution from which
C a random deviate is to be generated.
! C REAL AV
C
! C GENEXP <-- The random deviate.
! C REAL GENEXP
C
C
C Method
--- 10,28 ----
C
C
C Generates a single random deviate from a Poisson
! C distribution with mean MU.
C
C
C Arguments
C
C
! C MU --> The mean of the Poisson distribution from which
C a random deviate is to be generated.
! C REAL MU
! C JJV (MU >= 0.0)
C
! C IGNPOI <-- The random deviate.
! C INTEGER IGNPOI (non-negative)
C
C
C Method
***************
*** 68,74 ****
C
C
C
! C MUPREV=PREVIOUS MU, MUOLD=MU AT LAST EXECUTION OF STEP P OR B.
C TABLES: COEFFICIENTS A0-A7 FOR STEP F. FACTORIALS FACT
C COEFFICIENTS A(K) - FOR PX = FK*V*V*SUM(A(K)*V**K)-DEL
C
--- 69,75 ----
C
C
C
! C MUPREV=PREVIOUS MU, MUOLD=MU AT LAST EXECUTION OF STEP P OR CASE B
C TABLES: COEFFICIENTS A0-A7 FOR STEP F. FACTORIALS FACT
C COEFFICIENTS A(K) - FOR PX = FK*V*V*SUM(A(K)*V**K)-DEL
C
***************
*** 82,88 ****
C .. Local Scalars ..
REAL a0,a1,a2,a3,a4,a5,a6,a7,b1,b2,c,c0,c1,c2,c3,d,del,difmuk,e,
+ fk,fx,fy,g,muold,muprev,omega,p,p0,px,py,q,s,t,u,v,x,xx
! INTEGER j,k,kflag,l,m
C ..
C .. Local Arrays ..
REAL fact(10),pp(35)
--- 83,90 ----
C .. Local Scalars ..
REAL a0,a1,a2,a3,a4,a5,a6,a7,b1,b2,c,c0,c1,c2,c3,d,del,difmuk,e,
+ fk,fx,fy,g,muold,muprev,omega,p,p0,px,py,q,s,t,u,v,x,xx
! C JJV I added a variable 'll' here - it is the 'l' for CASE A
! INTEGER j,k,kflag,l,ll,m
C ..
C .. Local Arrays ..
REAL fact(10),pp(35)
***************
*** 94,120 ****
C .. Intrinsic Functions ..
INTRINSIC abs,alog,exp,float,ifix,max0,min0,sign,sqrt
C ..
C .. Data statements ..
! DATA muprev,muold/0.,0./
DATA a0,a1,a2,a3,a4,a5,a6,a7/-.5,.3333333,-.2500068,.2000118,
+ -.1661269,.1421878,-.1384794,.1250060/
DATA fact/1.,1.,2.,6.,24.,120.,720.,5040.,40320.,362880./
C ..
C .. Executable Statements ..
IF (mu.EQ.muprev) GO TO 10
IF (mu.LT.10.0) GO TO 120
C
! C C A S E A. (RECALCULATION OF S,D,L IF MU HAS CHANGED)
C
muprev = mu
s = sqrt(mu)
d = 6.0*mu*mu
C
C THE POISSON PROBABILITIES PK EXCEED THE DISCRETE NORMAL
! C PROBABILITIES FK WHENEVER K >= M(MU). L=IFIX(MU-1.1484)
C IS AN UPPER BOUND TO M(MU) FOR ALL MU >= 10 .
C
! l = ifix(mu-1.1484)
C
C STEP N. NORMAL SAMPLE - SNORM(IR) FOR STANDARD NORMAL DEVIATE
C
--- 96,135 ----
C .. Intrinsic Functions ..
INTRINSIC abs,alog,exp,float,ifix,max0,min0,sign,sqrt
C ..
+ C JJV added this for case: mu unchanged
+ C .. Save statement ..
+ SAVE s, d, l, ll, omega, c3, c2, c1, c0, c, m, p, q, p0,
+ + a0, a1, a2, a3, a4, a5, a6, a7, fact, muprev, muold
+ C ..
+ C JJV end addition - I am including vars in Data statements
C .. Data statements ..
! C JJV changed initial values of MUPREV and MUOLD to -1.0E37
! C JJV if no one calls IGNPOI with MU = -1.0E37 the first time,
! C JJV the code shouldn't break
! DATA muprev,muold/-1.0E37,-1.0E37/
DATA a0,a1,a2,a3,a4,a5,a6,a7/-.5,.3333333,-.2500068,.2000118,
+ -.1661269,.1421878,-.1384794,.1250060/
DATA fact/1.,1.,2.,6.,24.,120.,720.,5040.,40320.,362880./
C ..
C .. Executable Statements ..
+
IF (mu.EQ.muprev) GO TO 10
IF (mu.LT.10.0) GO TO 120
C
! C C A S E A. (RECALCULATION OF S,D,LL IF MU HAS CHANGED)
C
+ C JJV This is the case where I changed 'l' to 'll'
+ C JJV Here 'll' is set once and used in a comparison once
+
muprev = mu
s = sqrt(mu)
d = 6.0*mu*mu
C
C THE POISSON PROBABILITIES PK EXCEED THE DISCRETE NORMAL
! C PROBABILITIES FK WHENEVER K >= M(MU). LL=IFIX(MU-1.1484)
C IS AN UPPER BOUND TO M(MU) FOR ALL MU >= 10 .
C
! ll = ifix(mu-1.1484)
C
C STEP N. NORMAL SAMPLE - SNORM(IR) FOR STANDARD NORMAL DEVIATE
C
***************
*** 124,130 ****
C
C STEP I. IMMEDIATE ACCEPTANCE IF IGNPOI IS LARGE ENOUGH
C
! IF (ignpoi.GE.l) RETURN
C
C STEP S. SQUEEZE ACCEPTANCE - SUNIF(IR) FOR (0,1)-SAMPLE U
C
--- 139,145 ----
C
C STEP I. IMMEDIATE ACCEPTANCE IF IGNPOI IS LARGE ENOUGH
C
! IF (ignpoi.GE.ll) RETURN
C
C STEP S. SQUEEZE ACCEPTANCE - SUNIF(IR) FOR (0,1)-SAMPLE U
C
***************
*** 214,222 ****
C
C C A S E B. (START NEW TABLE AND CALCULATE P0 IF NECESSARY)
C
! 120 muprev = 0.0
IF (mu.EQ.muold) GO TO 130
! muold = mu
m = max0(1,ifix(mu))
l = 0
p = exp(-mu)
--- 229,244 ----
C
C C A S E B. (START NEW TABLE AND CALCULATE P0 IF NECESSARY)
C
! C JJV changed MUPREV assignment from 0.0 to initial value
! 120 muprev = -1.0E37
IF (mu.EQ.muold) GO TO 130
! C JJV added argument checker here
! IF (mu.GE.0.0) GO TO 125
! WRITE (*,*) 'MU < 0 in IGNPOI - ABORT'
! WRITE (*,*) 'Value of MU: ',mu
! STOP 'MU < 0 in IGNPOI - ABORT'
! C JJV added line label here
! 125 muold = mu
m = max0(1,ifix(mu))
l = 0
p = exp(-mu)
diff -cNr octave-2.0.13/libcruft/ranlib/ignuin.f octave-2.0.14/libcruft/ranlib/ignuin.f
*** octave-2.0.13/libcruft/ranlib/ignuin.f Tue Dec 13 21:50:52 1994
--- octave-2.0.14/libcruft/ranlib/ignuin.f Thu Oct 15 00:19:38 1998
***************
*** 68,75 ****
ignuin = low
RETURN
- GO TO 70
-
C Number to be generated should be in range 0..RANGE
C Set MAXNOW so that the number of integers in 0..MAXNOW is an
C integral multiple of the number in 0..RANGE
--- 68,73 ----
***************
*** 77,90 ****
30 ranp1 = range + 1
maxnow = (maxnum/ranp1)*ranp1
40 ign = ignlgi() - 1
! IF (.NOT. (ign.LE.maxnow)) GO TO 50
ignuin = low + mod(ign,ranp1)
RETURN
- 50 GO TO 40
-
- 60 CONTINUE
- 70 CONTINUE
80 IF (.NOT. (err.EQ.1)) GO TO 90
WRITE (*,*) err1
GO TO 100
--- 75,84 ----
30 ranp1 = range + 1
maxnow = (maxnum/ranp1)*ranp1
40 ign = ignlgi() - 1
! IF (.NOT. (ign.LE.maxnow)) GO TO 40
ignuin = low + mod(ign,ranp1)
RETURN
80 IF (.NOT. (err.EQ.1)) GO TO 90
WRITE (*,*) err1
GO TO 100
***************
*** 94,103 ****
100 WRITE (*,*) ' LOW: ',low,' HIGH: ',high
WRITE (*,*) ' Abort on Fatal ERROR'
IF (.NOT. (err.EQ.1)) GO TO 110
! CALL XSTOPX ('LOW > HIGH in IGNUIN')
! IGNUIN = 0
!
! GO TO 120
110 STOP ' ( HIGH - LOW ) > 2,147,483,561 in IGNUIN'
--- 88,94 ----
100 WRITE (*,*) ' LOW: ',low,' HIGH: ',high
WRITE (*,*) ' Abort on Fatal ERROR'
IF (.NOT. (err.EQ.1)) GO TO 110
! STOP 'LOW > HIGH in IGNUIN'
110 STOP ' ( HIGH - LOW ) > 2,147,483,561 in IGNUIN'
diff -cNr octave-2.0.13/libcruft/ranlib/initgn.f octave-2.0.14/libcruft/ranlib/initgn.f
*** octave-2.0.13/libcruft/ranlib/initgn.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/initgn.f Thu Oct 15 00:19:38 1998
***************
*** 66,73 ****
IF (qrgnin()) GO TO 10
WRITE (*,*) ' INITGN called before random number generator ',
+ ' initialized -- abort!'
! CALL XSTOPX
! + (' INITGN called before random number generator initialized')
10 CALL getcgn(g)
IF ((-1).NE. (isdtyp)) GO TO 20
--- 66,72 ----
IF (qrgnin()) GO TO 10
WRITE (*,*) ' INITGN called before random number generator ',
+ ' initialized -- abort!'
! STOP ' INITGN called before random number generator initialized'
10 CALL getcgn(g)
IF ((-1).NE. (isdtyp)) GO TO 20
diff -cNr octave-2.0.13/libcruft/ranlib/mltmod.f octave-2.0.14/libcruft/ranlib/mltmod.f
*** octave-2.0.13/libcruft/ranlib/mltmod.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/mltmod.f Thu Oct 15 00:19:38 1998
***************
*** 39,45 ****
WRITE (*,*) ' A, M, S out of order in MLTMOD - ABORT!'
WRITE (*,*) ' A = ',a,' S = ',s,' M = ',m
WRITE (*,*) ' MLTMOD requires: 0 < A < M; 0 < S < M'
! CALL XSTOPX (' A, M, S out of order in MLTMOD - ABORT!')
10 IF (.NOT. (a.LT.h)) GO TO 20
a0 = a
--- 39,45 ----
WRITE (*,*) ' A, M, S out of order in MLTMOD - ABORT!'
WRITE (*,*) ' A = ',a,' S = ',s,' M = ',m
WRITE (*,*) ' MLTMOD requires: 0 < A < M; 0 < S < M'
! STOP ' A, M, S out of order in MLTMOD - ABORT!'
10 IF (.NOT. (a.LT.h)) GO TO 20
a0 = a
diff -cNr octave-2.0.13/libcruft/ranlib/phrtsd.f octave-2.0.14/libcruft/ranlib/phrtsd.f
*** octave-2.0.13/libcruft/ranlib/phrtsd.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/phrtsd.f Thu Oct 15 00:19:38 1998
***************
*** 59,64 ****
--- 59,69 ----
C .. Intrinsic Functions ..
INTRINSIC index,mod
C ..
+ C JJV added Save statement for variable in Data statement
+ C .. Save statements ..
+ SAVE shift
+ C JJV end addition
+ C ..
C .. Data statements ..
DATA shift/1,64,4096,262144,16777216/
C ..
diff -cNr octave-2.0.13/libcruft/ranlib/randlib.chs octave-2.0.14/libcruft/ranlib/randlib.chs
*** octave-2.0.13/libcruft/ranlib/randlib.chs Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/ranlib/randlib.chs Thu Oct 15 00:19:38 1998
***************
*** 0 ****
--- 1,368 ----
+ SUMMARY OF ROUTINES IN RANDLIB
+
+ 0. Base Level Routines to Set and Obtain Values of Seeds
+
+ (These should be the only base level routines used by those who don't
+ need multiple generators with blocks of numbers.)
+
+ C**********************************************************************
+ C
+ C SUBROUTINE SETALL(ISEED1,ISEED2)
+ C SET ALL random number generators
+ C INTEGER ISEED1, ISEED2
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE GETSD(ISEED1,ISEED2)
+ C GET SeeD
+ C INTEGER ISEED1, ISEED2
+ C
+ C Returns the value of two integer seeds of the current generator
+ C in ISEED1, ISEED2
+ C
+ C**********************************************************************
+
+ I. Higher Level Routines
+
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENBET( A, B )
+ C GeNerate BETa random deviate
+ C REAL A,B
+ C
+ C Returns a single random deviate from the beta distribution with
+ C parameters A and B. The density of the beta is
+ C x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x < 1
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENCHI( DF )
+ C Generate random value of CHIsquare variable
+ C REAL DF
+ C
+ C Generates random deviate from the distribution of a chisquare
+ C with DF degrees of freedom random variable.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENEXP( AV )
+ C GENerate EXPonential random deviate
+ C REAL AV
+ C
+ C Generates a single random deviate from an exponential
+ C distribution with mean AV.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENF( DFN, DFD )
+ C GENerate random deviate from the F distribution
+ C REAL DFN, DFD
+ C
+ C Generates a random deviate from the F (variance ratio)
+ C distribution with DFN degrees of freedom in the numerator
+ C and DFD degrees of freedom in the denominator.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENGAM( A, R )
+ C GENerates random deviates from GAMma distribution
+ C REAL A, R
+ C
+ C Generates random deviates from the gamma distribution whose
+ C density is
+ C (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X)
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE GENMN(PARM,X,WORK)
+ C GENerate Multivariate Normal random deviate
+ C REAL PARM(*), X(*), WORK(*)
+ C
+ C PARM is set by SETGMN which must be called prior to GENMN. The
+ C generated deviates are placed in X. WORK is a work array of the
+ C same size as X.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE GENMUL( N, P, NCAT, IX )
+ C GENerate MULtinomial random deviate
+ C REAL P(*)
+ C INTEGER N, NCAT, IX(*)
+ C
+ C Generates deviates from a Multinomial distribution with NCAT
+ C categories. P specifies the probability of an event in each
+ C category. The generated deviates are placed in IX.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENNCH( DF, XNONC )
+ C Generate random value of Noncentral CHIsquare variable
+ C REAL DF, XNONC
+ C
+ C Generates random deviate from the distribution of a noncentral
+ C chisquare with DF degrees of freedom and noncentrality parameter
+ C XNONC.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENNF( DFN, DFD, XNONC )
+ C GENerate random deviate from the Noncentral F distribution
+ C REAL DFN, DFD, XNONC
+ C
+ C Generates a random deviate from the noncentral F (variance ratio)
+ C distribution with DFN degrees of freedom in the numerator, and DFD
+ C degrees of freedom in the denominator, and noncentrality parameter
+ C XNONC.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENNOR( AV, SD )
+ C GENerate random deviate from a NORmal distribution
+ C REAL AV, SD
+ C
+ C Generates a single random deviate from a normal distribution
+ C with mean, AV, and standard deviation, SD.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE GENPRM( IARRAY, LARRAY )
+ C GENerate random PeRMutation of iarray
+ C INTEGER IARRAY(LARRAY), LARRAY
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENUNF( LOW, HIGH )
+ C GeNerate Uniform Real between LOW and HIGH
+ C REAL LOW, HIGH
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNBIN( N, P )
+ C GENerate BINomial random deviate
+ C INTEGER N
+ C REAL P
+ C
+ C Returns a single random deviate from a binomial
+ C distribution whose number of trials is N and whose
+ C probability of an event in each trial is P.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNNBN( N, P )
+ C GENerate Negative BiNomial random deviate
+ C INTEGER N
+ C REAL P
+ C
+ C Returns a single random deviate from a negative binomial
+ C distribution with number of events N and whose
+ C probability of an event in each trial is P.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNPOI( AV )
+ C GENerate POIsson random deviate
+ C REAL AV
+ C
+ C Generates a single random deviate from a Poisson
+ C distribution with mean AV.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNUIN( LOW, HIGH )
+ C GeNerate Uniform INteger
+ C INTEGER LOW, HIGH
+ C
+ C Generates an integer uniformly distributed between LOW and HIGH.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE PHRTSD( PHRASE, SEED1, SEED2 )
+ C PHRase To SeeDs
+ C CHARACTER*(*) PHRASE
+ C INTEGER SEED1, SEED2
+ C
+ C Uses a phrase (character string) to generate two seeds for the RGN
+ C random number generator.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION RANF()
+ C RANDom number generator as a Function
+ C
+ C Returns a random floating point number from a uniform distribution
+ C over 0 - 1 (endpoints of this interval are not returned) using the
+ C current generator
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE SETGMN( MEANV, COVM, LDCOVM, P, PARM)
+ C SET Generate Multivariate Normal random deviate
+ C INTEGER LDCOVM, P
+ C REAL MEANV(P), COVM(LDCOVM,P), PARM(P*(P+3)/2 + 1)
+ C
+ C P is the length of normal vectors to be generated, MEANV
+ C is the vector of their means and COVM(1:P,1:P) is their variance
+ C covariance matrix. LDCOVM is the leading actual dimension of
+ C COVM, which this routine needs to know although only the
+ C (1:P,1:P) slice of COVM is used.
+ C Places information necessary to generate the deviates in PARM.
+ C
+ C**********************************************************************
+
+ II. Uniform Generator and Associated Routines
+
+
+ A. SETTING THE SEED OF ALL GENERATORS
+
+ C**********************************************************************
+ C
+ C SUBROUTINE SETALL(ISEED1,ISEED2)
+ C SET ALL random number generators
+ C INTEGER ISEED1, ISEED2
+ C
+ C**********************************************************************
+
+ B. OBTAINING RANDOM NUMBERS
+
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNLGI()
+ C GeNerate LarGe Integer
+ C
+ C Returns a random integer following a uniform distribution over
+ C (1, 2147483562) using the current generator.
+ C
+ C**********************************************************************
+
+ C**********************************************************************
+ C
+ C REAL FUNCTION RANF()
+ C RANDom number generator as a Function
+ C
+ C Returns a random floating point number from a uniform distribution
+ C over 0 - 1 (endpoints of this interval are not returned) using the
+ C current generator
+ C
+ C**********************************************************************
+
+ C. SETTING AND OBTAINING THE NUMBER OF THE CURRENT GENERATOR
+
+ C**********************************************************************
+ C
+ C SUBROUTINE SETCGN( G )
+ C Set GeNerator
+ C INTEGER G
+ C
+ C Sets the current generator to G. All references to a generator
+ C are to the current generator.
+ C
+ C**********************************************************************
+
+ C**********************************************************************
+ C
+ C SUBROUTINE GETCGN(G)
+ C GET Current GeNerator
+ C INTEGER G
+ C
+ C Returns in G the number of the current random number generator
+ C
+ C**********************************************************************
+
+ D. OBTAINING OR CHANGING SEEDS IN CURRENT GENERATOR
+
+ C**********************************************************************
+ C
+ C SUBROUTINE ADVNST(K)
+ C ADV-a-N-ce ST-ate
+ C INTEGER K
+ C
+ C Advances the state of the current generator by 2^K values and
+ C resets the initial seed to that value.
+ C
+ C**********************************************************************
+
+ C**********************************************************************
+ C
+ C SUBROUTINE GETSD(ISEED1,ISEED2)
+ C GET SeeD
+ C INTEGER ISEED1, ISEED2
+ C
+ C Returns the value of two integer seeds of the current generator
+ C in ISEED1, ISEED2
+ C
+ C**********************************************************************
+
+ C**********************************************************************
+ C
+ C SUBROUTINE INITGN(ISDTYP)
+ C INIT-ialize current G-e-N-erator
+ C
+ C INTEGER ISDTYP The state to which the generator is to be set
+ C ISDTYP = -1 => sets the seeds to their initial value
+ C ISDTYP = 0 => sets the seeds to the first value of
+ C the current block
+ C ISDTYP = 1 => sets the seeds to the first value of
+ C the next block
+ C
+ C**********************************************************************
+
+ C**********************************************************************
+ C
+ C SUBROUTINE SETSD(ISEED1,ISEED2)
+ C SET S-ee-D of current generator
+ C
+ C Resets the initial seed of the current generator to ISEED1 and
+ C ISEED2. The seeds of the other generators remain unchanged.
+ C
+ C**********************************************************************
+
+ E. MISCELLANY
+
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION MLTMOD(A,S,M)
+ C Returns (A*S) MOD M
+ C INTEGER A, S, M
+ C
+ C**********************************************************************
+
+ C**********************************************************************
+ C
+ C SUBROUTINE SETANT(QVALUE)
+ C SET ANTithetic
+ C LOGICAL QVALUE
+ C
+ C Sets whether the current generator produces antithetic values. If
+ C X is the value normally returned from a uniform [0,1] random
+ C number generator then 1 - X is the antithetic value. If X is the
+ C value normally returned from a uniform [0,N] random number
+ C generator then N - 1 - X is the antithetic value.
+ C
+ C All generators are initialized to NOT generate antithetic values.
+ C
+ C**********************************************************************
+
+
+
+
+
+
diff -cNr octave-2.0.13/libcruft/ranlib/randlib.fdoc octave-2.0.14/libcruft/ranlib/randlib.fdoc
*** octave-2.0.13/libcruft/ranlib/randlib.fdoc Wed Dec 31 18:00:00 1969
--- octave-2.0.14/libcruft/ranlib/randlib.fdoc Thu Oct 15 00:19:38 1998
***************
*** 0 ****
--- 1,961 ----
+
+
+
+
+
+
+
+
+
+
+
+ RANDLIB
+
+ Library of Fortran Routines for Random Number Generation
+
+
+
+
+
+
+
+
+ Full Documentation of Each Routine
+
+
+
+
+
+
+
+
+ Compiled and Written by:
+
+ Barry W. Brown
+ James Lovato
+
+
+
+
+
+
+
+
+
+
+ Department of Biomathematics, Box 237
+ The University of Texas, M.D. Anderson Cancer Center
+ 1515 Holcombe Boulevard
+ Houston, TX 77030
+
+
+ This work was supported by grant CA-16672 from the National Cancer Institute.
+
+ C**********************************************************************
+ C
+ C SUBROUTINE ADVNST(K)
+ C ADV-a-N-ce ST-ate
+ C
+ C Advances the state of the current generator by 2^K values and
+ C resets the initial seed to that value.
+ C
+ C This is a transcription from Pascal to Fortran of routine
+ C Advance_State from the paper
+ C
+ C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
+ C with Splitting Facilities." ACM Transactions on Mathematical
+ C Software, 17:98-111 (1991)
+ C
+ C
+ C Arguments
+ C
+ C
+ C K -> The generator is advanced by2^K values
+ C INTEGER K
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENBET( A, B )
+ C GeNerate BETa random deviate
+ C
+ C
+ C Function
+ C
+ C
+ C Returns a single random deviate from the beta distribution with
+ C parameters A and B. The density of the beta is
+ C x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x < 1
+ C
+ C
+ C Arguments
+ C
+ C
+ C A --> First parameter of the beta distribution
+ C REAL A
+ C (A >= 1.0E-37)
+ C
+ C B --> Second parameter of the beta distribution
+ C REAL B
+ C (B >= 1.0E-37)
+ C
+ C
+ C Method
+ C
+ C
+ C R. C. H. Cheng
+ C Generating Beta Variables with Nonintegral Shape Parameters
+ C Communications of the ACM, 21:317-322 (1978)
+ C (Algorithms BB and BC)
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENCHI( DF )
+ C Generate random value of CHIsquare variable
+ C
+ C
+ C Function
+ C
+ C
+ C Generates random deviate from the distribution of a chisquare
+ C with DF degrees of freedom random variable.
+ C
+ C
+ C Arguments
+ C
+ C
+ C DF --> Degrees of freedom of the chisquare
+ C (Must be positive)
+ C REAL DF
+ C
+ C
+ C Method
+ C
+ C
+ C Uses relation between chisquare and gamma.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENEXP( AV )
+ C
+ C GENerate EXPonential random deviate
+ C
+ C
+ C Function
+ C
+ C
+ C Generates a single random deviate from an exponential
+ C distribution with mean AV.
+ C
+ C
+ C Arguments
+ C
+ C
+ C AV --> The mean of the exponential distribution from which
+ C a random deviate is to be generated.
+ C REAL AV
+ C (AV >= 0)
+ C
+ C GENEXP <-- The random deviate.
+ C REAL GENEXP
+ C
+ C
+ C Method
+ C
+ C
+ C Renames SEXPO from TOMS as slightly modified by BWB to use RANF
+ C instead of SUNIF.
+ C
+ C For details see:
+ C
+ C Ahrens, J.H. and Dieter, U.
+ C Computer Methods for Sampling From the
+ C Exponential and Normal Distributions.
+ C Comm. ACM, 15,10 (Oct. 1972), 873 - 882.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENF( DFN, DFD )
+ C GENerate random deviate from the F distribution
+ C
+ C
+ C Function
+ C
+ C
+ C Generates a random deviate from the F (variance ratio)
+ C distribution with DFN degrees of freedom in the numerator
+ C and DFD degrees of freedom in the denominator.
+ C
+ C
+ C Arguments
+ C
+ C
+ C DFN --> Numerator degrees of freedom
+ C (Must be positive)
+ C REAL DFN
+ C DFD --> Denominator degrees of freedom
+ C (Must be positive)
+ C REAL DFD
+ C
+ C
+ C Method
+ C
+ C
+ C Directly generates ratio of chisquare variates
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENGAM( A, R )
+ C GENerates random deviates from GAMma distribution
+ C
+ C
+ C Function
+ C
+ C
+ C Generates random deviates from the gamma distribution whose
+ C density is
+ C (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X)
+ C
+ C
+ C Arguments
+ C
+ C
+ C A --> Location parameter of Gamma distribution
+ C REAL A ( A > 0 )
+ C
+ C R --> Shape parameter of Gamma distribution
+ C REAL R ( R > 0 )
+ C
+ C
+ C Method
+ C
+ C
+ C Renames SGAMMA from TOMS as slightly modified by BWB to use RANF
+ C instead of SUNIF.
+ C
+ C For details see:
+ C (Case R >= 1.0)
+ C Ahrens, J.H. and Dieter, U.
+ C Generating Gamma Variates by a
+ C Modified Rejection Technique.
+ C Comm. ACM, 25,1 (Jan. 1982), 47 - 54.
+ C Algorithm GD
+ C
+ C (Case 0.0 < R < 1.0)
+ C Ahrens, J.H. and Dieter, U.
+ C Computer Methods for Sampling from Gamma,
+ C Beta, Poisson and Binomial Distributions.
+ C Computing, 12 (1974), 223-246/
+ C Adapted algorithm GS.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE GENMN(PARM,X,WORK)
+ C GENerate Multivariate Normal random deviate
+ C
+ C
+ C Arguments
+ C
+ C
+ C PARM --> Parameters needed to generate multivariate normal
+ C deviates (MEANV and Cholesky decomposition of
+ C COVM). Set by a previous call to SETGMN.
+ C
+ C 1 : 1 - size of deviate, P
+ C 2 : P + 1 - mean vector
+ C P+2 : P*(P+3)/2 + 1 - upper half of cholesky
+ C decomposition of cov matrix
+ C REAL PARM(*)
+ C
+ C X <-- Vector deviate generated.
+ C REAL X(P)
+ C
+ C WORK <--> Scratch array
+ C REAL WORK(P)
+ C
+ C
+ C Method
+ C
+ C
+ C 1) Generate P independent standard normal deviates - Ei ~ N(0,1)
+ C
+ C 2) SETGMN uses Cholesky decomposition find A s.t. trans(A)*A = COV
+ C
+ C 3) Generate trans(A)*E + MEANV ~ N(MEANV,COVM)
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE GENMUL( N, P, NCAT, IX )
+ C GENerate an observation from the MULtinomial distribution
+ C
+ C
+ C Arguments
+ C
+ C
+ C N --> Number of events that will be classified into one of
+ C the categories 1..NCAT
+ C INTEGER N
+ C (N >= 0)
+ C
+ C P --> Vector of probabilities. P(i) is the probability that
+ C an event will be classified into category i. Thus, P(i)
+ C must be [0,1]. Only the first NCAT-1 P(i) must be defined
+ C since P(NCAT) is 1.0 minus the sum of the first
+ C NCAT-1 P(i).
+ C REAL P(NCAT-1)
+ C
+ C NCAT --> Number of categories. Length of P and IX.
+ C INTEGER NCAT
+ C (NCAT > 1)
+ C
+ C IX <-- Observation from multinomial distribution. All IX(i)
+ C will be nonnegative and their sum will be N.
+ C INTEGER IX(NCAT)
+ C
+ C
+ C Method
+ C
+ C
+ C Algorithm from page 559 of
+ C
+ C Devroye, Luc
+ C
+ C Non-Uniform Random Variate Generation. Springer-Verlag,
+ C New York, 1986.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENNCH( DF, XNONC )
+ C Generate random value of Noncentral CHIsquare variable
+ C
+ C
+ C Function
+ C
+ C
+ C
+ C Generates random deviate from the distribution of a noncentral
+ C chisquare with DF degrees of freedom and noncentrality parameter
+ C XNONC.
+ C
+ C
+ C Arguments
+ C
+ C
+ C DF --> Degrees of freedom of the chisquare
+ C (Must be >= 1.0)
+ C REAL DF
+ C
+ C XNONC --> Noncentrality parameter of the chisquare
+ C (Must be >= 0.0)
+ C REAL XNONC
+ C
+ C
+ C Method
+ C
+ C
+ C Uses fact that noncentral chisquare is the sum of a chisquare
+ C deviate with DF-1 degrees of freedom plus the square of a normal
+ C deviate with mean XNONC and standard deviation 1.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENNF( DFN, DFD, XNONC )
+ C GENerate random deviate from the Noncentral F distribution
+ C
+ C
+ C Function
+ C
+ C
+ C Generates a random deviate from the noncentral F (variance ratio)
+ C distribution with DFN degrees of freedom in the numerator, and DFD
+ C degrees of freedom in the denominator, and noncentrality parameter
+ C XNONC.
+ C
+ C
+ C Arguments
+ C
+ C
+ C DFN --> Numerator degrees of freedom
+ C (Must be >= 1.0)
+ C REAL DFN
+ C DFD --> Denominator degrees of freedom
+ C (Must be positive)
+ C REAL DFD
+ C
+ C XNONC --> Noncentrality parameter
+ C (Must be nonnegative)
+ C REAL XNONC
+ C
+ C
+ C Method
+ C
+ C
+ C Directly generates ratio of noncentral numerator chisquare variate
+ C to central denominator chisquare variate.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENNOR( AV, SD )
+ C
+ C GENerate random deviate from a NORmal distribution
+ C
+ C
+ C Function
+ C
+ C
+ C Generates a single random deviate from a normal distribution
+ C with mean, AV, and standard deviation, SD.
+ C
+ C
+ C Arguments
+ C
+ C
+ C AV --> Mean of the normal distribution.
+ C REAL AV
+ C
+ C SD --> Standard deviation of the normal distribution.
+ C REAL SD
+ C (SD >= 0)
+ C
+ C GENNOR <-- Generated normal deviate.
+ C REAL GENNOR
+ C
+ C
+ C Method
+ C
+ C
+ C Renames SNORM from TOMS as slightly modified by BWB to use RANF
+ C instead of SUNIF.
+ C
+ C For details see:
+ C Ahrens, J.H. and Dieter, U.
+ C Extensions of Forsythe's Method for Random
+ C Sampling from the Normal Distribution.
+ C Math. Comput., 27,124 (Oct. 1973), 927 - 937.
+ C
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE GENPRM( IARRAY, LARRAY )
+ C GENerate random PeRMutation of iarray
+ C
+ C
+ C Arguments
+ C
+ C
+ C IARRAY <--> On output IARRAY is a random permutation of its
+ C value on input
+ C INTEGER IARRAY( LARRAY )
+ C
+ C LARRAY <--> Length of IARRAY
+ C INTEGER LARRAY
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION GENUNF( LOW, HIGH )
+ C
+ C GeNerate Uniform Real between LOW and HIGH
+ C
+ C
+ C Function
+ C
+ C
+ C Generates a real uniformly distributed between LOW and HIGH.
+ C
+ C
+ C Arguments
+ C
+ C
+ C LOW --> Low bound (exclusive) on real value to be generated
+ C REAL LOW
+ C
+ C HIGH --> High bound (exclusive) on real value to be generated
+ C REAL HIGH
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE GETCGN(G)
+ C Get GeNerator
+ C
+ C Returns in G the number of the current random number generator
+ C
+ C
+ C Arguments
+ C
+ C
+ C G <-- Number of the current random number generator (1..32)
+ C INTEGER G
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE GETSD(ISEED1,ISEED2)
+ C GET SeeD
+ C
+ C Returns the value of two integer seeds of the current generator
+ C
+ C This is a transcription from Pascal to Fortran of routine
+ C Get_State from the paper
+ C
+ C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
+ C with Splitting Facilities." ACM Transactions on Mathematical
+ C Software, 17:98-111 (1991)
+ C
+ C
+ C Arguments
+ C
+ C
+ C
+ C ISEED1 <- First integer seed of generator G
+ C INTEGER ISEED1
+ C
+ C ISEED2 <- Second integer seed of generator G
+ C INTEGER ISEED1
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNBIN( N, P )
+ C
+ C GENerate BINomial random deviate
+ C
+ C
+ C Function
+ C
+ C
+ C Generates a single random deviate from a binomial
+ C distribution whose number of trials is N and whose
+ C probability of an event in each trial is P.
+ C
+ C
+ C Arguments
+ C
+ C
+ C N --> The number of trials in the binomial distribution
+ C from which a random deviate is to be generated.
+ C INTEGER N
+ C (N >= 0)
+ C
+ C P --> The probability of an event in each trial of the
+ C binomial distribution from which a random deviate
+ C is to be generated.
+ C REAL P
+ C (0.0 <= P <= 1.0)
+ C
+ C IGNBIN <-- A random deviate yielding the number of events
+ C from N independent trials, each of which has
+ C a probability of event P.
+ C INTEGER IGNBIN
+ C
+ C
+ C Note
+ C
+ C
+ C Uses RANF so the value of the seeds, ISEED1 and ISEED2 must be set
+ C by a call similar to the following
+ C DUM = RANSET( ISEED1, ISEED2 )
+ C
+ C
+ C Method
+ C
+ C
+ C This is algorithm BTPE from:
+ C
+ C Kachitvichyanukul, V. and Schmeiser, B. W.
+ C
+ C Binomial Random Variate Generation.
+ C Communications of the ACM, 31, 2
+ C (February, 1988) 216.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNNBN( N, P )
+ C
+ C GENerate Negative BiNomial random deviate
+ C
+ C
+ C Function
+ C
+ C
+ C Generates a single random deviate from a negative binomial
+ C distribution.
+ C
+ C
+ C Arguments
+ C
+ C
+ C N --> Required number of events.
+ C INTEGER N
+ C (N > 0)
+ C
+ C P --> The probability of an event during a Bernoulli trial.
+ C REAL P
+ C (0.0 < P < 1.0)
+ C
+ C
+ C
+ C Method
+ C
+ C
+ C Algorithm from page 480 of
+ C
+ C Devroye, Luc
+ C
+ C Non-Uniform Random Variate Generation. Springer-Verlag,
+ C New York, 1986.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNLGI()
+ C GeNerate LarGe Integer
+ C
+ C Returns a random integer following a uniform distribution over
+ C (1, 2147483562) using the current generator.
+ C
+ C This is a transcription from Pascal to Fortran of routine
+ C Random from the paper
+ C
+ C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
+ C with Splitting Facilities." ACM Transactions on Mathematical
+ C Software, 17:98-111 (1991)
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNPOI( MU )
+ C
+ C GENerate POIsson random deviate
+ C
+ C
+ C Function
+ C
+ C
+ C Generates a single random deviate from a Poisson
+ C distribution with mean MU.
+ C
+ C
+ C Arguments
+ C
+ C
+ C MU --> The mean of the Poisson distribution from which
+ C a random deviate is to be generated.
+ C REAL MU
+ C (MU >= 0.0)
+ C
+ C IGNPOI <-- The random deviate.
+ C REAL IGNPOI (non-negative)
+ C
+ C
+ C Method
+ C
+ C
+ C Renames KPOIS from TOMS as slightly modified by BWB to use RANF
+ C instead of SUNIF.
+ C
+ C For details see:
+ C
+ C Ahrens, J.H. and Dieter, U.
+ C Computer Generation of Poisson Deviates
+ C From Modified Normal Distributions.
+ C ACM Trans. Math. Software, 8, 2
+ C (June 1982),163-179
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION IGNUIN( LOW, HIGH )
+ C
+ C GeNerate Uniform INteger
+ C
+ C
+ C Function
+ C
+ C
+ C Generates an integer uniformly distributed between LOW and HIGH.
+ C
+ C
+ C Arguments
+ C
+ C
+ C LOW --> Low bound (inclusive) on integer value to be generated
+ C INTEGER LOW
+ C
+ C HIGH --> High bound (inclusive) on integer value to be generated
+ C INTEGER HIGH
+ C
+ C
+ C Note
+ C
+ C
+ C If (HIGH-LOW) > 2,147,483,561 prints error message on * unit and
+ C stops the program.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE INITGN(ISDTYP)
+ C INIT-ialize current G-e-N-erator
+ C
+ C Reinitializes the state of the current generator
+ C ISDTYP = -1 => sets the state to its initial seed
+ C ISDTYP = 0 => sets the state to its last (previous) seed
+ C ISDTYP = 1 => sets the state to a new seed 2^w values
+ C from its last seed
+ C
+ C This is a transcription from Pascal to Fortran of routine
+ C Init_Generator from the paper
+ C
+ C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
+ C with Splitting Facilities." ACM Transactions on Mathematical
+ C Software, 17:98-111 (1991)
+ C
+ C
+ C Arguments
+ C
+ C
+ C ISDTYP -> The state to which the generator is to be set
+ C
+ C INTEGER ISDTYP
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE INRGCM()
+ C INitialize Random number Generator CoMmon
+ C
+ C
+ C Function
+ C
+ C
+ C Initializes common area for random number generator. This saves
+ C the nuisance of a BLOCK DATA routine and the difficulty of
+ C assuring that the routine is loaded with the other routines.
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C INTEGER FUNCTION MLTMOD(A,S,M)
+ C
+ C Returns (A*S) MOD M
+ C
+ C This is a transcription from Pascal to Fortran of routine
+ C MULtMod_Decompos from the paper
+ C
+ C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
+ C with Splitting Facilities." ACM Transactions on Mathematical
+ C Software, 17:98-111 (1991)
+ C
+ C
+ C Arguments
+ C
+ C
+ C A, S, M -->
+ C INTEGER A,S,M
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE PHRTSD( PHRASE, SEED1, SEED2 )
+ C PHRase To SeeDs
+ C
+ C
+ C Function
+ C
+ C
+ C Uses a phrase (character string) to generate two seeds for the RGN
+ C random number generator.
+ C
+ C
+ C Arguments
+ C
+ C
+ C PHRASE --> Phrase to be used for random number generation
+ C CHARACTER*(*) PHRASE
+ C
+ C SEED1 <-- First seed for RGN generator
+ C INTEGER SEED1
+ C
+ C SEED2 <-- Second seed for RGN generator
+ C INTEGER SEED2
+ C
+ C
+ C Note
+ C
+ C
+ C Trailing blanks are eliminated before the seeds are generated.
+ C
+ C Generated seed values will fall in the range 1..2^30
+ C (1..1,073,741,824)
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C REAL FUNCTION RANF()
+ C RANDom number generator as a Function
+ C
+ C Returns a random floating point number from a uniform distribution
+ C over 0 - 1 (endpoints of this interval are not returned) using the
+ C current generator
+ C
+ C This is a transcription from Pascal to Fortran of routine
+ C Uniform_01 from the paper
+ C
+ C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
+ C with Splitting Facilities." ACM Transactions on Mathematical
+ C Software, 17:98-111 (1991)
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE SETALL(ISEED1,ISEED2)
+ C SET ALL random number generators
+ C
+ C Sets the initial seed of generator 1 to ISEED1 and ISEED2. The
+ C initial seeds of the other generators are set accordingly, and
+ C all generators states are set to these seeds.
+ C
+ C This is a transcription from Pascal to Fortran of routine
+ C Set_Initial_Seed from the paper
+ C
+ C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
+ C with Splitting Facilities." ACM Transactions on Mathematical
+ C Software, 17:98-111 (1991)
+ C
+ C
+ C Arguments
+ C
+ C
+ C ISEED1 -> First of two integer seeds
+ C INTEGER ISEED1
+ C
+ C ISEED2 -> Second of two integer seeds
+ C INTEGER ISEED1
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE SETANT(QVALUE)
+ C SET ANTithetic
+ C
+ C Sets whether the current generator produces antithetic values. If
+ C X is the value normally returned from a uniform [0,1] random
+ C number generator then 1 - X is the antithetic value. If X is the
+ C value normally returned from a uniform [0,N] random number
+ C generator then N - 1 - X is the antithetic value.
+ C
+ C All generators are initialized to NOT generate antithetic values.
+ C
+ C This is a transcription from Pascal to Fortran of routine
+ C Set_Antithetic from the paper
+ C
+ C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
+ C with Splitting Facilities." ACM Transactions on Mathematical
+ C Software, 17:98-111 (1991)
+ C
+ C
+ C Arguments
+ C
+ C
+ C QVALUE -> .TRUE. if generator G is to generating antithetic
+ C values, otherwise .FALSE.
+ C LOGICAL QVALUE
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE SETCGN( G )
+ C Set GeNerator
+ C
+ C Sets the current generator to G. All references to a generato
+ C are to the current generator.
+ C
+ C
+ C Arguments
+ C
+ C
+ C G --> Number of the current random number generator (1..32)
+ C INTEGER G
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE SETGMN( MEANV, COVM, LDCOVM, P, PARM)
+ C SET Generate Multivariate Normal random deviate
+ C
+ C
+ C Function
+ C
+ C
+ C Places P, MEANV, and the Cholesky factoriztion of COVM
+ C in PARM for GENMN.
+ C
+ C
+ C Arguments
+ C
+ C
+ C MEANV --> Mean vector of multivariate normal distribution.
+ C REAL MEANV(P)
+ C
+ C COVM <--> (Input) Covariance matrix of the multivariate
+ C normal distribution. This routine uses only the
+ C (1:P,1:P) slice of COVM, but needs to know LDCOVM.
+ C
+ C (Output) Destroyed on output
+ C REAL COVM(LDCOVM,P)
+ C
+ C LDCOVM --> Leading actual dimension of COVM.
+ C INTEGER LDCOVM
+ C
+ C P --> Dimension of the normal, or length of MEANV.
+ C INTEGER P
+ C
+ C PARM <-- Array of parameters needed to generate multivariate
+ C normal deviates (P, MEANV and Cholesky decomposition
+ C of COVM).
+ C 1 : 1 - P
+ C 2 : P + 1 - MEANV
+ C P+2 : P*(P+3)/2 + 1 - Cholesky decomposition of COVM
+ C REAL PARM(P*(P+3)/2 + 1)
+ C
+ C**********************************************************************
+ C**********************************************************************
+ C
+ C SUBROUTINE SETSD(ISEED1,ISEED2)
+ C SET S-ee-D of current generator
+ C
+ C Resets the initial seed and state of generator g to ISEED1 and
+ C ISEED2. The seeds and states of the other generators remain
+ C unchanged.
+ C
+ C This is a transcription from Pascal to Fortran of routine
+ C Set_Seed from the paper
+ C
+ C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
+ C with Splitting Facilities." ACM Transactions on Mathematical
+ C Software, 17:98-111 (1991)
+ C
+ C
+ C Arguments
+ C
+ C
+ C ISEED1 -> First integer seed
+ C INTEGER ISEED1
+ C
+ C ISEED2 -> Second integer seed
+ C INTEGER ISEED1
+ C
+ C**********************************************************************
diff -cNr octave-2.0.13/libcruft/ranlib/ranlib.chs octave-2.0.14/libcruft/ranlib/ranlib.chs
*** octave-2.0.13/libcruft/ranlib/ranlib.chs Thu Jul 18 20:45:46 1996
--- octave-2.0.14/libcruft/ranlib/ranlib.chs Wed Dec 31 18:00:00 1969
***************
*** 1,336 ****
- SUMMARY OF ROUTINES IN RANLIB
-
- 0. Base Level Routines to Set and Obtain Values of Seeds
-
- (These should be the only base level routines used by those who don't
- need multiple generators with blocks of numbers.)
-
- C**********************************************************************
- C
- C SUBROUTINE SETALL(ISEED1,ISEED2)
- C SET ALL random number generators
- C INTEGER ISEED1, ISEED2
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE GETSD(ISEED1,ISEED2)
- C GET SeeD
- C INTEGER ISEED1, ISEED2
- C
- C Returns the value of two integer seeds of the current generator
- C in ISEED1, ISEED2
- C
- C**********************************************************************
-
- I. Higher Level Routines
-
- C**********************************************************************
- C
- C REAL FUNCTION GENBET( A, B )
- C GeNerate BETa random deviate
- C REAL A,B
- C
- C Returns a single random deviate from the beta distribution with
- C parameters A and B. The density of the beta is
- C x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x < 1
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENCHI( DF )
- C Generate random value of CHIsquare variable
- C REAL DF
- C
- C Generates random deviate from the distribution of a chisquare
- C with DF degrees of freedom random variable.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENEXP( AV )
- C GENerate EXPonential random deviate
- C REAL AV
- C
- C Generates a single random deviate from an exponential
- C distribution with mean AV.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENF( DFN, DFD )
- C GENerate random deviate from the F distribution
- C REAL DFN, DFD
- C
- C Generates a random deviate from the F (variance ratio)
- C distribution with DFN degrees of freedom in the numerator
- C and DFD degrees of freedom in the denominator.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENGAM( A, R )
- C GENerates random deviates from GAMma distribution
- C REAL A, R
- C
- C Generates random deviates from the gamma distribution whose
- C density is
- C (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X)
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE GENMN(PARM,X,WORK)
- C GENerate Multivariate Normal random deviate
- C REAL PARM(*), X(*), WORK(*)
- C
- C PARM is set by SETGMN which must be called prior to GENMN. The
- C generated deviates are placed in X. WORK is a work array of the
- C same size as X.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENNCH( DF, XNONC )
- C Generate random value of Noncentral CHIsquare variable
- C REAL DF, XNONC
- C
- C Generates random deviate from the distribution of a noncentral
- C chisquare with DF degrees of freedom and noncentrality parameter
- C XNONC.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENNF( DFN, DFD, XNONC )
- C GENerate random deviate from the Noncentral F distribution
- C REAL DFN, DFD, XNONC
- C
- C Generates a random deviate from the noncentral F (variance ratio)
- C distribution with DFN degrees of freedom in the numerator, and DFD
- C degrees of freedom in the denominator, and noncentrality parameter
- C XNONC.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENNOR( AV, SD )
- C GENerate random deviate from a NORmal distribution
- C REAL AV, SD
- C
- C Generates a single random deviate from a normal distribution
- C with mean, AV, and standard deviation, SD.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE GENPRM( IARRAY, LARRAY )
- C GENerate random PeRMutation of iarray
- C INTEGER IARRAY(LARRAY), LARRAY
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENUNF( LOW, HIGH )
- C GeNerate Uniform Real between LOW and HIGH
- C REAL LOW, HIGH
- C
- C**********************************************************************
- C**********************************************************************
- C
- C INTEGER FUNCTION IGNBIN( N, P )
- C GENerate BINomial random deviate
- C INTEGER N
- C REAL P
- C
- C Returns a single random deviate from a binomial
- C distribution whose number of trials is N and whose
- C probability of an event in each trial is P.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C INTEGER FUNCTION IGNPOI( AV )
- C GENerate POIsson random deviate
- C REAL AV
- C
- C Generates a single random deviate from a Poisson
- C distribution with mean AV.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C INTEGER FUNCTION IGNUIN( LOW, HIGH )
- C GeNerate Uniform INteger
- C INTEGER LOW, HIGH
- C
- C Generates an integer uniformly distributed between LOW and HIGH.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE PHRTSD( PHRASE, SEED1, SEED2 )
- C PHRase To SeeDs
- C CHARACTER*(*) PHRASE
- C INTEGER SEED1, SEED2
- C
- C Uses a phrase (character string) to generate two seeds for the RGN
- C random number generator.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION RANF()
- C RANDom number generator as a Function
- C
- C Returns a random floating point number from a uniform distribution
- C over 0 - 1 (endpoints of this interval are not returned) using the
- C current generator
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE SETGMN( MEANV, COVM, P, PARM)
- C SET Generate Multivariate Normal random deviate
- C INTEGER P
- C REAL MEANV(P), COVM(P,P), PARM(P*(P+3)/2 + 1)
- C
- C P is the length of normal vectors to be generated, MEANV
- C is the vector of their means and COVM is their variance
- C covariance matrix. Places information necessary to generate
- C the deviates in PARM.
- C
- C**********************************************************************
-
- II. Uniform Generator and Associated Routines
-
-
- A. SETTING THE SEED OF ALL GENERATORS
-
- C**********************************************************************
- C
- C SUBROUTINE SETALL(ISEED1,ISEED2)
- C SET ALL random number generators
- C INTEGER ISEED1, ISEED2
- C
- C**********************************************************************
-
- B. OBTAINING RANDOM NUMBERS
-
- C**********************************************************************
- C
- C INTEGER FUNCTION IGNLGI()
- C GeNerate LarGe Integer
- C
- C Returns a random integer following a uniform distribution over
- C (1, 2147483562) using the current generator.
- C
- C**********************************************************************
-
- C**********************************************************************
- C
- C REAL FUNCTION RANF()
- C RANDom number generator as a Function
- C
- C Returns a random floating point number from a uniform distribution
- C over 0 - 1 (endpoints of this interval are not returned) using the
- C current generator
- C
- C**********************************************************************
-
- C. SETTING AND OBTAINING THE NUMBER OF THE CURRENT GENERATOR
-
- C**********************************************************************
- C
- C SUBROUTINE SETCGN( G )
- C Set GeNerator
- C INTEGER G
- C
- C Sets the current generator to G. All references to a generator
- C are to the current generator.
- C
- C**********************************************************************
-
- C**********************************************************************
- C
- C SUBROUTINE GETCGN(G)
- C GET Current GeNerator
- C INTEGER G
- C
- C Returns in G the number of the current random number generator
- C
- C**********************************************************************
-
- D. OBTAINING OR CHANGING SEEDS IN CURRENT GENERATOR
-
- C**********************************************************************
- C
- C SUBROUTINE ADVNST(K)
- C ADV-a-N-ce ST-ate
- C INTEGER K
- C
- C Advances the state of the current generator by 2^K values and
- C resets the initial seed to that value.
- C
- C**********************************************************************
-
- C**********************************************************************
- C
- C SUBROUTINE GETSD(ISEED1,ISEED2)
- C GET SeeD
- C INTEGER ISEED1, ISEED2
- C
- C Returns the value of two integer seeds of the current generator
- C in ISEED1, ISEED2
- C
- C**********************************************************************
-
- C**********************************************************************
- C
- C SUBROUTINE INITGN(ISDTYP)
- C INIT-ialize current G-e-N-erator
- C
- C INTEGER ISDTYP The state to which the generator is to be set
- C ISDTYP = -1 => sets the seeds to their initial value
- C ISDTYP = 0 => sets the seeds to the first value of
- C the current block
- C ISDTYP = 1 => sets the seeds to the first value of
- C the next block
- C
- C**********************************************************************
-
- C**********************************************************************
- C
- C SUBROUTINE SETSD(ISEED1,ISEED2)
- C SET S-ee-D of current generator
- C
- C Resets the initial seed of the current generator to ISEED1 and
- C ISEED2. The seeds of the other generators remain unchanged.
- C
- C**********************************************************************
-
- E. MISCELLANY
-
- C**********************************************************************
- C
- C INTEGER FUNCTION MLTMOD(A,S,M)
- C Returns (A*S) MOD M
- C INTEGER A, S, M
- C
- C**********************************************************************
-
- C**********************************************************************
- C
- C SUBROUTINE SETANT(QVALUE)
- C SET ANTithetic
- C LOGICAL QVALUE
- C
- C Sets whether the current generator produces antithetic values. If
- C X is the value normally returned from a uniform [0,1] random
- C number generator then 1 - X is the antithetic value. If X is the
- C value normally returned from a uniform [0,N] random number
- C generator then N - 1 - X is the antithetic value.
- C
- C All generators are initialized to NOT generate antithetic values.
- C
- C**********************************************************************
--- 0 ----
diff -cNr octave-2.0.13/libcruft/ranlib/ranlib.fdoc octave-2.0.14/libcruft/ranlib/ranlib.fdoc
*** octave-2.0.13/libcruft/ranlib/ranlib.fdoc Thu Jul 18 20:45:46 1996
--- octave-2.0.14/libcruft/ranlib/ranlib.fdoc Wed Dec 31 18:00:00 1969
***************
*** 1,870 ****
-
-
-
-
-
-
-
-
-
-
-
- RANLIB
-
- Library of Fortran Routines for Random Number Generation
-
-
-
-
-
-
-
-
- Full Documentation of Each Routine
-
-
-
-
-
-
-
-
- Compiled and Written by:
-
- Barry W. Brown
- James Lovato
-
-
-
-
-
-
-
-
-
-
- Department of Biomathematics, Box 237
- The University of Texas, M.D. Anderson Cancer Center
- 1515 Holcombe Boulevard
- Houston, TX 77030
-
-
- This work was supported by grant CA-16672 from the National Cancer Institute.
-
- C**********************************************************************
- C
- C SUBROUTINE ADVNST(K)
- C ADV-a-N-ce ST-ate
- C
- C Advances the state of the current generator by 2^K values and
- C resets the initial seed to that value.
- C
- C This is a transcription from Pascal to Fortran of routine
- C Advance_State from the paper
- C
- C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
- C with Splitting Facilities." ACM Transactions on Mathematical
- C Software, 17:98-111 (1991)
- C
- C
- C Arguments
- C
- C
- C K -> The generator is advanced by2^K values
- C INTEGER K
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENBET( A, B )
- C GeNerate BETa random deviate
- C
- C
- C Function
- C
- C
- C Returns a single random deviate from the beta distribution with
- C parameters A and B. The density of the beta is
- C x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x < 1
- C
- C
- C Arguments
- C
- C
- C A --> First parameter of the beta distribution
- C REAL A
- C
- C B --> Second parameter of the beta distribution
- C REAL B
- C
- C
- C Method
- C
- C
- C R. C. H. Cheng
- C Generating Beta Variables with Nonintegral Shape Parameters
- C Communications of the ACM, 21:317-322 (1978)
- C (Algorithms BB and BC)
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENCHI( DF )
- C Generate random value of CHIsquare variable
- C
- C
- C Function
- C
- C
- C Generates random deviate from the distribution of a chisquare
- C with DF degrees of freedom random variable.
- C
- C
- C Arguments
- C
- C
- C DF --> Degrees of freedom of the chisquare
- C (Must be positive)
- C REAL DF
- C
- C
- C Method
- C
- C
- C Uses relation between chisquare and gamma.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENEXP( AV )
- C
- C GENerate EXPonential random deviate
- C
- C
- C Function
- C
- C
- C Generates a single random deviate from an exponential
- C distribution with mean AV.
- C
- C
- C Arguments
- C
- C
- C AV --> The mean of the exponential distribution from which
- C a random deviate is to be generated.
- C REAL AV
- C
- C GENEXP <-- The random deviate.
- C REAL GENEXP
- C
- C
- C Method
- C
- C
- C Renames SEXPO from TOMS as slightly modified by BWB to use RANF
- C instead of SUNIF.
- C
- C For details see:
- C
- C Ahrens, J.H. and Dieter, U.
- C Computer Methods for Sampling From the
- C Exponential and Normal Distributions.
- C Comm. ACM, 15,10 (Oct. 1972), 873 - 882.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENF( DFN, DFD )
- C GENerate random deviate from the F distribution
- C
- C
- C Function
- C
- C
- C Generates a random deviate from the F (variance ratio)
- C distribution with DFN degrees of freedom in the numerator
- C and DFD degrees of freedom in the denominator.
- C
- C
- C Arguments
- C
- C
- C DFN --> Numerator degrees of freedom
- C (Must be positive)
- C REAL DFN
- C DFD --> Denominator degrees of freedom
- C (Must be positive)
- C REAL DFD
- C
- C
- C Method
- C
- C
- C Directly generates ratio of chisquare variates
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENGAM( A, R )
- C GENerates random deviates from GAMma distribution
- C
- C
- C Function
- C
- C
- C Generates random deviates from the gamma distribution whose
- C density is
- C (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X)
- C
- C
- C Arguments
- C
- C
- C A --> Location parameter of Gamma distribution
- C REAL A
- C
- C R --> Shape parameter of Gamma distribution
- C REAL R
- C
- C
- C Method
- C
- C
- C Renames SGAMMA from TOMS as slightly modified by BWB to use RANF
- C instead of SUNIF.
- C
- C For details see:
- C (Case R >= 1.0)
- C Ahrens, J.H. and Dieter, U.
- C Generating Gamma Variates by a
- C Modified Rejection Technique.
- C Comm. ACM, 25,1 (Jan. 1982), 47 - 54.
- C Algorithm GD
- C
- C (Case 0.0 <= R <= 1.0)
- C Ahrens, J.H. and Dieter, U.
- C Computer Methods for Sampling from Gamma,
- C Beta, Poisson and Binomial Distributions.
- C Computing, 12 (1974), 223-246/
- C Adapted algorithm GS.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE GENMN(PARM,X,WORK)
- C GENerate Multivariate Normal random deviate
- C
- C
- C Arguments
- C
- C
- C PARM --> Parameters needed to generate multivariate normal
- C deviates (MEANV and Cholesky decomposition of
- C COVM). Set by a previous call to SETGMN.
- C
- C 1 : 1 - size of deviate, P
- C 2 : P + 1 - mean vector
- C P+2 : P*(P+3)/2 + 1 - upper half of cholesky
- C decomposition of cov matrix
- C REAL PARM(*)
- C
- C X <-- Vector deviate generated.
- C REAL X(P)
- C
- C WORK <--> Scratch array
- C REAL WORK(P)
- C
- C
- C Method
- C
- C
- C 1) Generate P independent standard normal deviates - Ei ~ N(0,1)
- C
- C 2) SETGMN uses Cholesky decomposition find A s.t. trans(A)*A = COV
- C
- C 3) Generate trans(A)*E + MEANV ~ N(MEANV,COVM)
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENNCH( DF, XNONC )
- C Generate random value of Noncentral CHIsquare variable
- C
- C
- C Function
- C
- C
-
- C Generates random deviate from the distribution of a noncentral
- C chisquare with DF degrees of freedom and noncentrality parameter
- C XNONC.
- C
- C
- C Arguments
- C
- C
- C DF --> Degrees of freedom of the chisquare
- C (Must be > 1.0)
- C REAL DF
- C
- C XNONC --> Noncentrality parameter of the chisquare
- C (Must be >= 0.0)
- C REAL XNONC
- C
- C
- C Method
- C
- C
- C Uses fact that noncentral chisquare is the sum of a chisquare
- C deviate with DF-1 degrees of freedom plus the square of a normal
- C deviate with mean XNONC and standard deviation 1.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENNF( DFN, DFD, XNONC )
- C GENerate random deviate from the Noncentral F distribution
- C
- C
- C Function
- C
- C
- C Generates a random deviate from the noncentral F (variance ratio)
- C distribution with DFN degrees of freedom in the numerator, and DFD
- C degrees of freedom in the denominator, and noncentrality parameter
- C XNONC.
- C
- C
- C Arguments
- C
- C
- C DFN --> Numerator degrees of freedom
- C (Must be >= 1.0)
- C REAL DFN
- C DFD --> Denominator degrees of freedom
- C (Must be positive)
- C REAL DFD
- C
- C XNONC --> Noncentrality parameter
- C (Must be nonnegative)
- C REAL XNONC
- C
- C
- C Method
- C
- C
- C Directly generates ratio of noncentral numerator chisquare variate
- C to central denominator chisquare variate.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENNOR( AV, SD )
- C
- C GENerate random deviate from a NORmal distribution
- C
- C
- C Function
- C
- C
- C Generates a single random deviate from a normal distribution
- C with mean, AV, and standard deviation, SD.
- C
- C
- C Arguments
- C
- C
- C AV --> Mean of the normal distribution.
- C REAL AV
- C
- C SD --> Standard deviation of the normal distribution.
- C REAL SD
- C
- C GENNOR <-- Generated normal deviate.
- C REAL GENNOR
- C
- C
- C Method
- C
- C
- C Renames SNORM from TOMS as slightly modified by BWB to use RANF
- C instead of SUNIF.
- C
- C For details see:
- C Ahrens, J.H. and Dieter, U.
- C Extensions of Forsythe's Method for Random
- C Sampling from the Normal Distribution.
- C Math. Comput., 27,124 (Oct. 1973), 927 - 937.
- C
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE GENPRM( IARRAY, LARRAY )
- C GENerate random PeRMutation of iarray
- C
- C
- C Arguments
- C
- C
- C IARRAY <--> On output IARRAY is a random permutation of its
- C value on input
- C INTEGER IARRAY( LARRAY )
- C
- C LARRAY <--> Length of IARRAY
- C INTEGER LARRAY
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION GENUNF( LOW, HIGH )
- C
- C GeNerate Uniform Real between LOW and HIGH
- C
- C
- C Function
- C
- C
- C Generates a real uniformly distributed between LOW and HIGH.
- C
- C
- C Arguments
- C
- C
- C LOW --> Low bound (exclusive) on real value to be generated
- C REAL LOW
- C
- C HIGH --> High bound (exclusive) on real value to be generated
- C REAL HIGH
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE GETCGN(G)
- C Get GeNerator
- C
- C Returns in G the number of the current random number generator
- C
- C
- C Arguments
- C
- C
- C G <-- Number of the current random number generator (1..32)
- C INTEGER G
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE GETSD(ISEED1,ISEED2)
- C GET SeeD
- C
- C Returns the value of two integer seeds of the current generator
- C
- C This is a transcription from Pascal to Fortran of routine
- C Get_State from the paper
- C
- C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
- C with Splitting Facilities." ACM Transactions on Mathematical
- C Software, 17:98-111 (1991)
- C
- C
- C Arguments
- C
- C
- C
- C ISEED1 <- First integer seed of generator G
- C INTEGER ISEED1
- C
- C ISEED2 <- Second integer seed of generator G
- C INTEGER ISEED1
- C
- C**********************************************************************
- C**********************************************************************
- C
- C INTEGER FUNCTION IGNBIN( N, P )
- C
- C GENerate BINomial random deviate
- C
- C
- C Function
- C
- C
- C Generates a single random deviate from a binomial
- C distribution whose number of trials is N and whose
- C probability of an event in each trial is P.
- C
- C
- C Arguments
- C
- C
- C N --> The number of trials in the binomial distribution
- C from which a random deviate is to be generated.
- C INTEGER N
- C
- C P --> The probability of an event in each trial of the
- C binomial distribution from which a random deviate
- C is to be generated.
- C REAL P
- C
- C IGNBIN <-- A random deviate yielding the number of events
- C from N independent trials, each of which has
- C a probability of event P.
- C INTEGER IGNBIN
- C
- C
- C Note
- C
- C
- C Uses RANF so the value of the seeds, ISEED1 and ISEED2 must be set
- C by a call similar to the following
- C DUM = RANSET( ISEED1, ISEED2 )
- C
- C
- C Method
- C
- C
- C This is algorithm BTPE from:
- C
- C Kachitvichyanukul, V. and Schmeiser, B. W.
- C
- C Binomial Random Variate Generation.
- C Communications of the ACM, 31, 2
- C (February, 1988) 216.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C INTEGER FUNCTION IGNLGI()
- C GeNerate LarGe Integer
- C
- C Returns a random integer following a uniform distribution over
- C (1, 2147483562) using the current generator.
- C
- C This is a transcription from Pascal to Fortran of routine
- C Random from the paper
- C
- C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
- C with Splitting Facilities." ACM Transactions on Mathematical
- C Software, 17:98-111 (1991)
- C
- C**********************************************************************
- C**********************************************************************
- C
- C INTEGER FUNCTION IGNPOI( AV )
- C
- C GENerate POIsson random deviate
- C
- C
- C Function
- C
- C
- C Generates a single random deviate from a Poisson
- C distribution with mean AV.
- C
- C
- C Arguments
- C
- C
- C AV --> The mean of the Poisson distribution from which
- C a random deviate is to be generated.
- C REAL AV
- C
- C GENEXP <-- The random deviate.
- C REAL GENEXP
- C
- C
- C Method
- C
- C
- C Renames KPOIS from TOMS as slightly modified by BWB to use RANF
- C instead of SUNIF.
- C
- C For details see:
- C
- C Ahrens, J.H. and Dieter, U.
- C Computer Generation of Poisson Deviates
- C From Modified Normal Distributions.
- C ACM Trans. Math. Software, 8, 2
- C (June 1982),163-179
- C
- C**********************************************************************
- C**********************************************************************
- C
- C INTEGER FUNCTION IGNUIN( LOW, HIGH )
- C
- C GeNerate Uniform INteger
- C
- C
- C Function
- C
- C
- C Generates an integer uniformly distributed between LOW and HIGH.
- C
- C
- C Arguments
- C
- C
- C LOW --> Low bound (inclusive) on integer value to be generated
- C INTEGER LOW
- C
- C HIGH --> High bound (inclusive) on integer value to be generated
- C INTEGER HIGH
- C
- C
- C Note
- C
- C
- C If (HIGH-LOW) > 2,147,483,561 prints error message on * unit and
- C stops the program.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE INITGN(ISDTYP)
- C INIT-ialize current G-e-N-erator
- C
- C Reinitializes the state of the current generator
- C ISDTYP = -1 => sets the state to its initial seed
- C ISDTYP = 0 => sets the state to its last (previous) seed
- C ISDTYP = 1 => sets the state to a new seed 2^w values
- C from its last seed
- C
- C This is a transcription from Pascal to Fortran of routine
- C Init_Generator from the paper
- C
- C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
- C with Splitting Facilities." ACM Transactions on Mathematical
- C Software, 17:98-111 (1991)
- C
- C
- C Arguments
- C
- C
- C ISDTYP -> The state to which the generator is to be set
- C
- C INTEGER ISDTYP
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE INRGCM()
- C INitialize Random number Generator CoMmon
- C
- C
- C Function
- C
- C
- C Initializes common area for random number generator. This saves
- C the nuisance of a BLOCK DATA routine and the difficulty of
- C assuring that the routine is loaded with the other routines.
- C
- C**********************************************************************
- C**********************************************************************
- C
- C INTEGER FUNCTION MLTMOD(A,S,M)
- C
- C Returns (A*S) MOD M
- C
- C This is a transcription from Pascal to Fortran of routine
- C MULtMod_Decompos from the paper
- C
- C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
- C with Splitting Facilities." ACM Transactions on Mathematical
- C Software, 17:98-111 (1991)
- C
- C
- C Arguments
- C
- C
- C A, S, M -->
- C INTEGER A,S,M
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE PHRTSD( PHRASE, SEED1, SEED2 )
- C PHRase To SeeDs
- C
- C
- C Function
- C
- C
- C Uses a phrase (character string) to generate two seeds for the RGN
- C random number generator.
- C
- C
- C Arguments
- C
- C
- C PHRASE --> Phrase to be used for random number generation
- C CHARACTER*(*) PHRASE
- C
- C SEED1 <-- First seed for RGN generator
- C INTEGER SEED1
- C
- C SEED2 <-- Second seed for RGN generator
- C INTEGER SEED2
- C
- C
- C Note
- C
- C
- C Trailing blanks are eliminated before the seeds are generated.
- C
- C Generated seed values will fall in the range 1..2^30
- C (1..1,073,741,824)
- C
- C**********************************************************************
- C**********************************************************************
- C
- C REAL FUNCTION RANF()
- C RANDom number generator as a Function
- C
- C Returns a random floating point number from a uniform distribution
- C over 0 - 1 (endpoints of this interval are not returned) using the
- C current generator
- C
- C This is a transcription from Pascal to Fortran of routine
- C Uniform_01 from the paper
- C
- C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
- C with Splitting Facilities." ACM Transactions on Mathematical
- C Software, 17:98-111 (1991)
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE SETALL(ISEED1,ISEED2)
- C SET ALL random number generators
- C
- C Sets the initial seed of generator 1 to ISEED1 and ISEED2. The
- C initial seeds of the other generators are set accordingly, and
- C all generators states are set to these seeds.
- C
- C This is a transcription from Pascal to Fortran of routine
- C Set_Initial_Seed from the paper
- C
- C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
- C with Splitting Facilities." ACM Transactions on Mathematical
- C Software, 17:98-111 (1991)
- C
- C
- C Arguments
- C
- C
- C ISEED1 -> First of two integer seeds
- C INTEGER ISEED1
- C
- C ISEED2 -> Second of two integer seeds
- C INTEGER ISEED1
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE SETANT(QVALUE)
- C SET ANTithetic
- C
- C Sets whether the current generator produces antithetic values. If
- C X is the value normally returned from a uniform [0,1] random
- C number generator then 1 - X is the antithetic value. If X is the
- C value normally returned from a uniform [0,N] random number
- C generator then N - 1 - X is the antithetic value.
- C
- C All generators are initialized to NOT generate antithetic values.
- C
- C This is a transcription from Pascal to Fortran of routine
- C Set_Antithetic from the paper
- C
- C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
- C with Splitting Facilities." ACM Transactions on Mathematical
- C Software, 17:98-111 (1991)
- C
- C
- C Arguments
- C
- C
- C QVALUE -> .TRUE. if generator G is to generating antithetic
- C values, otherwise .FALSE.
- C LOGICAL QVALUE
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE SETCGN( G )
- C Set GeNerator
- C
- C Sets the current generator to G. All references to a generato
- C are to the current generator.
- C
- C
- C Arguments
- C
- C
- C G --> Number of the current random number generator (1..32)
- C INTEGER G
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE SETGMN( MEANV, COVM, P, PARM)
- C SET Generate Multivariate Normal random deviate
- C
- C
- C Function
- C
- C
- C Places P, MEANV, and the Cholesky factoriztion of COVM
- C in GENMN.
- C
- C
- C Arguments
- C
- C
- C MEANV --> Mean vector of multivariate normal distribution.
- C REAL MEANV(P)
- C
- C COVM <--> (Input) Covariance matrix of the multivariate
- C normal distribution
- C (Output) Destroyed on output
- C REAL COVM(P,P)
- C
- C P --> Dimension of the normal, or length of MEANV.
- C INTEGER P
- C
- C PARM <-- Array of parameters needed to generate multivariate norma
- C deviates (P, MEANV and Cholesky decomposition of
- C COVM).
- C 1 : 1 - P
- C 2 : P + 1 - MEANV
- C P+2 : P*(P+3)/2 + 1 - Cholesky decomposition of COVM
- C REAL PARM(P*(P+3)/2 + 1)
- C
- C**********************************************************************
- C**********************************************************************
- C
- C SUBROUTINE SETSD(ISEED1,ISEED2)
- C SET S-ee-D of current generator
- C
- C Resets the initial seed and state of generator g to ISEED1 and
- C ISEED2. The seeds and states of the other generators remain
- C unchanged.
- C
- C This is a transcription from Pascal to Fortran of routine
- C Set_Seed from the paper
- C
- C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
- C with Splitting Facilities." ACM Transactions on Mathematical
- C Software, 17:98-111 (1991)
- C
- C
- C Arguments
- C
- C
- C ISEED1 -> First integer seed
- C INTEGER ISEED1
- C
- C ISEED2 -> Second integer seed
- C INTEGER ISEED1
- C
- C**********************************************************************
--- 0 ----
diff -cNr octave-2.0.13/libcruft/ranlib/setant.f octave-2.0.14/libcruft/ranlib/setant.f
*** octave-2.0.13/libcruft/ranlib/setant.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/setant.f Thu Oct 15 00:19:38 1998
***************
*** 65,72 ****
IF (qrgnin()) GO TO 10
WRITE (*,*) ' SETANT called before random number generator ',
+ ' initialized -- abort!'
! CALL XSTOPX
! + (' SETANT called before random number generator initialized')
10 CALL getcgn(g)
qanti(g) = qvalue
--- 65,71 ----
IF (qrgnin()) GO TO 10
WRITE (*,*) ' SETANT called before random number generator ',
+ ' initialized -- abort!'
! STOP ' SETANT called before random number generator initialized'
10 CALL getcgn(g)
qanti(g) = qvalue
diff -cNr octave-2.0.13/libcruft/ranlib/setgmn.f octave-2.0.14/libcruft/ranlib/setgmn.f
*** octave-2.0.13/libcruft/ranlib/setgmn.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/setgmn.f Thu Oct 15 00:19:38 1998
***************
*** 1,7 ****
! SUBROUTINE setgmn(meanv,covm,p,parm)
C**********************************************************************
C
! C SUBROUTINE SETGMN( MEANV, COVM, P, PARM)
C SET Generate Multivariate Normal random deviate
C
C
--- 1,13 ----
! SUBROUTINE setgmn(meanv,covm,ldcovm,p,parm)
! C SUBROUTINE setgmn(meanv,covm,p,parm)
! C JJV changed this routine to take leading dimension of COVM
! C JJV argument and pass it to SPOFA, making it easier to use
! C JJV if the COVM which is used is contained in a larger matrix
! C JJV and to make the routine more consistent with LINPACK.
! C JJV Changes are in comments, declarations, and the call to SPOFA.
C**********************************************************************
C
! C SUBROUTINE SETGMN( MEANV, COVM, LDCOVM, P, PARM)
C SET Generate Multivariate Normal random deviate
C
C
***************
*** 9,15 ****
C
C
C Places P, MEANV, and the Cholesky factoriztion of COVM
! C in GENMN.
C
C
C Arguments
--- 15,21 ----
C
C
C Places P, MEANV, and the Cholesky factoriztion of COVM
! C in PARM for GENMN.
C
C
C Arguments
***************
*** 19,34 ****
C REAL MEANV(P)
C
C COVM <--> (Input) Covariance matrix of the multivariate
! C normal distribution
C (Output) Destroyed on output
! C REAL COVM(P,P)
C
C P --> Dimension of the normal, or length of MEANV.
C INTEGER P
C
! C PARM <-- Array of parameters needed to generate multivariate norma
! C deviates (P, MEANV and Cholesky decomposition of
! C COVM).
C 1 : 1 - P
C 2 : P + 1 - MEANV
C P+2 : P*(P+3)/2 + 1 - Cholesky decomposition of COVM
--- 25,45 ----
C REAL MEANV(P)
C
C COVM <--> (Input) Covariance matrix of the multivariate
! C normal distribution. This routine uses only the
! C (1:P,1:P) slice of COVM, but needs to know LDCOVM.
! C
C (Output) Destroyed on output
! C REAL COVM(LDCOVM,P)
! C
! C LDCOVM --> Leading actual dimension of COVM.
! C INTEGER LDCOVM
C
C P --> Dimension of the normal, or length of MEANV.
C INTEGER P
C
! C PARM <-- Array of parameters needed to generate multivariate
! C normal deviates (P, MEANV and Cholesky decomposition
! C of COVM).
C 1 : 1 - P
C 2 : P + 1 - MEANV
C P+2 : P*(P+3)/2 + 1 - Cholesky decomposition of COVM
***************
*** 36,45 ****
C
C**********************************************************************
C .. Scalar Arguments ..
! INTEGER p
C ..
C .. Array Arguments ..
! REAL covm(p,p),meanv(p),parm(p* (p+3)/2+1)
C ..
C .. Local Scalars ..
INTEGER i,icount,info,j
--- 47,58 ----
C
C**********************************************************************
C .. Scalar Arguments ..
! C INTEGER p
! INTEGER p, ldcovm
C ..
C .. Array Arguments ..
! C REAL covm(p,p),meanv(p),parm(p* (p+3)/2+1)
! REAL covm(ldcovm,p),meanv(p),parm(p* (p+3)/2+1)
C ..
C .. Local Scalars ..
INTEGER i,icount,info,j
***************
*** 55,61 ****
IF (.NOT. (p.LE.0)) GO TO 10
WRITE (*,*) 'P nonpositive in SETGMN'
WRITE (*,*) 'Value of P: ',p
! CALL XSTOPX ('P nonpositive in SETGMN')
10 parm(1) = p
C
--- 68,74 ----
IF (.NOT. (p.LE.0)) GO TO 10
WRITE (*,*) 'P nonpositive in SETGMN'
WRITE (*,*) 'Value of P: ',p
! STOP 'P nonpositive in SETGMN'
10 parm(1) = p
C
***************
*** 67,76 ****
C
C Cholesky decomposition to find A s.t. trans(A)*(A) = COVM
C
! CALL spofa(covm,p,p,info)
IF (.NOT. (info.NE.0)) GO TO 30
WRITE (*,*) ' COVM not positive definite in SETGMN'
! CALL XSTOPX (' COVM not positive definite in SETGMN')
30 icount = p + 1
C
--- 80,90 ----
C
C Cholesky decomposition to find A s.t. trans(A)*(A) = COVM
C
! C CALL spofa(covm,p,p,info)
! CALL spofa(covm,ldcovm,p,info)
IF (.NOT. (info.NE.0)) GO TO 30
WRITE (*,*) ' COVM not positive definite in SETGMN'
! STOP ' COVM not positive definite in SETGMN'
30 icount = p + 1
C
diff -cNr octave-2.0.13/libcruft/ranlib/setsd.f octave-2.0.14/libcruft/ranlib/setsd.f
*** octave-2.0.13/libcruft/ranlib/setsd.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/setsd.f Thu Oct 15 00:19:38 1998
***************
*** 62,69 ****
IF (qrgnin()) GO TO 10
WRITE (*,*) ' SETSD called before random number generator ',
+ ' initialized -- abort!'
! CALL XSTOPX
! + (' SETSD called before random number generator initialized')
10 CALL getcgn(g)
ig1(g) = iseed1
--- 62,68 ----
IF (qrgnin()) GO TO 10
WRITE (*,*) ' SETSD called before random number generator ',
+ ' initialized -- abort!'
! STOP ' SETSD called before random number generator initialized'
10 CALL getcgn(g)
ig1(g) = iseed1
diff -cNr octave-2.0.13/libcruft/ranlib/sexpo.f octave-2.0.14/libcruft/ranlib/sexpo.f
*** octave-2.0.13/libcruft/ranlib/sexpo.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/sexpo.f Thu Oct 15 00:19:38 1998
***************
*** 23,36 ****
C C
C**********************************************************************C
C
- DIMENSION q(8)
- EQUIVALENCE (q(1),q1)
C
C Q(N) = SUM(ALOG(2.0)**K/K!) K=1,..,N , THE HIGHEST N
C (HERE 8) IS DETERMINED BY Q(N)=1.0 WITHIN STANDARD PRECISION
C
DATA q/.6931472,.9333737,.9888778,.9984959,.9998293,.9999833,
+ .9999986,.9999999/
C
10 a = 0.0
u = ranf()
--- 23,54 ----
C C
C**********************************************************************C
C
C
C Q(N) = SUM(ALOG(2.0)**K/K!) K=1,..,N , THE HIGHEST N
C (HERE 8) IS DETERMINED BY Q(N)=1.0 WITHIN STANDARD PRECISION
C
+ C JJV added a Save statement for q (in Data statement)
+ C .. Local Scalars ..
+ REAL a,q1,u,umin,ustar
+ INTEGER i
+ C ..
+ C .. Local Arrays ..
+ REAL q(8)
+ C ..
+ C .. External Functions ..
+ REAL ranf
+ EXTERNAL ranf
+ C ..
+ C .. Equivalences ..
+ EQUIVALENCE (q(1),q1)
+ C ..
+ C .. Save statement ..
+ SAVE q
+ C ..
+ C .. Data statements ..
DATA q/.6931472,.9333737,.9888778,.9984959,.9998293,.9999833,
+ .9999986,.9999999/
+ C ..
C
10 a = 0.0
u = ranf()
***************
*** 38,44 ****
20 a = a + q1
30 u = u + u
! IF (u.LE.1.0) GO TO 20
40 u = u - 1.0
IF (u.GT.q1) GO TO 60
50 sexpo = a + u
--- 56,65 ----
20 a = a + q1
30 u = u + u
! C JJV changed the following to reflect the true algorithm and
! C JJV prevent unpredictable behavior if U is initially 0.5.
! C IF (u.LE.1.0) GO TO 20
! IF (u.LT.1.0) GO TO 20
40 u = u - 1.0
IF (u.GT.q1) GO TO 60
50 sexpo = a + u
diff -cNr octave-2.0.13/libcruft/ranlib/sgamma.f octave-2.0.14/libcruft/ranlib/sgamma.f
*** octave-2.0.13/libcruft/ranlib/sgamma.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/sgamma.f Thu Oct 15 00:19:38 1998
***************
*** 50,68 ****
C COEFFICIENTS A(K) - FOR Q = Q0+(T*T/2)*SUM(A(K)*V**K)
C COEFFICIENTS E(K) - FOR EXP(Q)-1 = SUM(E(K)*Q**K)
C
DATA q1,q2,q3,q4,q5,q6,q7/.04166669,.02083148,.00801191,.00144121,
+ -.00007388,.00024511,.00024240/
DATA a1,a2,a3,a4,a5,a6,a7/.3333333,-.2500030,.2000062,-.1662921,
+ .1423657,-.1367177,.1233795/
DATA e1,e2,e3,e4,e5/1.,.4999897,.1668290,.0407753,.0102930/
- C
- C PREVIOUS A PRE-SET TO ZERO - AA IS A', AAA IS A"
- C SQRT32 IS THE SQUAREROOT OF 32 = 5.656854249492380
- C
DATA aa/0.0/,aaa/0.0/,sqrt32/5.656854/
C
IF (a.EQ.aa) GO TO 10
! IF (a.LT.1.0) GO TO 120
C
C STEP 1: RECALCULATIONS OF S2,S,D IF A HAS CHANGED
C
--- 50,90 ----
C COEFFICIENTS A(K) - FOR Q = Q0+(T*T/2)*SUM(A(K)*V**K)
C COEFFICIENTS E(K) - FOR EXP(Q)-1 = SUM(E(K)*Q**K)
C
+ C .. Scalar Arguments ..
+ REAL a
+ C ..
+ C .. Local Scalars .. (JJV added B0 to fix rare and subtle bug)
+ REAL a1,a2,a3,a4,a5,a6,a7,aa,aaa,b,b0,c,d,e,e1,e2,e3,e4,e5,p,q,q0,
+ + q1,q2,q3,q4,q5,q6,q7,r,s,s2,si,sqrt32,t,u,v,w,x
+ C ..
+ C .. External Functions ..
+ REAL ranf,sexpo,snorm
+ EXTERNAL ranf,sexpo,snorm
+ C ..
+ C .. Intrinsic Functions ..
+ INTRINSIC abs,alog,exp,sign,sqrt
+ C ..
+ C .. Save statement ..
+ C JJV added Save statement for vars in Data satatements
+ SAVE aa,aaa,s2,s,d,q0,b,si,c,q1,q2,q3,q4,q5,q6,q7,a1,a2,a3,a4,a5,
+ + a6,a7,e1,e2,e3,e4,e5,sqrt32
+ C ..
+ C .. Data statements ..
+ C
+ C PREVIOUS A PRE-SET TO ZERO - AA IS A', AAA IS A"
+ C SQRT32 IS THE SQUAREROOT OF 32 = 5.656854249492380
+ C
DATA q1,q2,q3,q4,q5,q6,q7/.04166669,.02083148,.00801191,.00144121,
+ -.00007388,.00024511,.00024240/
DATA a1,a2,a3,a4,a5,a6,a7/.3333333,-.2500030,.2000062,-.1662921,
+ .1423657,-.1367177,.1233795/
DATA e1,e2,e3,e4,e5/1.,.4999897,.1668290,.0407753,.0102930/
DATA aa/0.0/,aaa/0.0/,sqrt32/5.656854/
+ C ..
+ C .. Executable Statements ..
C
IF (a.EQ.aa) GO TO 10
! IF (a.LT.1.0) GO TO 130
C
C STEP 1: RECALCULATIONS OF S2,S,D IF A HAS CHANGED
C
***************
*** 115,123 ****
C
C CASE 1: A .LE. 3.686
C
! 30 b = .463 + s - .178*s2
si = 1.235
! c = .195/s - .079 + .016*s
C
C STEP 5: NO QUOTIENT TEST IF X NOT POSITIVE
C
--- 137,145 ----
C
C CASE 1: A .LE. 3.686
C
! 30 b = .463 + s + .178*s2
si = 1.235
! c = .195/s - .079 + .16*s
C
C STEP 5: NO QUOTIENT TEST IF X NOT POSITIVE
C
***************
*** 147,191 ****
C
C STEP 9: REJECTION IF T .LT. TAU(1) = -.71874483771719
C
! IF (t.LT. (-.7187449)) GO TO 70
C
C STEP 10: CALCULATION OF V AND QUOTIENT Q
C
v = t/ (s+s)
! IF (abs(v).LE.0.25) GO TO 80
q = q0 - s*t + 0.25*t*t + (s2+s2)*alog(1.0+v)
! GO TO 90
! 80 q = q0 + 0.5*t*t* ((((((a7*v+a6)*v+a5)*v+a4)*v+a3)*v+a2)*v+a1)*v
C
C STEP 11: HAT ACCEPTANCE (H) (IF Q NOT POSITIVE GO TO STEP 8)
C
! 90 IF (q.LE.0.0) GO TO 70
! IF (q.LE.0.5) GO TO 100
! w = exp(q) - 1.0
! GO TO 110
! 100 w = ((((e5*q+e4)*q+e3)*q+e2)*q+e1)*q
C
C IF T IS REJECTED, SAMPLE AGAIN AT STEP 8
C
! 110 IF (c*abs(u).GT.w*exp(e-0.5*t*t)) GO TO 70
! x = s + 0.5*t
sgamma = x*x
RETURN
C
C ALTERNATE METHOD FOR PARAMETERS A BELOW 1 (.3678794=EXP(-1.))
C
! 120 aa = 0.0
! b = 1.0 + .3678794*a
! 130 p = b*ranf()
! IF (p.GE.1.0) GO TO 140
sgamma = exp(alog(p)/a)
! IF (sexpo().LT.sgamma) GO TO 130
RETURN
! 140 sgamma = -alog((b-p)/a)
! IF (sexpo().LT. (1.0-a)*alog(sgamma)) GO TO 130
RETURN
END
--- 169,235 ----
C
C STEP 9: REJECTION IF T .LT. TAU(1) = -.71874483771719
C
! 80 IF (t.LT. (-.7187449)) GO TO 70
C
C STEP 10: CALCULATION OF V AND QUOTIENT Q
C
v = t/ (s+s)
! IF (abs(v).LE.0.25) GO TO 90
q = q0 - s*t + 0.25*t*t + (s2+s2)*alog(1.0+v)
! GO TO 100
! 90 q = q0 + 0.5*t*t* ((((((a7*v+a6)*v+a5)*v+a4)*v+a3)*v+a2)*v+a1)*v
C
C STEP 11: HAT ACCEPTANCE (H) (IF Q NOT POSITIVE GO TO STEP 8)
C
! 100 IF (q.LE.0.0) GO TO 70
! IF (q.LE.0.5) GO TO 110
! C
! C JJV modified the code through line 125 to handle large Q case
! C
! IF (q.LT.15.0) GO TO 105
! C
! C JJV Here Q is large enough that Q = log(exp(Q) - 1.0) (for real Q)
! C JJV so reformulate test at 120 in terms of one EXP, if not too big
! C JJV 87.49823 is close to the largest real which can be
! C JJV exponentiated (87.49823 = log(1.0E38))
! C
! IF ((q+e-0.5*t*t).GT.87.49823) GO TO 125
! IF (c*abs(u).GT.exp(q+e-0.5*t*t)) GO TO 70
! GO TO 125
!
! 105 w = exp(q) - 1.0
! GO TO 120
! 110 w = ((((e5*q+e4)*q+e3)*q+e2)*q+e1)*q
C
C IF T IS REJECTED, SAMPLE AGAIN AT STEP 8
C
! 120 IF (c*abs(u).GT.w*exp(e-0.5*t*t)) GO TO 70
! 125 x = s + 0.5*t
sgamma = x*x
RETURN
C
C ALTERNATE METHOD FOR PARAMETERS A BELOW 1 (.3678794=EXP(-1.))
C
! C JJV changed B to B0 (which was added to declarations for this)
! C JJV in 130 to END to fix rare and subtle bug.
! C JJV Line: '130 aa = 0.0' was removed (unnecessary, wasteful).
! C JJV Reasons: the state of AA only serves to tell the A .GE. 1.0
! C JJV case if certain A-dependant constants need to be recalculated.
! C JJV The A .LT. 1.0 case (here) no longer changes any of these, and
! C JJV the recalculation of B (which used to change with an
! C JJV A .LT. 1.0 call) is governed by the state of AAA anyway.
! C
! 130 b0 = 1.0 + .3678794*a
! 140 p = b0*ranf()
! IF (p.GE.1.0) GO TO 150
sgamma = exp(alog(p)/a)
! IF (sexpo().LT.sgamma) GO TO 140
RETURN
! 150 sgamma = -alog((b0-p)/a)
! IF (sexpo().LT. (1.0-a)*alog(sgamma)) GO TO 140
RETURN
END
diff -cNr octave-2.0.13/libcruft/ranlib/snorm.f octave-2.0.14/libcruft/ranlib/snorm.f
*** octave-2.0.13/libcruft/ranlib/snorm.f Thu Jul 18 20:29:53 1996
--- octave-2.0.14/libcruft/ranlib/snorm.f Thu Oct 15 00:20:47 1998
***************
*** 23,33 ****
C C
C**********************************************************************C
C
- DIMENSION a(32),d(31),t(31),h(31)
C
C THE DEFINITIONS OF THE CONSTANTS A(K), D(K), T(K) AND
C H(K) ARE ACCORDING TO THE ABOVEMENTIONED ARTICLE
C
DATA a/0.0,.3917609E-1,.7841241E-1,.1177699,.1573107,.1970991,
+ .2372021,.2776904,.3186394,.3601299,.4022501,.4450965,
+ .4887764,.5334097,.5791322,.6260990,.6744898,.7245144,
--- 23,51 ----
C C
C**********************************************************************C
C
C
C THE DEFINITIONS OF THE CONSTANTS A(K), D(K), T(K) AND
C H(K) ARE ACCORDING TO THE ABOVEMENTIONED ARTICLE
C
+ C .. Local Scalars ..
+ REAL aa,s,tt,u,ustar,w,y
+ INTEGER i
+ C ..
+ C .. Local Arrays ..
+ REAL a(32),d(31),h(31),t(31)
+ C ..
+ C .. External Functions ..
+ REAL ranf
+ EXTERNAL ranf
+ C ..
+ C .. Intrinsic Functions ..
+ INTRINSIC float,int
+ C ..
+ C .. Save statement ..
+ C JJV added a Save statement for arrays initialized in Data statmts
+ SAVE a,d,t,h
+ C ..
+ C .. Data statements ..
DATA a/0.0,.3917609E-1,.7841241E-1,.1177699,.1573107,.1970991,
+ .2372021,.2776904,.3186394,.3601299,.4022501,.4450965,
+ .4887764,.5334097,.5791322,.6260990,.6744898,.7245144,
***************
*** 53,58 ****
--- 71,78 ----
+ .5953130E-1,.6308489E-1,.6737503E-1,.7264544E-1,.7926471E-1,
+ .8781922E-1,.9930398E-1,.1155599,.1404344,.1836142,.2790016,
+ .7010474/
+ C ..
+ C .. Executable Statements ..
C
10 u = ranf()
s = 0.0
diff -cNr octave-2.0.13/libcruft/ranlib/tstgmn.for octave-2.0.14/libcruft/ranlib/tstgmn.for
*** octave-2.0.13/libcruft/ranlib/tstgmn.for Thu Jul 18 20:45:46 1996
--- octave-2.0.14/libcruft/ranlib/tstgmn.for Thu Oct 15 00:19:38 1998
***************
*** 1,4 ****
! REAL FUNCTION covar(x,y,n)
C .. Scalar Arguments ..
INTEGER n
C ..
--- 1,7 ----
! C JJV changed name to ONECOV to avoid confusion with array COVAR
! C JJV this was also changed in the body of the function
! C REAL FUNCTION covar(x,y,n)
! REAL FUNCTION onecov(x,y,n)
C .. Scalar Arguments ..
INTEGER n
C ..
***************
*** 18,38 ****
C .. Executable Statements ..
CALL stat(x,n,avx,varx,xmin,xmax)
CALL stat(y,n,avy,vary,xmin,xmax)
! covar = 0.0
DO 10,i = 1,n
! covar = covar + (x(i)-avx)* (y(i)-avy)
! 10 CONTINUE
! covar = covar/real(n-1)
RETURN
!
END
- SUBROUTINE prcomp(p,mean,xcovar,answer)
! INTEGER p,maxp
PARAMETER (maxp=10)
! REAL mean(p),xcovar(p,p),rcovar(maxp,maxp)
REAL answer(1000,maxp)
! REAL rmean(maxp),rvar(maxp)
INTEGER maxobs
PARAMETER (maxobs=1000)
--- 21,53 ----
C .. Executable Statements ..
CALL stat(x,n,avx,varx,xmin,xmax)
CALL stat(y,n,avy,vary,xmin,xmax)
! C covar = 0.0
! onecov = 0.0
DO 10,i = 1,n
! C covar = covar + (x(i)-avx)* (y(i)-avy)
! onecov = onecov + (x(i)-avx)* (y(i)-avy)
! 10 CONTINUE
! C covar = covar/real(n-1)
! onecov = onecov/real(n-1)
RETURN
!
END
! C JJV Added argument LDXCOV (leading dimension of XCOVAR) to be
! C JJV consistent with the program TSTGMN, see comments below.
! C JJV This change necessitated changes in the declarations.
! C SUBROUTINE prcomp(p,mean,xcovar,answer)
! SUBROUTINE prcomp(p,mean,xcovar,ldxcov,answer)
!
! C INTEGER p,maxp
! INTEGER p,maxp,ldxcov
PARAMETER (maxp=10)
! C REAL mean(p),xcovar(p,p),rcovar(maxp,maxp)
! REAL mean(p),xcovar(ldxcov,p),rcovar(maxp,maxp)
REAL answer(1000,maxp)
! C JJV added ONECOV because of name change to function COVAR
! C REAL rmean(maxp),rvar(maxp)
! REAL rmean(maxp),rvar(maxp),onecov
INTEGER maxobs
PARAMETER (maxobs=1000)
***************
*** 46,52 ****
DO 30,i = 1,p
DO 20,j = 1,i - 1
WRITE (*,*) ' I = ',i,' J = ',j
! rcovar(i,j) = covar(answer(1,i),answer(1,j),maxobs)
WRITE (*,*) ' Covariance ',xcovar(i,j),' Generated ',
+ rcovar(i,j)
20 CONTINUE
--- 61,69 ----
DO 30,i = 1,p
DO 20,j = 1,i - 1
WRITE (*,*) ' I = ',i,' J = ',j
! C JJV changed COVAR to match new name
! C rcovar(i,j) = covar(answer(1,i),answer(1,j),maxobs)
! rcovar(i,j) = onecov(answer(1,i),answer(1,j),maxobs)
WRITE (*,*) ' Covariance ',xcovar(i,j),' Generated ',
+ rcovar(i,j)
20 CONTINUE
***************
*** 54,67 ****
RETURN
END
! SUBROUTINE setcov(p,var,corr,covar)
C Set covariance matrix from variance and common correlation
C .. Scalar Arguments ..
REAL corr
! INTEGER p
C ..
C .. Array Arguments ..
! REAL covar(p,p),var(p)
C ..
C .. Local Scalars ..
INTEGER i,j
--- 71,91 ----
RETURN
END
!
! C JJV added LDCOV (leading dimension of COVAR) to be
! C JJV consistent with the program TSTGMN, see comments below.
! C JJV This change necessitated changes in the declarations.
! C SUBROUTINE setcov(p,var,corr,covar)
! SUBROUTINE setcov(p,var,corr,covar,ldcov)
C Set covariance matrix from variance and common correlation
C .. Scalar Arguments ..
REAL corr
! C INTEGER p
! INTEGER p,ldcov
C ..
C .. Array Arguments ..
! C REAL covar(p,p),var(p)
! REAL covar(ldcov,p),var(p)
C ..
C .. Local Scalars ..
INTEGER i,j
***************
*** 83,88 ****
--- 107,113 ----
RETURN
END
+
SUBROUTINE stat(x,n,av,var,xmin,xmax)
C .. Scalar Arguments ..
REAL av,var,xmax,xmin
***************
*** 116,130 ****
RETURN
END
PROGRAM tstgmn
C Test Generation of Multivariate Normal Data
C .. Parameters ..
INTEGER maxp
PARAMETER (maxp=10)
INTEGER maxobs
PARAMETER (maxobs=1000)
! INTEGER p2
! PARAMETER (p2=maxp*maxp)
C ..
C .. Local Scalars ..
REAL corr
--- 141,164 ----
RETURN
END
+
PROGRAM tstgmn
C Test Generation of Multivariate Normal Data
+ C JJV SETGMN was: SUBROUTINE setgmn(meanv,covm,p,parm)
+ C JJV is: SUBROUTINE setgmn(meanv,covm,ldcovm,p,parm)
+ C JJV So the covariance matrices have been changed to 2-dim'l
+ C JJV matrices, and the additional argument has been added to
+ C JJV the subroutine call. Additional changes have been made
+ C JJV to reflect this. (in declarations, the matrix copy routine,
+ C JJV and in subroutine calls.)
C .. Parameters ..
INTEGER maxp
PARAMETER (maxp=10)
INTEGER maxobs
PARAMETER (maxobs=1000)
! C JJV this parameter is no longer needed
! C INTEGER p2
! C PARAMETER (p2=maxp*maxp)
C ..
C .. Local Scalars ..
REAL corr
***************
*** 132,139 ****
CHARACTER phrase*100
C ..
C .. Local Arrays ..
! REAL answer(1000,maxp),ccovar(p2),covar(p2),mean(maxp),param(500),
! + temp(maxp),var(maxp),work(maxp)
C ..
C .. External Subroutines ..
EXTERNAL genmn,phrtsd,prcomp,setall,setcov,setgmn
--- 166,175 ----
CHARACTER phrase*100
C ..
C .. Local Arrays ..
! C REAL answer(1000,maxp),ccovar(p2),covar(p2),mean(maxp),param(500),
! C + temp(maxp),var(maxp),work(maxp)
! REAL answer(1000,maxp),ccovar(maxp,maxp),covar(maxp,maxp),
! + mean(maxp),param(500),temp(maxp),var(maxp),work(maxp)
C ..
C .. External Subroutines ..
EXTERNAL genmn,phrtsd,prcomp,setall,setcov,setgmn
***************
*** 158,182 ****
READ (*,*) (var(i),i=1,p)
WRITE (*,*) 'Enter correlation of all variables'
READ (*,*) corr
! CALL setcov(p,var,corr,covar)
WRITE (*,*) ' Enter phrase to initialize rn generator'
READ (*,'(a)') phrase
CALL phrtsd(phrase,is1,is2)
CALL setall(is1,is2)
! DO 20,i = 1,p2
! ccovar(i) = covar(i)
! 20 CONTINUE
C
C Generate Variables
C
! CALL setgmn(mean,ccovar,p,param)
DO 40,iobs = 1,maxobs
CALL genmn(param,work,temp)
DO 30,j = 1,p
answer(iobs,j) = work(j)
30 CONTINUE
40 CONTINUE
! CALL prcomp(p,mean,covar,answer)
C
C Print Comparison of Generated and Reconstructed Values
C
--- 194,226 ----
READ (*,*) (var(i),i=1,p)
WRITE (*,*) 'Enter correlation of all variables'
READ (*,*) corr
! C CALL setcov(p,var,corr,covar)
! CALL setcov(p,var,corr,covar,maxp)
WRITE (*,*) ' Enter phrase to initialize rn generator'
READ (*,'(a)') phrase
CALL phrtsd(phrase,is1,is2)
CALL setall(is1,is2)
! C DO 20,i = 1,p2
! C ccovar(i) = covar(i)
! C 20 CONTINUE
! DO 25,i = 1,maxp
! DO 20,j = 1,maxp
! ccovar(i,j) = covar(i,j)
! 20 CONTINUE
! 25 CONTINUE
C
C Generate Variables
C
! C CALL setgmn(mean,ccovar,p,param)
! CALL setgmn(mean,ccovar,maxp,p,param)
DO 40,iobs = 1,maxobs
CALL genmn(param,work,temp)
DO 30,j = 1,p
answer(iobs,j) = work(j)
30 CONTINUE
40 CONTINUE
! C CALL prcomp(p,mean,covar,answer)
! CALL prcomp(p,mean,covar,maxp,answer)
C
C Print Comparison of Generated and Reconstructed Values
C
diff -cNr octave-2.0.13/libcruft/ranlib/tstmid.for octave-2.0.14/libcruft/ranlib/tstmid.for
*** octave-2.0.13/libcruft/ranlib/tstmid.for Thu Jul 18 20:45:46 1996
--- octave-2.0.14/libcruft/ranlib/tstmid.for Thu Oct 15 00:19:38 1998
***************
*** 48,75 ****
IMPLICIT LOGICAL (q)
C Interactive test for PHRTSD
C .. Parameters ..
! INTEGER mxwh
! PARAMETER (mxwh=10)
C ..
C .. Local Scalars ..
! REAL av,avtr,var,vartr,xmin,xmax
! INTEGER i,is1,is2,itmp,iwhich,j,mxint,nperm,nrep,ntot
CHARACTER type*4,phrase*100
C ..
C .. Local Arrays ..
! REAL array(1000),param(3)
INTEGER iarray(1000),perm(500)
C ..
C .. External Functions ..
! REAL genbet,genchi,genf,gennch,gennf,genunf
! INTEGER ignuin,myhand
! EXTERNAL genbet,genchi,genf,gennch,gennf,genunf,ignuin,myhand
C ..
C .. External Subroutines ..
! EXTERNAL genprm,phrtsd,setall,stat,trstat
! C ..
! C .. Equivalences ..
! EQUIVALENCE (array,iarray)
C ..
C .. Executable Statements ..
WRITE (*,9000)
--- 48,72 ----
IMPLICIT LOGICAL (q)
C Interactive test for PHRTSD
C .. Parameters ..
! INTEGER mxwh,mxncat
! PARAMETER (mxwh=15,mxncat=100)
C ..
C .. Local Scalars ..
! REAL av,avtr,var,vartr,xmin,xmax,pevt,psum,rtry
! INTEGER i,is1,is2,itmp,iwhich,j,mxint,nperm,nrep,ntot,ntry,ncat
CHARACTER type*4,phrase*100
C ..
C .. Local Arrays ..
! REAL array(1000),param(3),prob(mxncat)
INTEGER iarray(1000),perm(500)
C ..
C .. External Functions ..
! REAL genbet,genchi,genf,gennch,gennf,genunf,genexp,gengam,gennor
! INTEGER ignuin,ignnbn
! EXTERNAL genbet,genchi,genf,gennch,gennf,genunf,ignuin
C ..
C .. External Subroutines ..
! EXTERNAL genprm,phrtsd,setall,stat,trstat,genmul
C ..
C .. Executable Statements ..
WRITE (*,9000)
***************
*** 82,88 ****
+ ' and prints it.'/
+ ' For uniform integers asks for upper bound, number of'/
+ ' replicates per integer in 1..upper bound.'/
! + ' Prints table of num times each integer generated.')
C
C Menu for choosing tests
C
--- 79,93 ----
+ ' and prints it.'/
+ ' For uniform integers asks for upper bound, number of'/
+ ' replicates per integer in 1..upper bound.'/
! + ' Prints table of num times each integer generated.'/
! + ' For multinomial asks for number of events to be'/
! + ' classified, number of categories in which they'/
! + ' are to be classified, and the probabilities that'/
! + ' an event will be classified in the categories,'/
! + ' for all but the last category. Prints table of'/
! + ' number of events by category, true probability'/
! + ' associated with each category, and observed'/
! + ' proportion of events in each category.')
C
C Menu for choosing tests
C
***************
*** 99,105 ****
+ ' (7) Generate uniform reals'/
+ ' (8) Generate beta deviates'/
+ ' (9) Generate binomial outcomes'/
! + ' (10) Generate Poisson ourcomes'/)
READ (*,*) iwhich
IF (.NOT. (iwhich.LT.0.OR.iwhich.GT.mxwh)) GO TO 20
--- 104,115 ----
+ ' (7) Generate uniform reals'/
+ ' (8) Generate beta deviates'/
+ ' (9) Generate binomial outcomes'/
! + ' (10) Generate Poisson outcomes'/
! + ' (11) Generate exponential deviates'/
! + ' (12) Generate gamma deviates'/
! + ' (13) Generate multinomial outcomes'/
! + ' (14) Generate normal deviates'/
! + ' (15) Generate negative binomial outcomes'/)
READ (*,*) iwhich
IF (.NOT. (iwhich.LT.0.OR.iwhich.GT.mxwh)) GO TO 20
***************
*** 128,136 ****
9020 FORMAT (' Mean Generated: ',T30,G15.7,5X,'True:',T60,
+ G15.7/' Variance Generated:',T30,G15.7,5X,'True:',T60,
! + G15.7/' Minimun: ',T30,G15.7,5X,'Maximum:',T60,G15.7)
! GO TO 280
40 IF ((2).NE. (iwhich)) GO TO 60
--- 138,146 ----
9020 FORMAT (' Mean Generated: ',T30,G15.7,5X,'True:',T60,
+ G15.7/' Variance Generated:',T30,G15.7,5X,'True:',T60,
! + G15.7/' Minimum: ',T30,G15.7,5X,'Maximum:',T60,G15.7)
! GO TO 420
40 IF ((2).NE. (iwhich)) GO TO 60
***************
*** 147,153 ****
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 280
60 IF ((3).NE. (iwhich)) GO TO 80
--- 157,163 ----
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
60 IF ((3).NE. (iwhich)) GO TO 80
***************
*** 164,174 ****
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 280
80 IF ((4).NE. (iwhich)) GO TO 100
-
C
C Noncentral F deviates
C
--- 174,183 ----
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
80 IF ((4).NE. (iwhich)) GO TO 100
C
C Noncentral F deviates
C
***************
*** 183,189 ****
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 280
100 IF ((5).NE. (iwhich)) GO TO 140
--- 192,198 ----
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
100 IF ((5).NE. (iwhich)) GO TO 140
***************
*** 204,210 ****
CALL genprm(perm,nperm)
WRITE (*,*) ' Perm Generated'
WRITE (*,'(20I4)') (perm(i),i=1,nperm)
! GO TO 280
140 IF ((6).NE. (iwhich)) GO TO 170
--- 213,219 ----
CALL genprm(perm,nperm)
WRITE (*,*) ' Perm Generated'
WRITE (*,'(20I4)') (perm(i),i=1,nperm)
! GO TO 420
140 IF ((6).NE. (iwhich)) GO TO 170
***************
*** 225,231 ****
160 CONTINUE
WRITE (*,*) ' Counts of Integers Generated'
WRITE (*,'(20I4)') (iarray(j),j=1,mxint)
! GO TO 280
170 IF ((7).NE. (iwhich)) GO TO 190
--- 234,240 ----
160 CONTINUE
WRITE (*,*) ' Counts of Integers Generated'
WRITE (*,'(20I4)') (iarray(j),j=1,mxint)
! GO TO 420
170 IF ((7).NE. (iwhich)) GO TO 190
***************
*** 241,247 ****
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 280
190 IF ((8).NE. (iwhich)) GO TO 210
--- 250,256 ----
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
190 IF ((8).NE. (iwhich)) GO TO 210
***************
*** 257,265 ****
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 280
210 IF ((9).NE. (iwhich)) GO TO 240
C
C Binomial outcomes
C
--- 266,275 ----
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
210 IF ((9).NE. (iwhich)) GO TO 240
+
C
C Binomial outcomes
C
***************
*** 278,286 ****
param(2) = pevt
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 280
240 IF ((10).NE. (iwhich)) GO TO 270
C
C Poisson outcomes
C
--- 288,297 ----
param(2) = pevt
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
240 IF ((10).NE. (iwhich)) GO TO 270
+
C
C Poisson outcomes
C
***************
*** 296,305 ****
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 280
! 270 CONTINUE
! 280 GO TO 10
END
SUBROUTINE trstat(type,parin,av,var)
--- 307,432 ----
CALL stat(array,1000,av,var,xmin,xmax)
CALL trstat(type,param,avtr,vartr)
WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
!
! 270 IF ((11).NE. (iwhich)) GO TO 290
!
! C
! C Exponential deviates
! C
! type = 'expo'
! WRITE (*,*) ' Enter (real) AV for Exponential'
! READ (*,*) param(1)
! DO 280,i = 1,1000
! array(i) = genexp(param(1))
! 280 CONTINUE
! CALL stat(array,1000,av,var,xmin,xmax)
! CALL trstat(type,param,avtr,vartr)
! WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
!
! GO TO 420
! 290 IF ((12).NE. (iwhich)) GO TO 310
!
! C
! C Gamma deviates
! C
! type = 'gamm'
! WRITE (*,*) ' Enter (real) A, (real) R for Gamma deviate'
! READ (*,*) param(1),param(2)
! DO 300,i = 1,1000
! array(i) = gengam(param(1),param(2))
! 300 CONTINUE
! CALL stat(array,1000,av,var,xmin,xmax)
! CALL trstat(type,param,avtr,vartr)
! WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
!
! 310 IF ((13).NE. (iwhich)) GO TO 360
!
! C
! C Multinomial outcomes
! C
! WRITE (*,*) ' Enter (int) number of observations: '
! READ (*,*) ntry
! 320 WRITE (*,*) ' Enter (int) num. of categories: <= ',mxncat
! READ (*,*) ncat
! IF (ncat.GT.mxncat) THEN
! WRITE (*,*) ' number of categories must be <= ',mxncat
! WRITE (*,*) ' Try again ... '
! GO TO 320
! END IF
! WRITE (*,*) ' Enter (real) prob. vector of length ',ncat-1
! READ (*,*) (prob(i),i=1,ncat-1)
! CALL genmul(ntry,prob,ncat,iarray)
! ntot = 0
! IF (ntry.GT.0) THEN
! rtry = real(ntry)
! DO 330, i = 1,ncat
! ntot = ntot + iarray(i)
! array(i) = iarray(i)/rtry
! 330 CONTINUE
! ELSE
! DO 340, i = 1,ncat
! ntot = ntot + iarray(i)
! array(i) = 0.0
! 340 CONTINUE
! ENDIF
! psum = 0.0
! DO 350, i = 1,ncat-1
! psum = psum + prob(i)
! 350 CONTINUE
! prob(ncat) = 1.0 - psum
!
! WRITE (*,*) ' Total number of observations: ',ntot
! WRITE (*,*) ' Total observations by category: '
! WRITE (*,'(10I8)') (iarray(i),i=1,ncat)
! WRITE (*,*) ' True probabilities by category: '
! WRITE (*,'(8F10.7)') (prob(i),i=1,ncat)
! WRITE (*,*) ' Observed proportions by category: '
! WRITE (*,'(8F10.7)') (array(i),i=1,ncat)
! GO TO 420
!
! 360 IF ((14).NE. (iwhich)) GO TO 380
!
! C
! C Normal deviates
! C
! type = 'norm'
! WRITE (*,*) ' Enter (real) AV, (real) SD for Normal'
! READ (*,*) param(1),param(2)
! DO 370,i = 1,1000
! array(i) = gennor(param(1),param(2))
! 370 CONTINUE
! CALL stat(array,1000,av,var,xmin,xmax)
! CALL trstat(type,param,avtr,vartr)
! WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
!
! 380 IF ((15).NE. (iwhich)) GO TO 410
!
! C
! C Negative Binomial outcomes
! C
! type = 'nbin'
! WRITE (*,*) ' Enter required (int) Number of events then '
! WRITE (*,*) ' (real) Prob of an event for negative binomial'
! READ (*,*) ntry,pevt
! DO 390,i = 1,1000
! iarray(i) = ignnbn(ntry,pevt)
! 390 CONTINUE
! DO 400,i = 1,1000
! array(i) = iarray(i)
! 400 CONTINUE
! CALL stat(array,1000,av,var,xmin,xmax)
! param(1) = ntry
! param(2) = pevt
! CALL trstat(type,param,avtr,vartr)
! WRITE (*,9020) av,avtr,var,vartr,xmin,xmax
! GO TO 420
!
! 410 CONTINUE
! 420 GO TO 10
END
SUBROUTINE trstat(type,parin,av,var)
***************
*** 323,328 ****
--- 450,461 ----
C 'ncf' noncentral f
C 'unif' uniform
C 'beta' beta distribution
+ C 'bin' binomial
+ C 'pois' poisson
+ C 'expo' exponential
+ C 'gamm' gamma
+ C 'norm' normal
+ C 'nbin' negative binomial
C CHARACTER*(4) TYPE
C
C PARIN --> Array containing parameters of distribution
***************
*** 344,355 ****
C beta
C PARIN(1) is A
C PARIN(2) is B
! C REAL PARIN(*)
! C binonial
C PARIN(1) is Number of trials
C PARIN(2) is Prob Event at Each Trial
C poisson
C PARIN(1) is Mean
C
C AV <-- Mean of specified distribution with specified parameters
C REAL AV
--- 477,499 ----
C beta
C PARIN(1) is A
C PARIN(2) is B
! C binomial
C PARIN(1) is Number of trials
C PARIN(2) is Prob Event at Each Trial
C poisson
C PARIN(1) is Mean
+ C exponential
+ C PARIN(1) is Mean
+ C gamma
+ C PARIN(1) is A
+ C PARIN(2) is R
+ C normal
+ C PARIN(1) is Mean
+ C PARIN(2) is Standard Deviation
+ C negative binomial
+ C PARIN(1) is required Number of events
+ C PARIN(2) is Probability of event
+ C REAL PARIN(*)
C
C AV <-- Mean of specified distribution with specified parameters
C REAL AV
***************
*** 378,391 ****
IF (('chis').NE. (type)) GO TO 10
av = parin(1)
var = 2.0*parin(1)
! GO TO 170
10 IF (('ncch').NE. (type)) GO TO 20
a = parin(1) + parin(2)
b = parin(2)/a
av = a
var = 2.0*a* (1.0+b)
! GO TO 170
20 IF (('f').NE. (type)) GO TO 70
IF (.NOT. (parin(2).LE.2.0001)) GO TO 30
--- 522,535 ----
IF (('chis').NE. (type)) GO TO 10
av = parin(1)
var = 2.0*parin(1)
! GO TO 210
10 IF (('ncch').NE. (type)) GO TO 20
a = parin(1) + parin(2)
b = parin(2)/a
av = a
var = 2.0*a* (1.0+b)
! GO TO 210
20 IF (('f').NE. (type)) GO TO 70
IF (.NOT. (parin(2).LE.2.0001)) GO TO 30
***************
*** 399,405 ****
50 var = (2.0*parin(2)**2* (parin(1)+parin(2)-2.0))/
+ (parin(1)* (parin(2)-2.0)**2* (parin(2)-4.0))
! 60 GO TO 170
70 IF (('ncf').NE. (type)) GO TO 120
IF (.NOT. (parin(2).LE.2.0001)) GO TO 80
--- 543,549 ----
50 var = (2.0*parin(2)**2* (parin(1)+parin(2)-2.0))/
+ (parin(1)* (parin(2)-2.0)**2* (parin(2)-4.0))
! 60 GO TO 210
70 IF (('ncf').NE. (type)) GO TO 120
IF (.NOT. (parin(2).LE.2.0001)) GO TO 80
***************
*** 415,448 ****
+ (parin(2)-2.0)
b = (parin(2)-2.0)**2* (parin(2)-4.0)
var = 2.0* (parin(2)/parin(1))**2* (a/b)
! 110 GO TO 170
120 IF (('unif').NE. (type)) GO TO 130
range = parin(2) - parin(1)
av = parin(1) + range/2.0
var = range**2/12.0
! GO TO 170
130 IF (('beta').NE. (type)) GO TO 140
av = parin(1)/ (parin(1)+parin(2))
var = (av*parin(2))/ ((parin(1)+parin(2))*
+ (parin(1)+parin(2)+1.0))
! WRITE (*,*) ' A, B, AV, VAR ',parin(1),parin(2),av,var
! GO TO 170
140 IF (('bin').NE. (type)) GO TO 150
av = parin(1)*parin(2)
var = av* (1.0-parin(2))
! GO TO 170
150 IF (('pois').NE. (type)) GO TO 160
av = parin(1)
var = parin(1)
! GO TO 170
! 160 WRITE (*,*) 'Unimplemented type ',type
STOP 'Unimplemented type in TRSTAT'
! 170 RETURN
END
--- 559,611 ----
+ (parin(2)-2.0)
b = (parin(2)-2.0)**2* (parin(2)-4.0)
var = 2.0* (parin(2)/parin(1))**2* (a/b)
! 110 GO TO 210
120 IF (('unif').NE. (type)) GO TO 130
range = parin(2) - parin(1)
av = parin(1) + range/2.0
var = range**2/12.0
! GO TO 210
130 IF (('beta').NE. (type)) GO TO 140
av = parin(1)/ (parin(1)+parin(2))
var = (av*parin(2))/ ((parin(1)+parin(2))*
+ (parin(1)+parin(2)+1.0))
! GO TO 210
140 IF (('bin').NE. (type)) GO TO 150
av = parin(1)*parin(2)
var = av* (1.0-parin(2))
! GO TO 210
150 IF (('pois').NE. (type)) GO TO 160
av = parin(1)
var = parin(1)
! GO TO 210
!
! 160 IF (('expo').NE. (type)) GO TO 170
! av = parin(1)
! var = parin(1)**2
! GO TO 210
!
! 170 IF (('gamm').NE. (type)) GO TO 180
! av = parin(2) / parin(1)
! var = av / parin(1)
! GO TO 210
!
! 180 IF (('norm').NE. (type)) GO TO 190
! av = parin(1)
! var = parin(2)**2
! GO TO 210
!
! 190 IF (('nbin').NE. (type)) GO TO 200
! av = parin(1) * (1.0 - parin(2)) / parin(2)
! var = av / parin(2)
! GO TO 210
! 200 WRITE (*,*) 'Unimplemented type ',type
STOP 'Unimplemented type in TRSTAT'
! 210 RETURN
END
diff -cNr octave-2.0.13/liboctave/Array-idx.h octave-2.0.14/liboctave/Array-idx.h
*** octave-2.0.13/liboctave/Array-idx.h Tue Feb 10 16:24:15 1998
--- octave-2.0.14/liboctave/Array-idx.h Wed May 27 13:21:38 1998
***************
*** 242,256 ****
(*current_liboctave_error_handler)
("A(:) = X: A must be the same size as X");
}
! else
{
! if (rhs_len != 0)
! {
! (*current_liboctave_error_handler)
! ("A([]) = X: X must also be an empty matrix");
! retval = 0;
! }
}
lhs.clear_index ();
--- 242,253 ----
(*current_liboctave_error_handler)
("A(:) = X: A must be the same size as X");
}
! else if (! (rhs_len == 1 || rhs_len == 0))
{
! (*current_liboctave_error_handler)
! ("A([]) = X: X must also be an empty matrix or a scalar");
! retval = 0;
}
lhs.clear_index ();
diff -cNr octave-2.0.13/liboctave/Array2-idx.h octave-2.0.14/liboctave/Array2-idx.h
*** octave-2.0.13/liboctave/Array2-idx.h Tue Apr 14 14:59:58 1998
--- octave-2.0.14/liboctave/Array2-idx.h Wed Aug 26 15:01:14 1998
***************
*** 444,449 ****
--- 444,460 ----
}
}
}
+ else if (n == 0 && m == 0)
+ {
+ if (! ((rhs_nr == 1 && rhs_nc == 1)
+ || (rhs_nr == 0 && rhs_nc == 0)))
+ {
+ (*current_liboctave_error_handler)
+ ("A([], []) = X: X must be an empty matrix or a scalar");
+
+ retval = 0;
+ }
+ }
else
{
(*current_liboctave_error_handler)
***************
*** 537,542 ****
--- 548,560 ----
lhs.d1 = lhs.length ();
lhs.d2 = 1;
}
+ else if (idx_nr == 0 && idx_nc == 0)
+ {
+ if (! ((rhs.d1 == 1 && rhs.d2 == 1)
+ || (rhs.d1 == 0 && rhs.d2 == 0)))
+ (*current_liboctave_error_handler)
+ ("A([]) = X: X must be an empty matrix or scalar");
+ }
else
(*current_liboctave_error_handler)
("A(I) = X: X must be a scalar or a matrix with the same size as I");
***************
*** 615,621 ****
if (idx)
{
! if (len == rhs_nr * rhs_nc)
{
int k = 0;
for (int j = 0; j < rhs_nc; j++)
--- 633,646 ----
if (idx)
{
! if (len == 0)
! {
! if (! ((rhs_nr == 1 && rhs_nc == 1)
! || (rhs_nr == 0 && rhs_nc == 0)))
! (*current_liboctave_error_handler)
! ("A([]) = X: X must be an empty matrix or scalar");
! }
! else if (len == rhs_nr * rhs_nc)
{
int k = 0;
for (int j = 0; j < rhs_nc; j++)
***************
*** 627,632 ****
--- 652,669 ----
int fc = (ii - fr) / lhs_nr;
lhs.elem (fr, fc) = rhs.elem (i, j);
}
+ }
+ }
+ else if (rhs_nr == 1 && rhs_nc == 1 && len <= lhs_nr * lhs_nc)
+ {
+ RT scalar = rhs.elem (0, 0);
+
+ for (int i = 0; i < len; i++)
+ {
+ int ii = idx.elem (i);
+ int fr = ii % lhs_nr;
+ int fc = (ii - fr) / lhs_nr;
+ lhs.elem (fr, fc) = scalar;
}
}
else
diff -cNr octave-2.0.13/liboctave/CMatrix.cc octave-2.0.14/liboctave/CMatrix.cc
*** octave-2.0.13/liboctave/CMatrix.cc Thu May 14 10:45:06 1998
--- octave-2.0.14/liboctave/CMatrix.cc Tue Jan 19 09:34:54 1999
***************
*** 160,165 ****
--- 160,166 ----
// here?
ComplexMatrix::ComplexMatrix (const charMatrix& a)
+ : MArray2 (a.rows (), a.cols (), 0.0)
{
for (int i = 0; i < a.cols (); i++)
for (int j = 0; j < a.rows (); j++)
***************
*** 1679,1703 ****
ComplexMatrix retval;
int len = v.length ();
- int a_len = a.length ();
! if (len != a_len)
! gripe_nonconformant ("operator *", len, 1, 1, a_len);
! else
{
! if (len != 0)
! {
! retval.resize (len, a_len);
! Complex *c = retval.fortran_vec ();
! F77_XFCN (zgemm, ZGEMM, ("N", "N", len, a_len, 1, 1.0,
! v.data (), len, a.data (), 1, 0.0,
! c, len, 1L, 1L));
!
! if (f77_exception_encountered)
! (*current_liboctave_error_handler)
! ("unrecoverable error in zgemm");
! }
}
return retval;
--- 1680,1700 ----
ComplexMatrix retval;
int len = v.length ();
! if (len != 0)
{
! int a_len = a.length ();
! retval.resize (len, a_len);
! Complex *c = retval.fortran_vec ();
!
! F77_XFCN (zgemm, ZGEMM, ("N", "N", len, a_len, 1, 1.0,
! v.data (), len, a.data (), 1, 0.0,
! c, len, 1L, 1L));
!
! if (f77_exception_encountered)
! (*current_liboctave_error_handler)
! ("unrecoverable error in zgemm");
}
return retval;
diff -cNr octave-2.0.13/liboctave/ChangeLog octave-2.0.14/liboctave/ChangeLog
*** octave-2.0.13/liboctave/ChangeLog Thu May 21 13:15:58 1998
--- octave-2.0.14/liboctave/ChangeLog Wed Apr 14 12:55:56 1999
***************
*** 1,3 ****
--- 1,139 ----
+ Wed Apr 14 12:55:42 1999 John W. Eaton
+
+ * Version 2.0.14 released.
+
+ Fri Mar 26 11:23:32 1999 John W. Eaton
+
+ * Makefile.in (libraries): Use the libfoo.a(objects) method of
+ creating static libs.
+
+ Thu Mar 4 02:17:04 1999 James Macnicol
+
+ * data-conv.cc (oct_data_conv::string_to_data_type): Handle uint16
+ and uint32 data types.
+
+ Thu Mar 4 01:51:37 1999 John W. Eaton
+
+ * lo-ieee.cc (octave_ieee_init): Don't use __alpha__-specific code
+ for Linux.
+
+ Tue Jan 19 09:34:55 1999 John W. Eaton
+
+ * dMatrix.cc (operator * (const ColumnVector& v, const RowVector& a)):
+ Don't require lengths to be equal.
+ * CMatrix.cc (operator * (const ComplexColumnVector& v, const
+ ComplexRowVector& a)): Likewise
+
+ Tue Nov 24 23:38:19 1998 Eric Norum
+
+ * statdefs.h: Only define mode_t if not already defined.
+
+ Tue Nov 24 17:24:52 1998 john
+
+ * lo-specfun.cc (airy, biry): Set imaginary part of result to zero
+ when appropriate.
+
+ Wed Nov 18 00:34:31 1998 John W. Eaton
+
+ * lo-specfun.cc: Don't include dbleBessel.h.
+
+ * Makefile.in (INCLUDES): Delete dbleBessel.h from the list.
+
+ Tue Nov 17 23:47:24 1998 John W. Eaton
+
+ * lo-specfun.cc (besselh, airy, biry): New functions.
+ Update Bessel function support to use library by D. E. Amos.
+
+ Thu Nov 5 13:12:40 1998 John W. Eaton
+
+ * chMatrix.h (charMatrix (const string_vector&)): New arg
+ `fill_char' with default value 0.
+
+ Mon Nov 2 13:36:04 1998 John W. Eaton
+
+ * Makefile.in (stmp-pic): New target.
+ ($(PICOBJ)): Depend on stmp-pic, not pic.
+ (clean): Remove stmp-pic
+ (distclean): Delete reference to stamp-picdir.
+
+ * Makefile.in: Undo previous change to avoid optmization when
+ compiling lo-ieee.cc.
+
+ Sun Nov 1 10:10:40 1998 John W. Eaton
+
+ * lo-mappers.cc (xfinite): Define in terms of xfinite for real and
+ imaginary parts.
+ (xisinf): Define in terms of xisinf for real and imaginary parts.
+
+ Fri Oct 23 21:46:20 1998 John W. Eaton
+
+ * pathsearch.h (dir_path::default_path): New data member.
+ * pathsearch.cc (dir_path::init): Use it.
+
+ * Makefile.in: Avoid optmization when compiling lo-ieee.cc.
+
+ Fri Oct 16 01:08:30 1998 John W. Eaton
+
+ * chMatrix.cc (charMatrix::extract): New function.
+ (charMatrix::charMatrix (char c)): New constructor.
+
+ Thu Oct 8 21:41:56 1998 John W. Eaton
+
+ * LSODE.cc (LSODE::do_integrate): Handle step limit.
+ * LSODE.h (LSODE_options::x_step_limit): New data member.
+ (LSODE_options::init): Set it.
+ (LSODE_options::copy): Copy it.
+ (LSODE_options::set_step_limit): New function.
+ (LSODE_options::step_limit): New function.
+
+ Fri Sep 25 14:26:44 1998 John W. Eaton
+
+ * pathsearch.h (dir_path::rehash): New function.
+ * pathsearch.cc (dir_path::init): Clear kpathsea's internal
+ diretcory cache before doing initialization.
+
+ Fri Sep 4 10:58:22 1998 John W. Eaton
+
+ * dMatrix.cc (Matrix::read): Skip after reading, not before.
+ From: Dr.-Ing. Torsten Finke .
+
+ Wed Sep 2 09:50:21 1998 John W. Eaton
+
+ * lo-ieee.cc (octave_ieee_init): For Linux on arm, don't rely on
+ HUGE_VAL and NAN.
+
+ Wed Aug 26 15:04:57 1998 John W. Eaton
+
+ * Array2-idx.h (assign (Array2& lhs, const Array2