SLSQ Safe-Least-Squares Code
SLSQ mathematical safe least squares algorithm
Brought to you by:
m-kretschmar
File | Date | Author | Commit |
---|---|---|---|
good-ex | 2014-05-24 | m-kretschmar | [r2] |
tests | 2014-05-24 | m-kretschmar | [r2] |
thesis | 2014-12-06 | m-kretschmar | [r9] |
Makefile | 2014-06-18 | m-kretschmar | [r5] |
addfre.f | 2014-06-12 | m-kretschmar | [r4] |
addlst.f | 2014-06-12 | m-kretschmar | [r4] |
bigtst.f | 2014-06-12 | m-kretschmar | [r4] |
boapos.f | 2014-06-12 | m-kretschmar | [r4] |
buerger.f | 2014-06-12 | m-kretschmar | [r4] |
calc81.f | 2014-06-12 | m-kretschmar | [r4] |
checkhkl.f | 2014-06-18 | m-kretschmar | [r5] |
chkdat.f | 2014-06-12 | m-kretschmar | [r4] |
chkeig.f | 2014-06-12 | m-kretschmar | [r4] |
chkful.f | 2014-06-12 | m-kretschmar | [r4] |
chkgrd.f | 2014-06-12 | m-kretschmar | [r4] |
chkhsh.f | 2014-06-12 | m-kretschmar | [r4] |
chklst.f | 2014-06-12 | m-kretschmar | [r4] |
chkmet.f | 2014-06-12 | m-kretschmar | [r4] |
chknpd.f | 2014-06-12 | m-kretschmar | [r4] |
chkocc.f | 2014-06-12 | m-kretschmar | [r4] |
chkosf.f | 2014-06-12 | m-kretschmar | [r4] |
chksym.f | 2014-06-12 | m-kretschmar | [r4] |
clchsh.f | 2014-06-12 | m-kretschmar | [r4] |
dobrgr.f | 2014-06-12 | m-kretschmar | [r4] |
eoapos.f | 2014-06-12 | m-kretschmar | [r4] |
equsym.f | 2014-06-12 | m-kretschmar | [r4] |
errmsg.f | 2014-06-12 | m-kretschmar | [r4] |
expand.f | 2014-06-12 | m-kretschmar | [r4] |
expsym.f | 2014-06-12 | m-kretschmar | [r4] |
extnum.f | 2014-06-12 | m-kretschmar | [r4] |
extsym.f | 2014-06-12 | m-kretschmar | [r4] |
forwrt.f | 2014-06-12 | m-kretschmar | [r4] |
getdat.f | 2014-06-12 | m-kretschmar | [r4] |
getdsf.f | 2014-06-12 | m-kretschmar | [r4] |
getfre.f | 2014-06-12 | m-kretschmar | [r4] |
gethkl.f | 2014-06-12 | m-kretschmar | [r4] |
getsgi.f | 2014-06-12 | m-kretschmar | [r4] |
getspg.f | 2014-06-12 | m-kretschmar | [r4] |
getstf.f | 2014-06-12 | m-kretschmar | [r4] |
getsym.f | 2014-06-12 | m-kretschmar | [r4] |
itstuff.pdf | 2015-04-25 | m-kretschmar | [r10] |
linuxf.f | 2014-06-12 | m-kretschmar | [r4] |
lsmm.f | 2014-06-12 | m-kretschmar | [r4] |
merge.f | 2014-06-12 | m-kretschmar | [r4] |
mxinv.f | 2014-06-12 | m-kretschmar | [r4] |
mxinv4.f | 2014-06-12 | m-kretschmar | [r4] |
nonpos.f | 2014-06-12 | m-kretschmar | [r4] |
normg.f | 2014-06-12 | m-kretschmar | [r4] |
nrmsym.f | 2014-06-12 | m-kretschmar | [r4] |
omit.f | 2014-06-12 | m-kretschmar | [r4] |
prepar.f | 2014-06-12 | m-kretschmar | [r4] |
prepq.f | 2014-06-12 | m-kretschmar | [r4] |
putdat.f | 2014-06-12 | m-kretschmar | [r4] |
puthkl.f | 2014-06-12 | m-kretschmar | [r4] |
readi.f | 2014-06-12 | m-kretschmar | [r4] |
readi4.f | 2014-06-12 | m-kretschmar | [r4] |
readme.txt | 2014-08-11 | m-kretschmar | [r6] |
readr.f | 2014-06-12 | m-kretschmar | [r4] |
readr4.f | 2014-06-12 | m-kretschmar | [r4] |
remlst.f | 2014-06-12 | m-kretschmar | [r4] |
rotate.f | 2014-06-12 | m-kretschmar | [r4] |
sanity.f | 2014-06-12 | m-kretschmar | [r4] |
search.f | 2014-06-12 | m-kretschmar | [r4] |
shake.f | 2014-06-12 | m-kretschmar | [r4] |
shelxl97v.f | 2014-08-11 | m-kretschmar | [r6] |
shwdat.f | 2014-06-12 | m-kretschmar | [r4] |
shwlst.f | 2014-06-12 | m-kretschmar | [r4] |
shwsym.f | 2014-06-12 | m-kretschmar | [r4] |
shxbench.pdf | 2014-11-09 | m-kretschmar | [r7] |
shxbench.tex | 2014-11-09 | m-kretschmar | [r7] |
slsq.f | 2014-06-12 | m-kretschmar | [r4] |
slsq.inc | 2014-06-12 | m-kretschmar | [r4] |
strln.f | 2014-06-12 | m-kretschmar | [r4] |
sxmm93mk.f | 2014-08-11 | m-kretschmar | [r6] |
sxmm97mk.f | 2014-08-11 | m-kretschmar | [r6] |
test.f | 2014-06-12 | m-kretschmar | [r4] |
testall.f | 2014-06-12 | m-kretschmar | [r4] |
texbench.pdf | 2014-11-09 | m-kretschmar | [r7] |
texbench.tex | 2014-11-09 | m-kretschmar | [r7] |
trans.f | 2014-06-12 | m-kretschmar | [r4] |
tstgrd.f | 2014-06-12 | m-kretschmar | [r4] |
tstrfl.f | 2014-06-12 | m-kretschmar | [r4] |
writef.f | 2014-06-12 | m-kretschmar | [r4] |
writei.f | 2014-06-12 | m-kretschmar | [r4] |
writer.f | 2014-06-12 | m-kretschmar | [r4] |
wrnnpd.f | 2014-06-12 | m-kretschmar | [r4] |
wrtbuf.f | 2014-06-12 | m-kretschmar | [r4] |
wrtfc.f | 2014-06-12 | m-kretschmar | [r4] |
wrtstr.f | 2014-06-12 | m-kretschmar | [r4] |
Copyright (C) 2014 Martin Kretschmar <mail@martin-kretschmar.de> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. If your software doesn’t run repeatedly for minutes, then you should never try to optimize it! C resp.C++ is fastest. (https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf), C++ and Go are statically compiled, both Java and Scala run on the JVM. Benchmark Time [sec] Factor C++ Opt 23 1.0x C++ Dbg 197 8.6x Java 64-bit 134 5.8x Java 32-bit 290 12.6x Java 32-bit GC* 106 4.6x Java 32-bit SPEC GC 89 3.7x Scala 82 3.6x Scala low-level* 67 2.9x Scala low-level GC* 58 2.5x Go 6g 161 7.0x Go Pro* 126 5.5x Fortran is the oldest programming language of the world. But for fast high quality numerical computations its still the number one. The language C has only exactly one sin(double x) function, while Fortran has 7 sin(REAL, DOUBLE, REAL*16, COMPLEX, DOUBLE COMPLEX DOUBLE COMPLEX COMPLEX*32). It must be noted that the a mathematical co-processor as built-in since the Intel 486 also must do his job somehow which can be really slow. This is also true for embedded processors. So your code should use the sin() function calls only in places where you really need them. The code examples from the (http://en.wikipedia.org/wiki/Numerical_Recipes) are meant to illustrate. The NAG Libraries are commercial, the LAPACK (http://www.netlib.org/lapack) and BLAS(http://www.netlib.org/blas) are free. The fastest free FFT is FFTW (http://en.wikipedia.org/wiki/FFTW). E. Prince writes in his book, that before the FFT computer centers ran mostly fourier calculations. Although not mentioning Numerical Recipes by name, Whaley et al.[7] demonstrate that LAPACK with a highly optimized BLAS library can be an order of magnitude faster (or more) than textbook-style triply nested-loop linear-algebra routines similar to the code in Numerical Recipes. As another example, Frigo and Johnson[8] point out that the fast Fourier transform (FFT) code in highly optimized programs on modern computer architectures is 5–40 times faster than the example in Numerical Recipes. In C all function values are passed by value and all functions like fprintf ( FILE *, …) have no fixed number of arguments and can be called recursively. To achieve this the parameters values have to be pushed on the stack, the function be called and the stack manually cleaned up afterwards. C also introduced a clean and simple pointer concept. A pointer p is a normal variable like an int, and should be initialized with a NULL. With the syntax (*p) the pointer is used to access the memory. If p is a char pointer, then exactly one byte will be accessed. p++ points to the next sensible object. For a FILE pointer the address is p+sizeof(FILE). a[I] is a shortcut for *(a+i) ] is a commutative shortcut for *(i+a) ] is a shortcut for i[a]. In Fortran all function values are passed by reference which are pointers resp. addresses of the variables. So a Fortran function can modify all of its variables its called with.