Newsgroup sci.math.num-analysis 28344

Directory

Subject: Re: Convert Social Security number to six digits and back again. -- From: mmacleod@henge.com (Malcolm MacLeod)
Subject: The equation f(n)=n-f(f(n-1)) -- From: Stan Armstrong
Subject: Re: SVD -- From: Konrad Hinsen
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq) -- From: Konrad Hinsen
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq) -- From: Konrad Hinsen
Subject: Re: Using C for number-crunching (was: Numerical solution to -- From: mlkessle@cip.physik.uni-wuerzburg.de (Manuel Kessler)
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq) -- From: David Kastrup
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq) -- From: ags@seaman.cc.purdue.edu (Dave Seaman)
Subject: Partial Differential Eq. HELP -- From: Vassilev Mollov
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq) -- From: bruns@tetibm2.ee.TU-Berlin.DE (Warner Bruns)
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq) -- From: shenkin@still3.chem.columbia.edu (Peter Shenkin)
Subject: Re: Help! Numerical libraries in C/C++ -- From: "Dann Corbit"
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq) -- From: Konrad Hinsen
Subject: List of On-Line Books -- From: Mark Griskey
Subject: Re: PRIME NUMBER UPTO 2^64 on CDROM? -- From: "Dann Corbit"
Subject: Re: Parameterization of a PSD matrix -- From: Robin Becker
Subject: N: Math routines (mainly for Object/Borland Pascal) on CDROM or 'good' web-sites -- From: landauf@adis.at (Gerhard Landauf)
Subject: Matlab for real time control? -- From: Bernt Lie
Subject: Re: Using C for number-crunching (was: Numerical solution to -- From: nmm1@cus.cam.ac.uk (Nick Maclaren)
Subject: BFGS variable metric question -- From: Jive Dadson
Subject: Re: BFGS variable metric question -- From: Jive Dadson
Subject: Re: [Q] Pentium/Pentium Pro optimized routines? -- From: Brad Bell
Subject: TI-92 -- From: Dan Butler
Subject: Re: Can anyone help with a quick triangulation optimisation. -- From: lpa@netcom.com (Pierre Asselin)
Subject: Windows version of laTex? -- From: ez062761@rocky.ucdavis.edu (Mike Henry)
Subject: Numerical Analysis Project -- From: llefton@math.uno.edu (Lew Lefton)
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq) -- From: molagnon@ifremer.fr (Michel OLAGNON)
Subject: Re: Matlab for real time control? -- From: courtois@massy.inra.fr (Francis COURTOIS)
Subject: Census Problem -- From: Jody Abrams
Subject: [Q] How can I get an argorithm of SVD? -- From: sashida@ae.keio.ac.jp (Hideo Sashida)
Subject: Re: [Q] How can I get an argorithm of SVD? -- From: sashida@ae.keio.ac.jp (Hideo Sashida)
Subject: Re: Using C for number-crunching (was: Numerical solution to -- From: gans@scholar.nyu.edu (Paul J. Gans)
Subject: discrete hankel transforms -- From: msh@holyrood.ed.ac.uk ( Mark Higgins)
Subject: Number Sets from Digital Storage Scopes? -- From: john@wd1v.mv.com (John D. Seney, WD1V, LeCroy T&M; 800.553.2769)
Subject: Re: BFGS variable metric question -- From: Hans D Mittelmann
Subject: Re: [Q] How can I get an argorithm of SVD? -- From: Hans D Mittelmann
Subject: Re: [Q] How can I get an argorithm of SVD? -- From: Hans D Mittelmann
Subject: Re: [Q] How can I get an argorithm of SVD? -- From: Hans D Mittelmann
Subject: Re: PRIME NUMBER UPTO 2^64 on CDROM? -- From: bp887@FreeNet.Carleton.CA (Angel Garcia)
Subject: Re: non-linear equation solving -- From: Hans D Mittelmann

Articles

Subject: Re: Convert Social Security number to six digits and back again.
From: mmacleod@henge.com (Malcolm MacLeod)
Date: Wed, 30 Oct 1996 10:28:20 GMT
"http://www.execpc.com/~ghtrout/"  wrote:
>How can I convert a social security number (xxx-xx-xxxx) to a six digit
>number with the lowest chance of duplicates and the ability to convert the
>number back to the social security number.  Because of the duplicates
>issue, I would like to have "alternate" numbers that could be used....maybe
>as simple as adding or subtracting 1 to the answer.
>This is for a new numeric access code I must assign to about 2500 people at
>my company.  I'd sure appreciate the help of a mathematician...
I don't have the info to hand at the moment, but there are quite a
number of non-used or "disallowed" SSNs, because they are coded for
the state / region in which they are issued... it is one way that
false SSNs are detected - there are more invalid codes than valid
codes, as I recall.  Do you have to have a six-digit numeric code that
is human readable / enterable?  I would just convert the whole SSN to
a 4-byte (32bit) binary number, and store it as if it was character
data, or store it as an unsigned long integer.  If it has to be human
readable, consider replacing some (or all) of the digits with letters,
or letters/numbers.  Six characters of alpha gives you many more
combinations than the original 9 numeric characters.
Return to Top
Subject: The equation f(n)=n-f(f(n-1))
From: Stan Armstrong
Date: Wed, 30 Oct 1996 10:57:36 +0000
10 days or so ago a thread was started on this equation here or in
algebra help.  The whole thread has been expired and regrettably I find
I din not save it.  So please forgive the cross posting (if I can work
out how to do it!).
I saw the original post and one reply, which introduced Fibonacci
numbers to the problem but, IIRC, did not complete the solution.
In discussions with a colleague, Rod Gibson, I have concluded that
f(n)=INT((n+1)/g) where g is the golden ratio, (sqrt(5)+1)/2, implicit
in Fibonacci numbers.  At least it is something like it.  He has tested
the residuals without the INT up to n = 1 000 000
Although not sufficiently rigorous to be called a proof, the reasoning
goes as follows.
I propose a function Fib(n) which represents an integer as a quasi
binary string (qb) decomposing n into F numbers.  Thus 27 which equals
21+5+1 would be represented as 10010010.  (The last zero comes from the
duplication of 1 in the sequence. Changing the representation to end in
01 does not have a dramatic effect on the process.) A second function
Trun(qb) drops off the last digit in the qb and then we have an inverse
for Fib which for convenience I shall call Bif(qb).
Multiplying a Fibonacci number by g gives as the nearest integer the
next F number and dividing the previous one, since F(n)=g^n+(-g)^(-n),
(I'm quoting this from memory) so the residuals oscillate and diminish
regularly.  I suggest that the original f(n) is Bif(Trun(Fib(n+1))) in
that each of the Fs is replaced by the next one down, equivalent to
multiplying each term and therefore the sum by g.
If the original posters could email me their contributions I would
review the above against their observations, which I have perhaps
remembered ill.
-- 
Stan Armstrong
Return to Top
Subject: Re: SVD
From: Konrad Hinsen
Date: 30 Oct 1996 10:58:52 +0000
jpc@a.cs.okstate.edu (John Chandler) writes:
> >1) The algorithms used in SVD are stable (more so than other matrix
>                                            ^^^^^^^      ^^^^^
> >   algorithms).
> 
> 
> "other" is very vague, but even so I disagree with this evaluation.
"other" means what non-experts tend to be familiar with, i.e.
factorization-based methods for solving linear equations.
> No competent practitioner would think of forming the normal equations
> for any least squares problem that could be ill-conditioned
> (which is most of them).
Unfortunately most least-squares problems are solved by people
without any special competence in this business. One important example
from my field (computational chemistry) is fitting point charges at
known positions to electrostatic potential values at some reference point.
Although this can be called a standard technique by now and has been
done by probably hundreds of people, the most commonly used program
uses normal equations. And even though people have observed stability
problems, and even considered complicated solution strategies, hardly
anyone is aware of SVD or related techniques.
And it was this kind of people that my comment was aimed at...
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq)
From: Konrad Hinsen
Date: 30 Oct 1996 11:04:35 +0000
johnp@amber.math.unm.edu (John Prentice) writes:
> on a RS6000 between Fortran 90 and C++.  Fortran 77
> is obsolete and was replaced as both an American and
> an international standard five years ago (and itself
> is about to be replaced as the standard by Fortran 95).  
I don't quite agree with "replaced"; after all the Fortran 77 standard
still exists. More importantly from a practical point of view is that
Fortran 90 compilers are not nearly as widespread as Fortran 77, C, or
C++ compilers. I have accounts on three computer networks in different
scientific institutions around the world. They all have Fortran 77, C,
and C++. Only one has a Fortran 90 compiler, which doesn't work due
to misinstallation, and so presumably has never been used.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq)
From: Konrad Hinsen
Date: 30 Oct 1996 11:07:48 +0000
pausch@electra.saaf.se (Paul Schlyter) writes:
> Why is a Fortran compiler allowed to assume this?
>  
> Consider this piece of code:
>  
>       SUBROUTINE COPY(DOUBLE PRECISION A, DOUBLE PRECISION B, INTEGER N)
>       DIMENSION A(N), B(N)
>       INTEGER I
>       DO 100 I=1,N
>  100  A(I) = B(I)
>       END
>  
>       PROGRAM TEST(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT)
>       DOUBLE PRECISION X(100), Y(10), Z(10)
>       EQUIVALENCE (X(3),Y(1)), (X(1),Z(1))
>       DATA /Z/1,2,3,4,5,6,7,8,9,10/
>       COPY(Y,Z,10)
>       WRITE(*,*) Y
>       END
>  
> This exhibits exacly the same aliasing problem as in C .....
Yes, but there is a little-known rule in the Fortran 77 specification
(citing from http://www.fortran.com/fortran/stds_docs.html):
---------------------------------------------------------------------------
15.9.3.6 Restrictions on Association of Entities.
If a subprogram reference causes a dummy argument in the referenced
subprogram to become associated with another dummy argument in the
referenced subprogram, neither dummy argument may become defined
during execution of that subprogram. For example, if a subroutine is
headed by
SUBROUTINE XYZ (A,B)
and is referenced by 
CALL XYZ (C,C)
the[n the dummy arguments A and B each become associated with the same
actual argument C and therefore with each other. Neither A nor B may
become defined during this execution of subroutine XYZ or by any
procedures referenced by XYZ.
If a subprogram reference causes a dummy argument to become associated
with an entity in a common block in the referenced subprogram or in a
subprogram referenced by the referenced subprogram, neither the dummy
argument nor the entity in the common block may become defined within
the subprogram or within a subprogram referenced by the referenced
subprogram. For example, if a subroutine contains the statements:
  1.SUBROUTINE XYZ (A) 
  2.COMMON C 
and is referenced by a program unit that contains the statements: 
  1.COMMON B 
  2.CALL XYZ (B) 
then the dummy argument A becomes associated with the actual argument
B, which is associated with C, which is in a common block. Neither A
nor C may become defined during execution of the subroutine XYZ or by
any procedures referenced by XYZ.
---------------------------------------------------------------------------
Essentially this means that the code you have shown, although all
compilers I know would accept it, does not conform to the Fortran 77
standard.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to
From: mlkessle@cip.physik.uni-wuerzburg.de (Manuel Kessler)
Date: 30 Oct 1996 11:14:49 GMT
pgh@nortel.co.uk wrote:
:> As another point of comparison. Under LINIX compiling LAPACK with
:> g77 gives benchmark times of about 50% of those from CLAPACK+gcc. 
:> [The README said. I haven't confirmed it.]
:> 
:> If you use LINUX & gcc, f2c may have had its day.
:> 
:> Peter
To spread my own experiences over the world: in conjunction with a project
to develop a set of BLAS routines (assembler-)optimized for intel pentium
i discovered that code produced by g77 (at least for intel platform) for 
the typical routines coming to mind (xDOT, xAXPY and so on) is quite bad.
gcc with straightforward rewritten C-equivalents (link compatible with
FORTRAN) gives typical 20-30% speed increase over the FORTRAN ones, at 
least for short vectors where memory bandwidth is not a problem due to
the builtin cache. See for this some remarks for my assembler written
BLAS routines which are available at my home page (adress see down).
(Assembler beats both C and FORTRAN for short vectors by a factor of 
2-3, but that's another story!)
So, the point is, all results discussed in this thread seem to be VERY
VERY compiler/os/machine dependant, so it's a problem of compiler techno-
logy, not of the language itself. FORTRAN and FORTRAN compilers have been
used for heavy computing since '60 (i think), whereas C was used mostly
for other tasks, and C++ is not even yet standardized. With time going on
C(++)-compilers should get better and better for numerical work, and then
the advantage of much shorter developing time than with FORTRAN 77
gets more important. Don't know about FORTRAN 90(95), but i think if it
has object oriented features as another one wrote, then it's just
slightly different form C++, if you don't look at syntax.
Just my 0.02 DM!
Ciao,
	Manuel
-- 
Manuel Kessler
Graduate Student at the University of Wuerzburg, Germany, Physics Department
SNAIL: Zeppelinstrasse 5, D-97074 Wuerzburg, Germany
EMAIL: mlkessle@cip.physik.uni-wuerzburg.de
WWW: http://cip.physik.uni-wuerzburg.de/~mlkessle
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq)
From: David Kastrup
Date: 30 Oct 1996 10:43:21 +0100
pausch@electra.saaf.se (Paul Schlyter) writes:
  [Someone else wrote]
> > A C compiler must assume that a and b might point to partly overlapping
> > memory spaces. A Fortran compiler may assume that they don't (and I am
> > sure many Fortran programmers are not aware of the consequences of this
> > fact).
>  
> Why is a Fortran compiler allowed to assume this?
>       SUBROUTINE COPY(DOUBLE PRECISION A, DOUBLE PRECISION B, INTEGER N)
[...]
>       END
>  
>       PROGRAM TEST(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT)
>       DOUBLE PRECISION X(100), Y(10), Z(10)
>       EQUIVALENCE (X(3),Y(1)), (X(1),Z(1))
>       DATA /Z/1,2,3,4,5,6,7,8,9,10/
>       COPY(Y,Z,10)
[...]
>       END
> This exhibits exacly the same aliasing problem as in C .....
Yes, but the standards differ.  If you do such folly in Fortran, the
language standard permits the compiler to fall into that trap and
generate bad output.  The C standard demands "correct" behaviour
nonetheless.
So the Fortran standard classifies this as a user problem, whereas the
C standard calssifies this as a compiler problem.  That allows Fortran
to generate more efficient code in cases like this.
Of course this is one reason never to use EQUIVALENCE...
-- 
David Kastrup                                       Phone: +49-234-700-5570
Email: dak@neuroinformatik.ruhr-uni-bochum.de         Fax: +49-234-709-4209
Institut fuer Neuroinformatik, Universitaetsstr. 150, 44780 Bochum, Germany
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq)
From: ags@seaman.cc.purdue.edu (Dave Seaman)
Date: 30 Oct 1996 09:35:42 -0500
In article ,
Konrad Hinsen   wrote:
>pausch@electra.saaf.se (Paul Schlyter) writes:
  [ Example of illegal aliasing in Fortran deleted. ]
>Essentially this means that the code you have shown, although all
>compilers I know would accept it, does not conform to the Fortran 77
>standard.
Although all compilers may accept the code, they don't all give the same
result.  That's the point.
Return to Top
Subject: Partial Differential Eq. HELP
From: Vassilev Mollov
Date: Wed, 30 Oct 1996 14:38:38 +0000
I am desperate to solve the following equation:
d2f/dx2+d2f/dy2=f*a^2 ,where
d2f/dx2 and d2f/dy2 are the second partial derivatives of f(x,y);
a^2=j*b, j=sqrt(-1),b>0;
f(x,y)->0 when x and y->~ ;
f(x,0)=c , c>0;
Thank you very much in advance!
Stefan
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq)
From: bruns@tetibm2.ee.TU-Berlin.DE (Warner Bruns)
Date: 30 Oct 1996 16:07:59 GMT
In article <555i94$ahb@electra.saaf.se>, pausch@electra.saaf.se (Paul
Schlyter) writes:
> Consider this piece of code:
>  
>       SUBROUTINE COPY(DOUBLE PRECISION A, DOUBLE PRECISION B, INTEGER N)
>       DIMENSION A(N), B(N)
>       INTEGER I
>       DO 100 I=1,N
>  100  A(I) = B(I)
>       END
>  
>       PROGRAM TEST(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT)
>       DOUBLE PRECISION X(100), Y(10), Z(10)
>       EQUIVALENCE (X(3),Y(1)), (X(1),Z(1))
>       DATA /Z/1,2,3,4,5,6,7,8,9,10/
>       COPY(Y,Z,10)
>       WRITE(*,*) Y
>       END
>  
> This exhibits exacly the same aliasing problem as in C .....
>  
> -- 
> ----------------------------------------------------------------
> Paul Schlyter,  Swedish Amateur Astronomer's Society (SAAF)
> Grev Turegatan 40,  S-114 38 Stockholm,  SWEDEN
> e-mail:  pausch@saaf.se        psr@home.ausys.se
 1.)
   This is not Fortran,
 2.)
   The Fortran equivalent would be:
      SUBROUTINE COPY(A, B, N)
      DOUBLE PRECISION A, B
      INTEGER N
      DIMENSION A(N), B(N)
      INTEGER I
      DO 100 I=1,N
 100  A(I) = B(I)
      END
      PROGRAM TEST
      DOUBLE PRECISION X(100), Y(10), Z(10)
      EQUIVALENCE (X(3),Y(1)), (X(1),Z(1))
      DATA /Z/1,2,3,4,5,6,7,8,9,10/
      call COPY(Y,Z,10)
      WRITE(*,*) Y
      END
 and this Fortran equivalent is illegal.
 It is just ILLEGAL to call a subprogram that modifies its arguments
 in this way.
 You are just not allowed to do this.
 Warner Bruns
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq)
From: shenkin@still3.chem.columbia.edu (Peter Shenkin)
Date: 30 Oct 1996 16:30:48 GMT
In article ,
David Kastrup   wrote:
>shenkin@still3.chem.columbia.edu (Peter Shenkin) writes:
>
>> However, if the C code were written as follows, the compiler would
>> know that x[] and y[] cannot overlap:
>> 
>> void sizpy1( const int n, const float alpha, const float x[], float y[] ){
>> 	int i;
>> 	for( i=0; i> 		y[ i ] += alpha * x[ i ];
>> 	}
>> }
>> 
>> I also const-qualified n and alpha, but it's the const qualification of
>> x[] that gives the compiler the information it needs -- namely, that
>> no part of x[] will be written to.
>
>Sorry, no payoff.  It just tells the compiler that the user is not
>supposed to be varying the y array via the parameter y, but it does
>not tell the compiler that there might be no other path via which it
>might modify the array.
On reflection, I believe you are right.  Unfortunately.
	-P.
-- 
****************** In Memoriam, Bill Monroe, 1911 - 1996 ******************
* Peter S. Shenkin; Chemistry, Columbia U.; 3000 Broadway, Mail Code 3153 *
** NY, NY  10027;  shenkin@columbia.edu;  (212)854-5143;  FAX: 678-9039 ***
MacroModel WWW page: http://www.cc.columbia.edu/cu/chemistry/mmod/mmod.html
Return to Top
Subject: Re: Help! Numerical libraries in C/C++
From: "Dann Corbit"
Date: 30 Oct 1996 17:35:29 GMT
Ajay Shah's C/C++ Numerical Resources FAQ:
ftp://usc.edu/pub/C-numanal/numcomp-free-c.gz
ftp://ftp.math.psu.edu/pub/FAQ/numcomp-free-c
or c/numcomp-free-c on netlib (slightly outdated).
Also see the last item on http://www.math.psu.edu/OtherMath.html
Paul A Mathew  wrote in article
...
> Hello all:
> Can someone give me info on numerical libraries written in C/C++, which
> are public domain.
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq)
From: Konrad Hinsen
Date: 30 Oct 1996 18:36:43 +0100
ags@seaman.cc.purdue.edu (Dave Seaman) writes:
>   [ Example of illegal aliasing in Fortran deleted. ]
> 
> >Essentially this means that the code you have shown, although all
> >compilers I know would accept it, does not conform to the Fortran 77
> >standard.
> 
> Although all compilers may accept the code, they don't all give the same
> result.  That's the point.
Worse, they *will* give the same result for simple cases like the one
shown, but not in more complicated cases. Meaning that people can program
in Fortran for years before being hit.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------
Return to Top
Subject: List of On-Line Books
From: Mark Griskey
Date: Wed, 30 Oct 1996 10:55:57 -0800
The following URL will take you to a list of on-line books on
mathematics and Statistics:
http://www.nap.edu/readingroom/enter2.cgi?SA.html
These books are on-line and in thier entirety.  They are free for the
reading. This is in the "Reading Room" section of the National Academy
Press, the publisher for the National Academy of Sciences, the National
Research Council, and the Institute of Medicine, website. There are more
than 1000 books on-line.  The home page URL is:
http//www.nap.edu
there is also a low-bandwidth version of the site for text browsers or
slower connections:
http://www.nap.edu/low/
Return to Top
Subject: Re: PRIME NUMBER UPTO 2^64 on CDROM?
From: "Dann Corbit"
Date: 30 Oct 1996 19:04:21 GMT
As x gets large pi(x) is approximately x/log(x).
see http://www.utm.edu/research/primes/howmany.shtml#pi_def
That gives about 415,828,534,307,635,078 (415 Quadrillion) primes.
Multiply by 64 bits per prime number gives an even larger number than
storing the individual bit positions as prime/not-prime.  Plus those 
primes themselves would not compress very well at all.
Malcolm MacLeod  wrote in article
<55797a$7bb@henge2.henge.com>...
> >>Colbert  wrote in article
> ><53c8bj$jig@decius.ultra.net>...
> >> I am currently looking of the list of ALL prime number upto 2^64.   I 
> >> know that some poeple working with supercomputers have had their machines
> >> compute new prime numbers around 2^11000.
> >> What I would like to know is whether somebody has effectively recorded 
> >> these prime numbers on some sort of media.   A CDROM with prime number 
> >> only would be nice.
> 
> "Dann Corbit"  wrote:
> >I don't think all of the primes up to 2^64 will fit on one CD-ROM.
> >That's 18,446,744,073,709,551,616 (18 quintillion) bits. 
> 
> I'm not sure I agree that it is impossible.  Very difficult,
> certainly... but technical data management is my specialty.
> I think I could find a way to cncode most of them onto a CDROM.
> As the numbers get bigger, the primes get farther apart.  That helps.
> So... just how many primes are there below 2^64?
> 
> 
Return to Top
Subject: Re: Parameterization of a PSD matrix
From: Robin Becker
Date: Wed, 30 Oct 1996 17:00:43 +0000
In article <5562oo$geq@nnrp3.farm.idt.net>, Walter Prahl
 writes
>Is there a way to uniquely parameterize all NxN positive semidefinite 
>matrices for a given N?  I want to find the PSD matrix that optimizes 
>a certain function, so I need to parameterize the space of all NxN PSD
>matrices.  If I map my parameter vector directly to the N*(N+1)/2 
>elements of a lower triangular matrix G then GG' is PSD, but this
>parameterization is not unique: G is a matrix square root, and is not 
>unique.  Therefore, I suspect that fewer than N*(N+1)/2 parameters are 
>needed to span the space of all NxN PSD matrices.  I seem to need a 
>sort of inverse Cholesky factorization.
>
>Any comments or pointers would be greatly appreciated.
There's a whole field of optimisation devoted to this optimisation
problem. Check out http://www.zib.de/helmberg/semidef.html
-- 
Robin Becker
Return to Top
Subject: N: Math routines (mainly for Object/Borland Pascal) on CDROM or 'good' web-sites
From: landauf@adis.at (Gerhard Landauf)
Date: Wed, 30 Oct 1996 20:59:00 GMT
Hi there !
Can anybody give me the titles of CDROMs featuring math routines for
Object/Borland Pascal (preferably those WITH their source codes)
and/or send me any interesting math web-site.
I personally work with Borland Delphi 2.0 and am looking for almost
any math unit or routine available for numerical analysis, number
theory and especially 'infinite precision (decimal) operations'.
Of course sites with similar topics are also warmly welcome.
I plan to open a math site with links to those sites in the near
future.
Please add - if available - a short description to each CDROM title or
web-site.
And those reading the various German newsgroups I posted this message
to, please forgive me for sending it in English. However I'm sure that
those German guys have all a pretty good command of the English
language.
Please send your reply via email ONLY (as I do not regularly visit all
these newsgroups and replies always tend to get lost miraculously).
My email address is:
landauf@adis.at
THANK YOU VERY MUCH ! 
Return to Top
Subject: Matlab for real time control?
From: Bernt Lie
Date: 30 Oct 1996 19:26:34 GMT
Hi
Q1: Is there available *commercial* drivers for AD/DA converters, such
    that it is possible to read measurements and write control outputs
    within a Matlab session?
Q2: Is it possible to start a (control) routine within a Matlab session
    as a cyclic task such that it is ran with a given frequency?
    (To be used for a slow lab process with time constant ca. 1/2 hour;
    I don't want to waste CPU capacity.)
Thanks for your help
-Bernt Lie
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to
From: nmm1@cus.cam.ac.uk (Nick Maclaren)
Date: 31 Oct 1996 00:30:35 GMT
In article ,
John Turner   wrote:
>nmm1@cus.cam.ac.uk (Nick Maclaren) writes:
>
>> In article <54pdmf$kv9@news.nyu.edu>,
>> Paul J. Gans  wrote:
>> >Jeff Candy (candy@mildred.ph.utexas.edu) wrote:
>> >
>> >: The speed of C code versus FORTRAN code depends most strongly (given 
>> >: identical coding algorithms) on the compiler.  For example, the AIX 
>> >: FORTRAN compiler (IBM) is far superior to the fort77/f2c (gnu) compiler 
>> >: in the UNIX/LINUX distribution.
>> >
>> >Not a fair comparison.  f2c translates FORTRAN into C accurately,
>> >but with great loss of efficiency.  Fort77 is still a beta compiler.
>> 
>> I agree, but the beta status or otherwise is irrelevant.  The fact is
>> that ANY translation via C will be inefficient, because there is no way
>> in C to specify when pointers or data structures can be assumed not to
>> be aliased.  If and when fort77 translates into the new GNU intermediate
>> code, it will be possible to compare it and other compilers.
>
>Please note that g77 does *NOT* translate to C first, as some seem to
>think.
>
>To quote a post some time ago by someone else in response to a similar
>question:
>
>GNU FORTRAN compiles directly to object code but uses the back-end from
>gcc to generate code.  This is a similar arrangement to that used by most
>modern vendor-supplied compilers where front-ends for different languages
>use a common back-end for optimization and code generation.  The GNU
>back-end knows how to exploit superscalar architectures although the
>quality of the output code may very somewhat from that of a vendor-supplied
>compiler.
Sorry - I was being unclear.  The back end from gcc was designed for C
and, despite the fact that it does some optimisations for so-called
superscalar architectures, is still basically a C back end.  The new
intermediate code that I was referring to was the glint in the eye of
various GNU people about a major enhancement that would make use of the
higher-level information that is available from languages like Fortran.
I have no idea whether the code I am referring to will ever emerge, or
is even still "on the list".
Nick Maclaren,
University of Cambridge Computer Laboratory,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email:  nmm1@cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679
Return to Top
Subject: BFGS variable metric question
From: Jive Dadson
Date: Wed, 30 Oct 1996 17:34:15 +0000
Greetings Gurus!
I am developing software that requires non-linear multi-variate function
minimization. I've been using the Boyden-Fletcher-Goldfarb-Shanno variant
of the variable metric or "quasi-Newton" method from _Numerical Recipes In C_.
(Actually they call it "dfpmin", for Davidon-Fletcher-Powell, but it uses
the BFGS update rule.) I'm using that routine because for the problems
I'm working on, it is the fastest I've found -- when it works.
It has a couple of problems which I have been able to work around, but
I wonder if someone could tell me if I've done the best hack job on it.
I freely confess I don't know much about this subject.
One problem is in the line-search routine it uses. The search is not
intended to find the minimum along the line, but rather a point that is
a "good enough" improvement. Problem is, it very often fails even using
double precision. The documentation says that happens when the data is
"poorly scaled", but that's not it. It seems to happen most often when
the data is real noisy. The original code has a rather rude way of dealing
with the failure: It calls "exit". Obviously that is unacceptable.
I replaced the call to "exit" with a call to a more robust, exact
line-search routine.
The other problem is that the approximation to the Hessian matrix that
the BFGS routine builds very often becomes non-positive-definite.
I don't know why that happens, but when it does, the routine stops,
often at a bad local minimum. I hacked around that as follows: Where
the routine previously exited, I put in code to invert the matrix using
Chlomsky decomposition. If that fails, I restart the algorithm with
the Hessian approximation set back to the identity matrix, so the
routine starts over with a gradient-descent step. That seems to have
fixed that problem. Does anyone know why the Hessian approximation
might be collapsing like that? Is there a better way to fix the algorithm?
Finally, I am taking advantage of the approximate Hessian the routine
builds, using it to estimate likelihoods for models. To assure that I have
a decent approximation, I have hacked the BFGS routine so it always does
a multiple of N updates, where N is the number of dimensions. Is that
good enough? Would it be good enough just to require that it does
at least N updates?
Thanks much for any light you can shed on the subject.
       J.
Return to Top
Subject: Re: BFGS variable metric question
From: Jive Dadson
Date: Wed, 30 Oct 1996 18:01:32 +0000
I said,
> I put in code to invert the matrix using
> Chlomsky decomposition.
Make that Cholesky decomposition. I don't know where I got "Chlomsky".
      J.
Return to Top
Subject: Re: [Q] Pentium/Pentium Pro optimized routines?
From: Brad Bell
Date: Wed, 30 Oct 1996 19:56:45 -0800
Manuel Kessler wrote:
> 
> Joseph Sirosh (sirosh@cs.utexas.edu) wrote:
> :> HI! Is anybody aware of a source for BLAS routines optimized
> :> for the Pentium and Pentium Pro machines? Or a signal processing
> :> library optimized for these machines? Since these are superscalar
> :> processors, I've heard that proper optimization can greatly improve
> :> the speed of typical vector operations...
> 
> Yes, i am working on this kind of thing. At now, only a subset of BLAS
> level 1 is working, exactly ddot, sdot, dcopy, scopy, dnrm2, snrm2,
> daxpy, saxpy. Depending on the amount of data, especially whether coming
> from 1st or 2nd level cache or from main memory, expect a 50-300% speed
> increase on a system comparable to mine (P-133, 256k pipelined burst,
> 32M EDO+32M FPM). I have no idea about performance on PPro, but should
> work also a lot better than original FORTRAN routines. Check out my
> home page for a version of the library for use with djgpp and some
> preliminary results. If you need it for a different compiler and/or have
> suggestions where to improve further, feel free to email me directly.
> But always have in mind that this is ALPHA code, so there might be some
> still undetected bugs.
> 
> Ciao,
>         Manuel
> 
> --
> Manuel Kessler
> Graduate Student at the University of Wuerzburg, Germany, Physics Department
> SNAIL: Zeppelinstrasse 5, D-97074 Wuerzburg, Germany
> EMAIL: mlkessle@cip.physik.uni-wuerzburg.de
> WWW: http://cip.physik.uni-wuerzburg.de/~mlkessle
	I was told that O-Matrix uses a library supplied by Intel
that includes special BLAS routines. Try contacting Harmonic Software
at harmonic@world.std.com or http://world.std.com/~harmonic
for more information. This is how they 
get thier matrix multiply to be much faster than competing software.
Return to Top
Subject: TI-92
From: Dan Butler
Date: Wed, 30 Oct 1996 21:04:49 -0800
Does anyone know of a newsgroup relating to TI calculators.  Looking to 
exchange programs.....
Thanks in advance.
Return to Top
Subject: Re: Can anyone help with a quick triangulation optimisation.
From: lpa@netcom.com (Pierre Asselin)
Date: Thu, 31 Oct 1996 03:15:40 GMT
Visual@dial.pipex.com (Mike Armstrong) writes:
>In short, does anyone have a real quick routine to calculate the angle
>at B of the line ABC?
Is this for the swap test on edge AC?  You don't need angles.
>Q2
>[Pocket of excavated dirt modeled as two triangulated surfaces,
> one for the bottom of the hole and one for the top]
>In order to get the volume of the hole I currently merge the 2
>triangulations by calculating all the points where the vertices
>intercept.  I then use these points to split the lower triangulation
>into a non-delaunay set which represents both sets accurately.
>The trouble is that this method is soooo slooooww.
Why merge?  You have a triangulated surface z=f(x,y) representing
the bottom of the hole an another surface z=g(x,y) representing the
top.  f and g are piecewise linear functions on their respective
meshes.  Just calculate
    V = (integral g dx dy) - (integral f dx dy)
one surface at at time, each on its own mesh.
-- 
--Pierre Asselin, Westminster, Colorado
  lpa@netcom.com
  pa@verano.sba.ca.us
Return to Top
Subject: Windows version of laTex?
From: ez062761@rocky.ucdavis.edu (Mike Henry)
Date: 30 Oct 1996 22:10:48 GMT
I am looking for a good mathematical word processor like laTex, but for
Win 3.1.  Shareware preferred, any ideas?
-- 
-------------------------------------------------------------------------------
mhenry@gauss.math.ucdavis.edu			Michael L. Henry
mlhenry@ucdavis.edu				Mathematics Department
Return to Top
Subject: Numerical Analysis Project
From: llefton@math.uno.edu (Lew Lefton)
Date: Thu, 31 Oct 1996 09:31:28 GMT
I'm teaching an advanced undergraduate/introductory graduate level
numerical analysis course out of Burden and Faires this fall, and I
was looking for a final project to assign to the class.  We've covered
root finding, interpolation, differentiation, quadrature, and linear
algebra (numerical DE's and other topics will be covered next spring).
I'd appreciate any suggestions or pointers to further resources.
Thanks,
Lew Lefton
llefton@math.uno.edu
(504) 280-7441
Department of Mathematics
University of New Orleans
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to Schrodinger's Eq)
From: molagnon@ifremer.fr (Michel OLAGNON)
Date: 31 Oct 1996 09:10:18 GMT
In article <555i94$ahb@electra.saaf.se>, pausch@electra.saaf.se (Paul Schlyter) writes:
>In article ,
>Konrad Hinsen   wrote:
> 
>> wayne@cs.toronto.edu (Wayne Hayes) writes:
>> 
>> > Hmmm, as long as I stick to arrays (not pointers, but arrays), and
>> > scalars, I can't think of a case where aliasing would be more of a
>> > problem in C than FORTRAN.  Can you give an example?
>> 
>> Arrays are just pointer constants in C, so you can't avoid them when
>> e.g. calling subroutines. A trivial aliasing example in C is
>> 
>> void copy(double *a, double *b, int n)
>> {
>>    int i;
>>    for (i = 0; i < n; i++)
>>        *a++ = *b++;
>> }
>> 
>> A C compiler must assume that a and b might point to partly overlapping
>> memory spaces. A Fortran compiler may assume that they don't (and I am
>> sure many Fortran programmers are not aware of the consequences of this
>> fact).
> 
>Why is a Fortran compiler allowed to assume this?
> 
From paragraph 12.5.2.9 of the standard:
"Note that if there is partial or complete overlap between the actual 
arguments associated with two different dummy arguments of the same procedure,
the overlapped portions must not be defined, redefined, or become undefined
during the execution of the procedure."
Michel
-- 
| Michel OLAGNON                       email : Michel.Olagnon@ifremer.fr|
| IFREMER: Institut Francais de Recherches pour l'Exploitation de la Mer|
| Centre de Brest - B.P. 70                     phone : +33-02-9822 4144|
| F-29280 PLOUZANE - FRANCE                     fax   : +33-02-9822 4135|
| http://www.ifremer.fr/ditigo/molagnon/molagnon.html                   |
Return to Top
Subject: Re: Matlab for real time control?
From: courtois@massy.inra.fr (Francis COURTOIS)
Date: Thu, 31 Oct 1996 10:10:31 +0200
In article <558a5a$v95@dole.uninett.no>, Bernt Lie  wrote:
>Hi
>
>Q1: Is there available *commercial* drivers for AD/DA converters, such
>    that it is possible to read measurements and write control outputs
>    within a Matlab session?
>
Yes, dSpace cards all have matlab drivers. Ask your retailer.
>Q2: Is it possible to start a (control) routine within a Matlab session
>    as a cyclic task such that it is ran with a given frequency?
>    (To be used for a slow lab process with time constant ca. 1/2 hour;
>    I don't want to waste CPU capacity.)
Yes, we do that on microfiltration pilot. We have written (in C as mex
files) a serial communication library for Matlab. It works very well and it
is painless since you develop your alg. on matlab and implemnt it... on
matlab !
-- 
Francis
===================================================================
Dr. Francis COURTOIS              I      ENSIA - INRA
Assistant Professor               I      1, avenue des Olympiades
Food Process Control Lab.         I      91744 MASSY Cedex
Food Engineering Department       I      FRANCE
----------------------------------I      Tel : (33) (0)1 69 93 51 29
email : courtois@ensia.inra.fr    I      Fax : (33) (0)1 69 93 51 85
===================================================================
Return to Top
Subject: Census Problem
From: Jody Abrams
Date: Thu, 31 Oct 1996 06:43:11 GMT
I have a question for anyone who can figure it out. If you can figure the problem out 
I would be most grateful. My friend and I have been working on it for sometime and 
have not yet learened the answer. 
The problem is: 
The government census bureau is preparing to take the census of the United States in 
the year 2000, and you have been hired to help them plan for counting of the American 
population. Your job is to make a projection of the population so that the bureau 
will know how many census takers to hire.
Your director, Dr. John Knowitall, wants you to proceed as follows. He wants you to 
use the actual population data from 2 consecutive polls. He wants you to find a 
quadratic function that models the population as a function of time and agrees with 
the actual populations and the rates of growth of the two polls.
a.    Your first task in this project is to show Dr. Knowitall that in general it is 
impossible to find such a function. To do this, let t------0 be the year of the first 
poll, and let t1 be the year of the second poll. Also let po  and p1 denote the 
population values from the polls and let r0 and r1 denote the rates of the growth 
from the two polls. To simplify your computations, write your polynomial in the 
variable t-t0. ( If you do not think this really does simplify the arthmetic, repat 
part (a) using a polynomial in the variable t and see what kind of computations are 
needed )
Being the resourceful person that you are, you realize that the difficulty was caused 
by the fact the the quadratic function was a polynomial of too low a degree to allow 
you to include all the information that Dr. Knowitall wants.
b.     Show tha by increasing the degree of the polynomial to three, it is always 
posible to fit the data to anew polynomial (the is, to find a polynomial that agrees 
with the populations and the rates of growth of any two polls)
c. After completing parts (a) and (b), use the actual census datat below along with 
your results from part (b) to find popualtion functions for each pair of consecutive 
poll data. Use this to project the population of the United States for 2000, as 
follows. First use your polynomial modeling function for each two consecutive polls 
to project the population of the succeeding census and compare the results to the 
actual census taken. Use all this information to make your projection for the year 
2000. How confident are you of your projection? Discuss why. 
Well that is the problem that has been bothering my friend and I for some time now. 
We just seem to be missing a part of it. If you can figure it out or any part of it 
e-mail me at  jabrams@linknet.net   
Thankyou very much
Jody Abrams
Return to Top
Subject: [Q] How can I get an argorithm of SVD?
From: sashida@ae.keio.ac.jp (Hideo Sashida)
Date: 31 Oct 1996 12:04:11 GMT
Hi.
I'm looking for a singular value decomposition algorithm.
How can I get an arigorithm of SVD?
Please tell me.
tks.
---
Hideo Sashida 
Return to Top
Subject: Re: [Q] How can I get an argorithm of SVD?
From: sashida@ae.keio.ac.jp (Hideo Sashida)
Date: 31 Oct 1996 12:21:53 GMT
Self-following.
Hideo> Hi.
Hideo> I'm looking for a singular value decomposition algorithm.
Hideo> How can I get an arigorithm of SVD?
Hideo> Please tell me.
I'm looking for a SVD algorithm in C based on code.
---
hideo
Return to Top
Subject: Re: Using C for number-crunching (was: Numerical solution to
From: gans@scholar.nyu.edu (Paul J. Gans)
Date: 31 Oct 1996 04:32:19 GMT
Jeff Candy (candy@mildred.ph.utexas.edu) wrote:
: me:
: 
: > The speed of C code versus FORTRAN code depends most strongly (given 
: > identical coding algorithms) on the compiler.  For example, the AIX 
: > FORTRAN compiler (IBM) is far superior to the fort77/f2c (gnu) compiler 
: > in the UNIX/LINUX distribution.
: 
: Paul J. Gans:
: 
: >> Not a fair comparison.  
: 
: Admittedly; but whether or not it is "fair", it is a reality faced by 
: anyone porting code from an RS6000 to a linux box.  
: 
: >> f2c translates FORTRAN into C accurately, but with great loss of 
: >> efficiency.  Fort77 is still a beta compiler.
: 
: fort77 uses f2c.
Right.  My mind degenerates.  What is the name of the (beta)
FORTRAN compiler?  g77?
You are quite right about the realities.  But the "realities"
go further than that.  No one has infinite money.  If one is 
running linux on an Intel box, one is not going to get super 
high speed in floating point no matter what.  If one is running 
on an alpha, it is quite probably because one cannot affort the 
"official" operating system and compilers.
For me, running linux and using C on an Intel box is a win
because (a) I can't really afford much else and (b) my
programs are mainly integer, not floating point.  Of
course, this is a special case and not generally applicable.
    ------ Paul J. Gans   [gans@scholar.chem.nyu.edu]
Return to Top
Subject: discrete hankel transforms
From: msh@holyrood.ed.ac.uk ( Mark Higgins)
Date: 30 Oct 1996 10:15:29 GMT
I currently have the hankel transform that uses lagged and related
convolutions form NETLIB, (TOMS/588) but this seems to rely on using a
external genarating funtion for the data to be transformed.  I can
create a function wich fitted some spline to my data thus simulating a
continuons function to be transformed
My questions are --> 
anyone have experience of doing this for discrete
data, and does it work ok ?
and anyone have a discrete hankel transform that will work from a
discrete series ?
apologies if these are daft questions, only just graduated from FFTs to
hankel transforms.
Ta
	Mark
--
                    ,,,
                   (o o)
       ________o00__( )__00o_______________________________
          msh@ed.ac.uk           Mark Higgins 	 =>:o} 
Return to Top
Subject: Number Sets from Digital Storage Scopes?
From: john@wd1v.mv.com (John D. Seney, WD1V, LeCroy T&M; 800.553.2769)
Date: Thu, 31 Oct 1996 13:12:00 GMT
Is anyone aware of a "standard" data type for waveforms?
This information request is for possible inclusion in my
digital storage scope.faq.
Its on my home page or send me an Email that has "SUBSCRIBE"
on the subject line. 
Best regards,
John D. Seney
http://www.mv.com/ipusers/wd1v
Return to Top
Subject: Re: BFGS variable metric question
From: Hans D Mittelmann
Date: Thu, 31 Oct 1996 07:43:27 -0700
Jive Dadson wrote:
> 
> Greetings Gurus!
> 
> I am developing software that requires non-linear multi-variate function
> minimization. I've been using the Boyden-Fletcher-Goldfarb-Shanno variant
> of the variable metric or "quasi-Newton" method from _Numerical Recipes In C_.
> (Actually they call it "dfpmin", for Davidon-Fletcher-Powell, but it uses
> the BFGS update rule.) I'm using that routine because for the problems
> I'm working on, it is the fastest I've found -- when it works.
> 
> It has a couple of problems which I have been able to work around, but
> I wonder if someone could tell me if I've done the best hack job on it.
> I freely confess I don't know much about this subject.
> 
> One problem is in the line-search routine it uses. The search is not
> intended to find the minimum along the line, but rather a point that is
> a "good enough" improvement. Problem is, it very often fails even using
> double precision. The documentation says that happens when the data is
> "poorly scaled", but that's not it. It seems to happen most often when
> the data is real noisy. The original code has a rather rude way of dealing
> with the failure: It calls "exit". Obviously that is unacceptable.
> I replaced the call to "exit" with a call to a more robust, exact
> line-search routine.
> 
> The other problem is that the approximation to the Hessian matrix that
> the BFGS routine builds very often becomes non-positive-definite.
> I don't know why that happens, but when it does, the routine stops,
> often at a bad local minimum. I hacked around that as follows: Where
> the routine previously exited, I put in code to invert the matrix using
> Chlomsky decomposition. If that fails, I restart the algorithm with
> the Hessian approximation set back to the identity matrix, so the
> routine starts over with a gradient-descent step. That seems to have
> fixed that problem. Does anyone know why the Hessian approximation
> might be collapsing like that? Is there a better way to fix the algorithm?
> 
> Finally, I am taking advantage of the approximate Hessian the routine
> builds, using it to estimate likelihoods for models. To assure that I have
> a decent approximation, I have hacked the BFGS routine so it always does
> a multiple of N updates, where N is the number of dimensions. Is that
> good enough? Would it be good enough just to require that it does
> at least N updates?
> 
> Thanks much for any light you can shed on the subject.
> 
>        J.
Hi,
what you point out is very typical for the "recipe"-like approaches.
They are just that. The difficulties start as soon as one tries to solve
a slightly more involved example. You may peruse one of the public
domain BFGS codes, either to modify your own or to replace it. I suggest
starting with DOMIN or DOMIN_C, or toms/611 which could probably also be
easily converted to C. Both are listed in the unconstrained section of
 http://plato.la.asu.edu/guide.html
Hope that helps,
-- 
Hans D. Mittelmann			http://plato.la.asu.edu/
Arizona State University		Phone: (602) 965-6595
Department of Mathematics		Fax:   (602) 965-0461
Tempe, AZ 85287-1804			email: mittelmann@asu.edu
Return to Top
Subject: Re: [Q] How can I get an argorithm of SVD?
From: Hans D Mittelmann
Date: Thu, 31 Oct 1996 07:47:11 -0700
Hideo Sashida wrote:
> 
> Hi.
> 
> I'm looking for a singular value decomposition algorithm.
> How can I get an arigorithm of SVD?
> Please tell me.
> 
> tks.
> ---
> Hideo Sashida 
Hi,
it would be best if you would also mention if you have a language
preference. I suggest starting with the algorithms listed at the
beginning of the lsq section (least squares) of
   http://plato.la.asu.edu/guide.html
-- 
Hans D. Mittelmann			http://plato.la.asu.edu/
Arizona State University		Phone: (602) 965-6595
Department of Mathematics		Fax:   (602) 965-0461
Tempe, AZ 85287-1804			email: mittelmann@asu.edu
Return to Top
Subject: Re: [Q] How can I get an argorithm of SVD?
From: Hans D Mittelmann
Date: Thu, 31 Oct 1996 08:02:10 -0700
Hideo Sashida wrote:
> 
> Self-following.
> 
> Hideo> Hi.
> 
> Hideo> I'm looking for a singular value decomposition algorithm.
> Hideo> How can I get an arigorithm of SVD?
> Hideo> Please tell me.
> 
> I'm looking for a SVD algorithm in C based on code.
> ---
> hideo
Hi again,
if you want to use C, one way is to implement the CLAPACK library
giving you more than you will ever need in linear algebra routines. It
is at netlib, of course. It seems DGESVD what would be the appropriate
routine in LAPACK with its dependencies alone is not available for C
only in Fortran. In C you have to implement the library.
Other possibilites are:
  svd.c.Z   supposedly in pub/C-numanal on usc.edu
  svdpackc also at netlib if your matrix really is big
  the meschach library in "c" on netlib
-- 
Hans D. Mittelmann			http://plato.la.asu.edu/
Arizona State University		Phone: (602) 965-6595
Department of Mathematics		Fax:   (602) 965-0461
Tempe, AZ 85287-1804			email: mittelmann@asu.edu
Return to Top
Subject: Re: [Q] How can I get an argorithm of SVD?
From: Hans D Mittelmann
Date: Thu, 31 Oct 1996 08:25:12 -0700
Hideo Sashida wrote:
> 
> Hi.
> 
> I'm looking for a singular value decomposition algorithm.
> How can I get an arigorithm of SVD?
> Please tell me.
> 
> tks.
> ---
> Hideo Sashida 
Hi again,
I have to correct myself. If what you want is really just the SVD then
you can get it isolated from CLAPACK:
   http://www.netlib.org/cgi-bin/netlibget.pl/clapack/double/dgesvd.c
If, however, you want to solve a LS problem or do something else you may
want to similarly get appropriate other routines from CLAPACK.
-- 
Hans D. Mittelmann			http://plato.la.asu.edu/
Arizona State University		Phone: (602) 965-6595
Department of Mathematics		Fax:   (602) 965-0461
Tempe, AZ 85287-1804			email: mittelmann@asu.edu
Return to Top
Subject: Re: PRIME NUMBER UPTO 2^64 on CDROM?
From: bp887@FreeNet.Carleton.CA (Angel Garcia)
Date: 1 Nov 1996 09:35:29 GMT
Malcolm MacLeod (mmacleod@henge.com) writes:
>>>Colbert  wrote in article
>><53c8bj$jig@decius.ultra.net>...
>>> I am currently looking of the list of ALL prime number upto 2^64.   I 
-----
>>That's 18,446,744,073,709,551,616 (18 quintillion) bits. 
> 
> I'm not sure I agree that it is impossible.  Very difficult,
> certainly... but technical data management is my specialty.
> I think I could find a way to cncode most of them onto a CDROM.
> As the numbers get bigger, the primes get farther apart.  That helps.
> So... just how many primes are there below 2^64?
>      
Silly question !: Nobody knows exactly how many primes below 2^64
but if you look for approximate number... then the answer is so ridiculously
trivial that I don't dear to post it... just look to any elementary
book on Number Theory before seriously questioning about such serious
enterprise (very sound, indeed) as to put in CDrom any set of primes.
--
Angel, secretary (male) of Universitas Americae (UNIAM).
     http://www.ncf.carleton.ca/~bp887
Return to Top
Subject: Re: non-linear equation solving
From: Hans D Mittelmann
Date: Fri, 01 Nov 1996 06:27:46 -0700
Thomas Helander wrote:
> 
> We are presently trying to solve a system of non linear equations using
> Newtons method. In principal the system looks like this:
> 
> F(C'',C')=(A-(dt/2)B'')C'' -R''(dt/2) -(A+(dt/2)B')C' +R'(dt/2) = 0
> 
> where C"= C(x,t2) C'=(x,t1) etc..
> x is space coordinate
> t is the time, dt the timestep.
> A is the mass matrix
> B is the stiffness matrix
> R is a matrix
> 
> Since C is discontinuous in x, the elements of B and R vary discontinuously.
> This seems to cause difficulties when using Newtons method, because it doesn't
> always converge. Instead the sum of squares oscillates between two values. When
> we multiply the Jacobian with a trust factor, the sum of squares decreases,
> however, the oscillations continue.
> 
> We would appreciate any suggestions on how to solve this problem.
> 
>     __         =====================================================
>     ||
>    ====                     Thomas Helander
>    |  |__
>    |  |-.\      Dept. of Materials Science and Engineering
>    |__|  \\     Div. of Physical Metallurgy
>     ||   ||     The Royal Institute of Technology
>   ======__|     S-100 44 Stockholm,Sweden
>  ________||__
> /____________\  Tel. +46 8 7908326      Fax. +46 8 100411
> 
>                 e-mail: thomas@matsc.kth.se
>                ====================================================
Hi,
are you solving your system with Newton or are you doing least squares?
There are zero-finding routines that use only continuity of the solution
such as toms666 at netlib. They may be slow. On the other hand, if you
are doing LS then you could try one of the nonlinear LS codes instead of
applying Newton yourself.
-- 
Hans D. Mittelmann			http://plato.la.asu.edu/
Arizona State University		Phone: (602) 965-6595
Department of Mathematics		Fax:   (602) 965-0461
Tempe, AZ 85287-1804			email: mittelmann@asu.edu
Return to Top

Downloaded by WWW Programs
Byron Palmer