Homework & the net (was Roots of polynomials)

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Mon Dec 10 17:45:37 AEST 1990


I'd like to (a) give the original poster some help, and (b) offer a slightly
different point of view.

(a) Get a copy of the book "Numerical Recipes" (the Fortran and Pascal
    version) or the C version "Numerical Recipes in C".  If you have a
    use for complex roots of polynomials, you have a use for this book.
    Look at the subroutines ZROOTS and QROOT.  *Read* *the* *entire*
    *chapter*.

(b) I spent enough time this year telling my students that when they
    start to work as programmers it will be better to ask for help
    than to deliver incorrect or irrelevant code to the customer that
    I don't like to see people who ask for help stepped on.

    When it's a case of something really obvious that anyone using C
    _must_ have access to, then "RTFM" is appropriate.  I was rather
    annoyed by the person who said "I can't find XXXX in the SunOS
    manuals" when a few minutes of probing with "man" gets you there.
    But I don't think it hurts to mention _which_ manual in an RTFM flame.

Did it occur to anyone that the poster's _real_ question may have been
"how do I do complex arithmetic in C"? The C and Pascal versions of the
Numerical Recipes code have some rather subtle code to implement complex
division and square root.  I wonder how many readers of this newsgroup
could code up complex division so that it never overflows or underflows
when it doesn't have to?  Fortran still has its uses (as does f2c).

-- 
The Marxists have merely _interpreted_ Marxism in various ways;
the point, however, is to _change_ it.		-- R. Hochhuth.



More information about the Comp.lang.c mailing list