[ut.na] NAgMAg v89 #18

krj@na.toronto.edu (Ken Jackson) (07/23/89)

From:	nagmag%ukc.ac.uk@NSFNET-RELAY.AC.UK
Date:	Mon, 17 Jul 89 14:40:36 EDT
Subject: NAgMAg v89 #18

NAgMAg		Monday,  July 17 1989	Volume 89   Issue 18

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%   The official electronic digest of the NAG Users Association   %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Today's Topics
                   Complementary software product CLAM
                   Answer to Eigenvalue Problem in #15
              Reply to Minimization and Graphics Queries (#17) 
                              Bug in J06HGF
                        Plotting text vertically
                  NAG Official Opening + NAGUA update
               Multiple Precision Arithmetic Package in C

%%
%% I'm off on hols, conferences and NAGUA meetings during the
%% next 6 weeks of so (with sojourns at ukc) -- so expect
%% rather infrequent posting of NAgMAg until the middle of
%% September when normal service should resume.
%% So the main message is keep away from the Lake District
%% during the first two weeks of August cos it's going
%% to rain like mad up there:-)
%%
%% Tim

---------------------------

Date: Mon, 10 Jul 89 14:08:06 EDT
From: tethys!foulser (David Foulser)
      <@yale.edu:tethys!foulser@sca-sun.uucp>
Subject: Complementary software product CLAM


I am writing to let NAG users know of a complementary software product
that can greatly increase productivity in programming with NAG library
routines. This software is CLAM, the Computational Linear Algebra
Machine, developed by Scientific Computing Associates, Inc. in New
Haven, Connecticut, USA.

CLAM is an interactive scientific computing environment with a natural,
matrix-based mathematical syntax. It incorporates a range of advanced
features, including sparse matrix algorithms, seamless integration with
FORTRAN or C subroutine libraries, and powerful graphics that work with
common display environments such as the X Window System and Sun
workstations. CLAM is also a complete programming language augmented
with on-line help and symbolic debugging. CLAM runs on a variety of
UNIX computers.

CLAM's most important use, from the NAG user's point of view, is as an
open system capable of transparently calling NAG subprograms. The
combination of the two products gives interactive computing, dynamic
array allocation and sizing, high-level syntax, workstation graphics,
and the full capabilities of the NAG library.  CLAM's interactive
nature and easy graphics encourage numerical experimentation to find
the best methods and solution techniques, with a minimum of programming
effort.

CLAM is meant to handle large numerical problems. This distinguishes it
from several other products such as Mathematica (primarily symbolic
math) and Matlab (works only with small dense matrix problems), as well
as from numerous "toy" packages not suitable for serious users.

CLAM features sophisticated techniques for factoring and solving large
systems of linear equations and other compute-intensive tasks.  These
sparse matrix techniques allow CLAM to represent and manipulate certain
large arrays efficiently. With these methods, a workstation user can
tackle problems that would otherwise require a supercomputer.

X Windows graphics gives standard access to 2-D line and contour, 3-D
surface, and animation graphics. Also available are SunView,
PostScript, and Impress plotting capabilities.

For more information about CLAM, its host computers, ordering/pricing,
etc., please feel free to send Email, call, or write. Note that
educational users receive large discounts in licensing CLAM.

If there is sufficient interest, I can summarize replies to NAGMAG.

Best regards,

David Foulser, Ph.D.
Research Scientist/Product Manager

foulser%sca-sun.uucp@cs.yale.edu

[USA] (203) 777-7442

Scientific Computing Associates, Inc.
246 Church Street, Suite 307
New Haven, CT 06510
USA



---------------------------

Date:	Thu, 13 JUL 89 14:01:19 GMT
From:	CAROLINE@vax.nag.co.uk
Subject:Answer to Eigenvalue Problem in #15

Further reply to issue 15
-------------------------

re: Accuracy of F02BJF
    ------------------

This is a reply to the question about the accuracy of F02BJF in NAgMAg
#15.  We have corresponded with the person who sent this message to
find out more details of his problem. He is computing the eigenvalues
of a generalized problem

            A x = lambda B x

where, in at least one special case,  A  and  B  have the special
structure:

           x  x
           x  x
           x  x  a
              x  x  a
                 .  .  .
                    .  .  .
                       x  x  a

Here the elements denoted  x  are arbitrary; the diagonal elements
denoted  a are all equal. The corresponding diagonal elements of  B
are also all equal but have a different value  b , say.

It then obvious that the problem has  n-2  real eigenvalues, all with
the same value  a/b, or rather it has one real eigenvalue with
multiplicity  n-2 . And this is the reason for the apparent
inaccuracy.

If  lambda  is a defective eigenvalue of multiplicity  p , then
perturbations in A  and  B  of order  epsilon  will result in
perturbations in  lambda  of order (epsilon)**(1/p) (see Golub and van
Loan, p 203). The routine F02BJF does not recognize the almost lower
triangular structure of the above problem, so the computation has the
effect of introducing perturbations of the order of the machine
precision, and the computed eigenvalues will be perturbed accordingly.

In the user's problem  n  was equal to 19, so the eigenvalue had
multiplicity 17. If the machine precision was roughly 0.1**17, we
should expect the computed eigenvalues to have perturbations of order
0.1; and this will affect both real and imaginary parts.

So the answer to the user's original question is: no, you have not done
anything wrong - nor has F02BJF - but you should be aware of the
sensitivity of your problem.

Jeremy Du Croz and Mishi Derakhshan

---------------------------

Date:	Thu, 13 JUL 89 14:00:38 GMT
From:	CAROLINE@vax.nag.co.uk
Subject:Reply to Minimization and Graphics Queries (#17)

REPLIES TO ISSUE 17
-------------------

re: Minimisation Problem
    --------------------

NAgMAg #17 contained a message from DeKnuydt and Smolders concerning
the use of the Nag library to minimize the function:

function_result =  -  SUM    [N(i)/N] * blog [(N(i)/N)]
		   all i with N(i) <>  0

where N(i)   =   number of occurrences of value i N      =   total
number of occurrences.

The Nag routines  E04JAF,  E04JBF  and  E04VCF  discussed by
DeKnuydt and Smolders are designed for smooth nonlinear
optimization---i.e., they can be expected to work only when the
first and second derivatives of the objective function exist and
are continuous.  The problem described above does not fall into
this category.  The NAG routine E04CCF, based on the Nelder and
Mead polytope method, is intended for problems whose derivatives
are  discontinuous. 

Philip Gill
Mathematics Department, UCSD.

(Philip Gill is one of the contributors to the E04 chapter of the NAG
Library, who has been visiting NAG Ltd for a couple of weeks.)


Re: Bug in NAG Graphics routine J06HGF
    ----------------------------------

I have investigated the problem reported in Issue 17 of the Nag Mag.
There is indeed a bug in NAG graphics routine J06HGF which draws a
perspective view of a three-dimensional histogram, making it impossible
to plot empty labels. The routine removes trailing blanks from any
labels; of course nothing is left when a blank label is provided,
causing the routine to crash.

The problem is not difficult to solve; one line of code needs to be
modified near label 300 in auxiliary routine J06HEY (the routine that
gives the adjustable array dimension error):

  300    JK = LENGTH - JJ
         IF (LEFT) CALL J06YBF(FLOAT(JK)*XD,FLOAT(JK)*YBOX/AN)
C
C        Modify the following line in J06HEY 
C        to ensure that no empty label is plotted 
C        Comment the original line 
C
         IF (JJ .NE. 0) CALL J06YHF(ISTRNG,JJ)
C        CALL J06YHF(ISTRNG,JJ)


Re: Plotting a vertical character string
    ------------------------------------

It is possible to draw a vertical character string on a plot using the
following routines, which form part of the NAG Graphical Interface:

C
C        Set the character width and height in user co-ordinates
C
         WIDTH = ...
         HEIGHT = ...
         CALL J06YKF(WIDTH,HEIGHT)
C
C        Set the character horizontal and vertical spacing 
C        in user co-ordinates. For a vertical string the horizontal 
C        spacing must be zero. the vertical spacing must be negative 
C        for a string that runs from top to bottom. 
C
         DX = 0.0
         DY = - ...
         CALL J06YLF(DX,DY)
C
C        Position the pen on the paper ready for the string to be drawn
C
         X = ...
         Y = ...
         CALL J06YAF(X,Y)
C
C        Plot the string STRNG with length of N characters
C        using J06ZAF or J06YHF
C
         CALL J06ZAF(STRNG)
C        or
         CALL J06YHF(STRNG,N)

For more detailed information about each of these routines you are
referred to the Manual. One thing that is not easy is to find out
exactly where to plot the string; there is no easy way of finding out
where on the viewport the histogram is drawn. It will require a bit of
trial and error I'm afraid.  It may help if you chose your data region
equal to your viewport for this exercise.

Astrid van Maanen

---------------------------

Date: Fri, 14 Jul 89 12:32:49 +0100
From: drm@ukc.ac.uk
Subject: Bug in J06HGF

[I've already seen NAG's response to my J06HGF bug report.]
%% All part of the service!

    In reply to my bug report on J06HGF, I received a note from Sue
Upton (UNI-C, Denmark) in which she said that she'd tried the
modifications I suggested to the NAG test program, which demonstrated
the bug on our VAX/VMS 4.7 system.  It worked for her, i.e.  the
program ran and the final plot had the expected missing label.  That
was using "VSFORTAN 2.3 and GDDM 2.2 on an IBM3081 running VM/CMS
HPO5.0" (whatever that is).  I tried the same program on one of our
Unix systems (4.3BSD Unix on an HLH Orion Clipper and f77) and again it
worked.

    I was relieved when NAG said that it was a bug, because I was
beginning to think that perhaps it was just a problem with our VMS
implementation of NAG Graphics!  The moral of this story is that the bug
in J06HGF only appears in some implementations of NAG Graphics,
presumably because some compilers are more forgiving than others, or
adhere more closely to the Fortran standard?

David.

---------------------------

Date: Fri, 14 Jul 89 14:01:42 +0100
From: drm@ukc.ac.uk
Subject: Plotting text vertically

    Ahem, it appears that I've got an apology to make to NAG.  I had
become so fed up with NAG Graphics' way of labelling Y-axes on graphs
that I modified the source of the routine which actually puts the text
on the page.  Instead of NAG's way of putting all characters vertically
one below the other (starting from the top), I turn the entire label
through 90 degrees and write the label with the top of each character
pointing to the left, starting from the bottom and working upwards (i.e. 
the way Y-axes are usually labelled). 

    Having made this modification some time ago, I'd forgotten that NAG
always writes individual characters horizontally and never vertically!
Therefore, Astrid has very kindly provided a comprehensive answer to the
wrong question, although it will be useful to know what J06YLF is used
for.  (As an aside, it was only with Astrid's example program, the
documentation and some thought that I worked out what J06YLF does.  I
don't think the documentation on that routine is at all clear.  An
example program or more lengthy explanation in the manual would have
helped enormously.)

    In conclusion, my question for NAG should really have been: Is
NAG Graphics going to provide the facility whereby characters can be
drawn vertically?  I can see that there will be problems of compatibility
with Marks 1 and 2, but I don't consider that graphs with Y-axis labels
running down the page, one character below the other, are acceptable for
publication.  I'm probably trying to put NAG Graphics to a use for which
it wasn't designed (Presentation Graphics), but the ability to get
publishable graphs directly, without having to redraw them or export
your results to another package, is a major advantage of using NAG
Graphics.

David Morse.


---------------------------

Date:	Mon, 17 JUL 89 09:25:32 GMT
From:	CAROLINE@vax.nag.co.uk
Subject:NAG Official Opening + NAGUA update

NAG Official Opening - 14 July 1989
--------------------

Wilkinson House is now officially open.  The opening was performed by
James Elles, European MP, in the presence of Heather Wilkinson, in
honour of whose husband, Dr Jim Wilkinson FRS, the building is named.
Over 150 people, including NAG founder members, council members and
employees, gathered in a large marquee (in the NAG carpark) for a
champagne reception and buffet lunch.

After lunch, David Hartley introduced the speakers, and gave a resume
of the history of NAG.  Brian Ford then paid tribute to Jim Wilkinson,
in a speech that explained why Wilkinson House was the obvious choice
of name for the building.  Brian handed over to James Elles who
outlined the importance of NAG's European links (NAG serves 70% of all
European universities).  The coincidence of the date of the opening
being 14 July (storming of the Bastille and all that) was not
forgotten, with humorous references to events 200 years ago.

The opening party moved into the reception area for the unveiling of a
plaque, and James Elles declared the building open.  It was very much
an open day, as well as an opening day; displays around the building
described the activities of the company.  You will be pleased to hear
that NAGUA was represented on one of the display boards.  Guests were
free to make their own way around, and there were plenty of NAG
personnel to answer questions. It was also an opportunity for NAG
employees, especially the newer ones, to find out more about their
company.

It was then back to the marquee for tea and coffee, to round off a day
that was both memorable for NAG, and enjoyable for those who attended.


Conference update
-----------------

Although places are filling up for the conference, there's still time
to apply.  Please contact me if you haven't received/have misplaced
your invitation, I do have some spare copies.  Don't delay, book
today!

Caroline

---------------------------

Date: Mon Jul 17 18:32:44 BST 1989
From: trh@uk.ac.ukc
Subject: Multiple Precision Arithmetic Package in C

Further to the request for information about mod functions using
arbitrary precision numbers -- I followed up an article on the
news network and have got a copy of BigNum. It comes with
sources and documentation and is very easy to install (at least
on a UNIX system).

Anyone interested should e-mail a request for the s/ware to
	       librarian@decprl.dec.com
and the sources come to your mailbox (isn't that civilised -- no
nasty magnetic tapes :-))

Tim

----------------------------
%%   For further information about the NAG Users Association please contact:
%% Janet Bentley, Administrator NAGUA,
%% Shore Lane Farm, Blackstone Edge Old Road,
%% LITTLEBOROUGH, Lancashire, OL15 0LQ, UK.
%%
%% or
%%
%% Caroline J Foers
%% NAGUA and Service Coordinator, NAG Ltd,
%% Wilkinson House, Jordan Hill Road,
%% Oxford, OX2 8DR, U.K.
%%
%% e-mail   caroline@uk.co.nag.vax
%%
%%
%%   Replies or submissions to          nagmag@uk.ac.ukc
%%   Distribution changes to    nagmag-request@uk.ac.ukc
%%
%%   END OF ISSUE 

--------------------------

Reposted by

-- 
Kenneth R. Jackson,            krj@na.toronto.edu   (on Internet, CSNet, 
Computer Science Dept.,                              ARPAnet, BITNET)
University of Toronto,         krj@na.utoronto.ca   (CDNnet and other 
Toronto, Canada  M5S 1A4                             X.400 nets (Europe))
(Phone: 416-978-7075)          ...!{uunet,pyramid,watmath,ubc-cs}!utai!krj