![]() |
![]() |
Back |
In article <33A84AA4.6B51@mci.com.bite.me.spammers>, Mike SecorskyReturn to Topwrote: >An individual I work with has made a bet with another co-worker >concerning infinity. His claim is that there are an infinite number of >infinities, and he uses the following example... > >If you count from 1 to infinity that infinity will have a lesser value >than if you count from 2 (by 2's) to infinity. This sounds ludicrous to >me (isn't infinity a concept, not a value?), so I seek the help of those >in the know and hope I've got the right newsgroup for the job. Any help >with a definite answer would be greatly appreciated. Your co-worker's conclusion happens to be correct, but his justification is totally wrong. There are indeed an infinite number of infinities, but the ones you get by conting by 2's, by 3's, and so on, are all the very same infinity. Two infinities are the same size if their elements can be placed in 1-1 correspondence. Thus, 1 <-> 2 2 <-> 4 3 <-> 6 ... is a demonstration that the infinity of the positive integers and the infinity of the positive EVEN integers are exactly the same size. The size of a set is called its cardinality. The cardinality of the integers is called aleph-null, which is the smallest of the transfinite cardinal numbers. If A is any set, let P(A) denote the powerset of A, which is the set of all subsets of A. There is a theorem due to Cantor that says the powerset of any set has a larger cardinality than the original set. In other words, it is not possible to construct a 1-1 correspondence between any set A and its powerset P(A). Suppose f: A -> P(A) is such a mapping. Consider the set X = { x in A : x is not in f(x) }. Then X is a subset of A, meaning it is an element of P(A). Since f is a 1-1 correspondence, we must have X = f(y) for some y in A. Question: does y belong to the set X, or not? A moment's thought shows that if y belongs to X, then by definition of X we must have y NOT belonging to f(y), but this is impossible since f(y) = X. Likewise, if y does NOT belong to X, then it similarly follows that y DOES belong to f(y), which again contradicts the assumption that f(y) = X. The contradiction is therefore inescapable, which shows that no such bijection f: A -> P(A) can exist. On the other hand, it is easy to map A to a subset of P(A) (the set of all singleton sets in P(A), for example), and therefore P(A) must be a larger set (i.e., must have a larger cardinality) than A. It is known that the cardinality of the real numbers is the same as the cardinality of the powerset of the integers. The cardinality is 2^(aleph-null) = c = the cardinality of the continuum. Likewise, 2^c is the cardinality of the powerset of the reals, which is a larger infinity than c, and 2^(2^c) is larger yet, and so on. There are indeed infinitely many infinities, but your co-worker didn't get beyond the smallest of them. -- Dave Seaman dseaman@purdue.edu ++++ stop the execution of Mumia Abu-Jamal ++++ ++++ if you agree copy these lines to your sig ++++ ++++ see http://www.xs4all.nl/~tank/spg-l/sigaction.htm ++++
Peter HamerReturn to Topwrote: >Dennis Shea wrote: >> >> Is the "c" version of LAPACK (netliba cLAPACK) created from >> scratch or was it created using f2c? If the latter, >> was any post-f2c tuning performed? > >If you are a gcc user, note that somebody posted g77-compiled LAPACK >libraries for Linux; claiming they were about twice as fast as f2c+gcc. > >Peter Weird since g77 is a C compiler with a f2c frontend. The difference must come from the optimization used during the compilation stage (he must have used -O2 or -O3). PMT -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Pierre-Martin Tardif, graduate student email: tardif@gel.ulaval.ca Computer Vision and Systems Lab http://www.gel.ulaval.ca/~tardif Laval University, Ste-Foy, Canada phone: 418-656-2131, 4848
--------------------------------------------------------------------- ANNOUNCEMENT and SECOND CALL FOR PAPERS - IMVIP '97 IRISH MACHINE VISION & IMAGE PROCESSING CONFERENCE 1997 September 10-13, 1997 University of Ulster Magee College in tandem with NINTH IRELAND CONFERENCE ON ARTIFICIAL INTELLIGENCE - AI-97 --------------------------------------------------------------------- GENERAL INFORMATION The Irish Machine Vision & Image Processing Conference is a forum for presentation of original research, both basic and applied, and exchange of ideas in a broad area of image processing, image communication, pattern recognition and machine vision. The conference has developed from a highly successful Machine Vision and Image Processing Colloquium staged at the Queen's University Belfast in March 1996. The technical programme will comprise tutorials, plenary lectures, an exhibition, and contributed papers, which will be presented in either lecture and poster format. IMVIP '97 will take place at Magee College, Derry, Northern Ireland, from Wednesday 10th to Saturday 13th September 1997. (Please note changed dates, compared to an earlier Call.) A conference dinner will be held on the Friday evening. Persons requiring accommodation may avail of the University student residences for bed and breakfast. A list of local hotels and B&Bs; is also available at the conference Web address. Conference URL: http://www.infm.ulst.ac.uk/research/imvip97 AI-97 URL: http://www.infm.ulst.ac.uk/research/ai97 Conference e-mail: imvip97@ulst.ac.uk (or addresses below) Deadline for submission of abstracts: Sunday 29 June 1997. We would be grateful if you would copy this notice to colleagues who may be interested in IMVIP '97. With support from: ECVnet - European Computer Vision Network of Excellence. IAPR - International Association for Pattern Recognition. IRTU - Industrial Research and Technology Unit of Northern Ireland. OESI - Optical Engineering Society of Ireland, Cumann Innealto/ireacht Optu/la (Irish chapter of SPIE). ---------------------------------------------------------------------- TOPICS and THEMES Topics and themes include but are not limited to: - General techniques and algorithms: image filtering, enhancement; pattern recognition, neural networks, fuzzy sets. - Industrial inspection for manufacturing and processing. - Biomedical image processing. - Document image processing. - Remote sensing and space applications. - Multimedia, including WWW-based image processing. - Image analysis in security and surveillance, transport. - Digital images in video, television, telephony. - Systems: software, hardware, architectures. Papers in broadly associated areas are encouraged. -------------------------------------------------------------------- SUBMISSION OF PAPERS Prospective authors are invited propose papers on any of the topics mentioned. Send FOUR (hardcopy) copies of a ONE page abstract, together with completed cover form (see below) to: IMVIP '97 Secretariat, School of Information & Software Engineeering, University of Ulster, Magee College, Londonderry, BT48 7JL. Accepted papers will be published in the Proceedings of IMVIP '97, which will be available at the time of the conference; an eight-page limit will be imposed on the final papers. --------------------------------------------------------------------- SCHEDULE 29 June 1997 Deadline (extended) for submission of abstracts. 13 July 1997 Notification of acceptance. 17 August 1997 Submission of camera-ready paper. 10-13 September Conference and Tutorials. -------------------------------------------------------------------- TECHNICAL PROGRAMME COMMITTEE Honorary Chairs: Prof F Monds (UU), Prof JG Byrne (TCD) Dr E Ambikairajah (Athlone RTC), Prof DA Bell (UU), Dr N Black (UUJ), Dr A Bouridane (QUB), Mr J Campbell (UUM), Mr T Carew (TSI), Prof D Crookes (QUB), Dr K Dawson-Howe (TCD), Prof A Hashim (UUM), Prof J Haslett (TCD), Dr P Horan (DIT), Prof C Hussey (UL), Dr J Keating (Maynooth), Dr J Kennedy (CAPTEC), Mr G Lacy (TCD), Prof P McKevitt (Aalborg), Dr N McMillan (Carlow RTC), Dr P Morrow (UUC), Dr N Murphy (DCU), Prof F Murtagh (UUM), Mr F Shevlin (TCD), Prof F O'Sullivan (UCC), Prof D Vernon (Maynooth), Dr P Whelan (DCU). -------------------------------------------------------------------- LOCAL ORGANISING COMMITTEE Mr J Campbell (UUM), Ms J Farren (UUM), Ms C McNutt (UUM), Dr P Morrow (UUC), Prof F Murtagh (UUM). ------------------------------------------------------------------- CONTACT Ms C McNutt, Faculty of Informatics, University of Ulster, Magee College, Londonderry BT48 7JL, Northern Ireland. Fax +44 1504 370040 (from Republic of Ireland: 080 1504 370040) Tel +44 1504 375408 / 375367 (answering machine on 375367) - Jon Campbell. E-mail: imvip97@ulst.ac.uk Conference URL: http://www.infm.ulst.ac.uk/research/imvip97 --------------------------------------------------------------------- KEYNOTE PRESENTATIONS - Prof James L Crowley, INPG, Grenoble, France. Coordinator, European Computer Vision Network of Excellence: "Computer Vision for Man-Machine Interaction". - Prof Anil Jain, Department of Computer Science, Michigan State University: "Image and Video Databases". - Dr Jean-Christophe Olivo, European Molecular Biology Laboratory, Cell Biophysics Programme, Heidelberg: "Image Processing Applied to Biological Images". AND AI-97 KEYNOTE PRESENTATIONS - Prof John McCarthy, Department of Computer Science, Stanford University, Stanford, CA, US. - Prof Dr Walther von Hahn, Department of Computer Science, University of Hamburg, Germany. - Prof Naoyuki Okada, Department of Computer Science, Kyushu Institute of Technology, Iizuka, Japan. --------------------------------------------------------------------- AI-97/IMVIP-97 PLENARY LIVE FEED It is intended that the main plenary sessions at AI/IMVIP go out on streaming video and audio, stored and live with the possibility of phone-in questions (organisation: Ted Leath, Magee College). SOCIAL PROGRAMME There will be a reception on Thursday 11 September, a conference banquet on Friday 12 September, and a trip to the Giant's Causeway and Bushmills Distilery on Sunday 14 September. CONFERENCE VENUE Set beside the meandering River Foyle where it becomes Lough Foyle, Derry or Londonderry (and some other names besides) has a rare scenic beauty. It is rich in history, encompassing monastic settlement and fully extant city walls, the great seige of the late 17th century, and much more. A visit to the renowned Tower Museum is more than rewarding, as is a visit to the rugged mountains and sea cliffs in the close hinterland of Donegal. It is a northern European city of 100,000, almost on the border between the Republic of Ireland and Northern Ireland. It has wide renown for its writers and musicians. Informatics at Magee College is building up a strong programme in the areas of computational intelligence, intelligent multimedia, and distributed object computing. See www.infm.ulst.ac.uk/research VENUE The venue for registration, posters and exhibits, and for all conference events, will be MG 220 and MG 229 in the MG Building. Magee College itself is a short walk from the city centre. TRANSPORT >From Belfast International Airport or Belfast City Airport, we recommend that you take an airport bus to central Belfast, and then a bus to Derry. The University is a short walk away, but you may prefer to take a taxi. --------------------------------------------------------------------- EXTENDED ABSTRACT COVER - IMVIP '97 Return to: J. CAMPBELL, FACULTY OF INFORMATICS, UNIVERSITY OF ULSTER, L'DERRY BT48 7JL, NORTHERN IRELAND. EMAIL: imvip97@ulst.ac.uk, TEL +44 1504 375367, FAX +44 1504 370040 1. Paper Title:_______________________________________________________ ______________________________________________________________________ 2. Name(s) of Author(s) Lastname:__________________________Firstname:_________________________ Org./Dept.:___________________________E-mail:_________________________ Lastname:__________________________Firstname:_________________________ Org./Dept:____________________________E-mail:_________________________ Use additional sheets as neccessary. 3. Corresponding author. Lastname:__________________________Firstname:_________________________ Address, Organisation:________________________________________________ Department:___________________________________________________________ Street Address:_______________________________________________________ City:__________________________ State:________________________________ Postal/Zip-code:_______________ Country:______________________________ E-mail:_______________________________________________________________ 4. Concise description of problem addressed and its importance: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ 5. Concise statement of the originality of the contribution, plus mention of comparison with existing work: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ====================================================================== REGISTRATION INFORMATION - IMVIP '97 Registration fee schedule: Early registration, payable before Friday 29 August 1997: GBP 120 Late registration: GBP 150 Reduction for OESI/SPIE members: GBP 20 on either early or late registration. Payment by cheque to "IMVIP/AI-97, University of Ulster". Note that no distinction is made in regard to the tandem conference AI'97 - the registration fee entitles participation at both. For registration, please use the form below. The registration fee includes conference materials, coffees, and a copy of the proceedings. Accommodation: nearby choices for hotel, guesthouse and bed and breakfast, are posted on the conference's Web area, together with travel information. University student accommodation (price Pds 14.10 per night, breakfast in addition) is available also. REGISTRATION FORM - IMVIP '97 Return to: Ms C McNUTT, FACULTY OF INFORMATICS, UNIVERSITY OF ULSTER, L'DERRY BT48 7JL, NORTHERN IRELAND. EMAIL: imvip97@ulst.ac.uk, TEL +44 1504 375408, FAX +44 1504 370040 Lastname:__________________________Firstname:_________________________ Address, Organisation:________________________________________________ Department:___________________________________________________________ Street Address:_______________________________________________________ City:__________________________ State:________________________________ Postal/Zip-code:_______________ Country:______________________________ E-mail:_______________________________________________________________ PAYMENT: Registration fee enclosed: ________ I request a room in University accommodation: Nights required: ________ Payment will be made directly on receiving key. See conference Web area for contact details for local hotels. I will attend the Conference banquet (GBP 25) on Friday 12 September 1997: ________ I will attend the tour to the Giant's Causeway and to Bushmills Distillery in the afternoon of Sunday 14 September 1997 (GBP 6): ________ I enclose a Sterling cheque (or Eurocheque) to the value of: If paying by IEP, please apply current rate of conversion plus GBP 5. ________ I will attend the reception (no charge) on Thursday 11 September 1997: yes/no Total payment enclosed: ________ ====================================================================== -- Jonathan G. Campbell, ISC/ISE, University of Ulster, Magee College, Derry, BT48 7JL, Northern Ireland. tel +44 1504 375367, fax 370040. JG.Campbell@ulst.ac.uk http://www.iscm.ulst.ac.uk/~jon/Return to Top
Jason Stratos Papadopoulos (jasonp@Glue.umd.edu) wrote: : Hello. Is there a way to compute "b choose a" for a and b large, to : full precision and with less work than repeated multiplications? : Stirling's approximation is the right idea, but really I'm looking for : something that only needs basic arithmetic. On a side note, a straight- : forward rearrangement yields : : Infinity 2 : / b \ ------ n + b n + a(b-a) : | | = | | ------------------ : \ a / | | 2 : n = 1 n + b n : : which converges (I think). Unfortunately, the methods of convergence : acceleration I'm familiar with don't seem to work too well on this. : There are algorithms for this, but these days one can often do as well using the log-gamma function (that is, the log of the gamma function -- this is available directly with e.g. S+). Note that "b choose a" is an integer (if a and b are) so if one does the computation to high precision and rounds off, one gets the answer exactly. Exponentiation should always be the very last step before rounding off. -- Michael P. Cohen home phone 202-232-4651 1615 Q Street NW #T-1 office phone 202-219-1917 Washington, DC 20009-6310 office fax 202-219-2061 mcohen@cpcug.orgReturn to Top
Hello. Is there a way to compute "b choose a" for a and b large, to full precision and with less work than repeated multiplications? Stirling's approximation is the right idea, but really I'm looking for something that only needs basic arithmetic. On a side note, a straight- forward rearrangement yields Infinity 2 / b \ ------ n + b n + a(b-a) | | = | | ------------------ \ a / | | 2 n = 1 n + b n which converges (I think). Unfortunately, the methods of convergence acceleration I'm familiar with don't seem to work too well on this. Thanks in advance, jasonpReturn to Top
Earl F. Glynn wrote: > > Mike SecorskyReturn to Topwrote in article > <33A84AA4.6B51@mci.com.bite.me.spammers>... > > Well... here's the story > > > > An individual I work with has made a bet with another co-worker > > concerning infinity. His claim is that there are an infinite number of > > infinities, and he uses the following example... > > > > If you count from 1 to infinity that infinity will have a lesser value > > than if you count from 2 (by 2's) to infinity. This sounds ludicrous to > > me (isn't infinity a concept, not a value?), so I seek the help of those > > in the know and hope I've got the right newsgroup for the job. Any help > > with a definite answer would be greatly appreciated. > > > > Mike S. > > > > Note... only spammers can bite me, remove that portion for valid e-mail. > > > > I seem to remember that there are different orders (is this the right > word?) of infinity. The term aleph 1, alpeh2, etc. was used to > indicate the order of infinity. I'm not an expert on this so perhaps > someone else can clarify this. This is with regards to set theory and cardinality from the e-mail I've received on the subject (Thanks everyone!) so far. However, (there always seems to be 'howevers' popping up...) now the argument has shifted a bit to whether or not the 'levels' of infinity can be compared. It's my understanding that transfinite set can be compared, however 'infinity' is still conceptual and not comparable to other 'infinities'. Levels of cardinality may differ, but their rankings and not actual comparable values. Am I close here? I think I burned out some vital brain cells... (ouch) Mike S.
Hi all: Here's one that's got me stumped. In the diagram below, I have a window that can move up and down the range of rows in the column. In my column I have rows that contain info and rows that are blank placeholders. 1 ______ 2 ______ 3 ______ 4 ______ 5 ______ < window top 6 ______ 7 ------- 8 ------- < window bottom 9 ------- 10 ------- 11 ------- In this example, rows 1 to 6 are info rows, 7 to 11 are blank. Row 5 (info) defines the first row in the window, row 8 (blank) is the last row in the window. I need to know at any given point how many info rows are contained within the window. The following are known: window height (number of rows it can hold) column height (number of rows in column) number info rows in column number blank rows in column top row and bottom row location of window For a single test all the above parameters are known but the window position can move up and down at random. I need to know how many info rows are in window at any given time. Each time a new test is run the column height and relative number of info/blank rows can change from the previous test. It is possible that there can be only info rows or only blank rows or any ratio. I'm looking for a single expression that will give me the number of info rows in the window for any window position. So far I can only derive a conditional expression that changes based on the window position. i.e, if the window bottom is above the the last info row then then number of info rows it contains is simply the window height. If the window straddles the info/blank boundary, then a simple algebriac expression gives the number of info rows contained. If the top of the window is below the last info row then the number of info rows in the window is zero. It seems like there should be a way to get the number of info rows with just one non-conditional, algebraic expression. Is there something I'm missing? Many thanks in advance for any ideas. -- J. Kevin Meadows kmeadows@cts.comReturn to Top
Hello, Could someone maybe help me out with this one? I'm trying to find a parametric equation for the involute of the unit circle. Assuming that the unravelling begins at the point (1,0) what would be the set of parametric equations needed to graph this? Thanks in advance! Draven343@aol.comReturn to Top
In article <5oan6j$64@fermi.franken.de>, Wolfgang SchildbachReturn to Topwrote: >The cardinality of the set of all subsets in "N" is Aleph 1. No, the cardinality of the set of all subsets in "N" is c = 2^aleph-null. It is known that c > aleph-null. Aleph-1, by definition, is the smallest cardinal number that is greater than aleph-null. No one knows of any cardinal numbers that lie between aleph-null and c, but no one can prove that such numbers don't exist, either. The claim that c = aleph-1 is called the Continuum Hypothesis, and it is known to be undecidable in terms of the usual axioms of set theory. -- Dave Seaman dseaman@purdue.edu ++++ stop the execution of Mumia Abu-Jamal ++++ ++++ if you agree copy these lines to your sig ++++ ++++ see http://www.xs4all.nl/~tank/spg-l/sigaction.htm ++++
In article <5o8r24$ilg$1@news.ibm.net.il>, Guy HudaraReturn to Topwrote: >can any one tell me how do i calculate the next equation? > > > e^(-1/(x^4)) >lim ----------------- = ? >x->0 x > > >Thanks >Guy > (Assuming that x is meant to be real): A trick after which everything is down-to-earth: consider f(x) = exp(-1/x^4)/x^2 (divide the given expression by x), and find the range of this function. You observe that f(x)>0 for all x, and using the derivative test, you find that the maximum of f(x) is f(sqrt(2)) = exp(-1/2)/sqrt(2); call this number M. Now: 0 < exp(-1/x^4)/x <= M*x and the "squeeze" theorem tells you that the limit on the left and on the right being 0, the limit of the middle is also 0. Of course, you fill in the details. Have fun, ZVK (Slavek).
"Nathan Blomquist"Return to Topwrites: >Is there any theorem that square's can be found by adding increasing odd >numbers to the next square. For example: >01+03=04 >04+05=09 >09+07=16 >16+09=25 >25+11=36 >36+13=49 >49+15=64 >64+17=81 >81+19=100 >Is there a history behind this function? Who is credited with this >discovery? This is known from much earlier times. In the early 19th century, difference engines (machines) were constructed on this principle. It was probably used for a few hundred years before that to simplify arithmetic computation in the days before adding machines that could multiply. >Thanks for any help, >Nathan
Jason Stratos Papadopoulos wrote: (snip) > > This was suggested via email, and looks like it can work nicely. Where can > I find a rundown of such interrelationships (something more systematic > than trial and error), and some guidelines for figuring out new ones? > > If it'll help, what I want to finally be able to do is compute > ( 2k-1 choose k ) cubed, for k=1,2,3... and possibly very large. The > "cubed" part complicates things considerably based on my fooling around > with some recurrences! Let T_k = (2k-1)!/(k!k-1!) then clearly T_{k+1} = T_k (2k)(2k+1)/((k+1) k) = 2T_k (2k+1)/(k+1) = 2 (2 - 1/k+1) T_k Take it from there. Rises pretty fast though, asymptotically like 4^k. -- Jos van Kan http://dutita0.twi.tudelft.nl/users/vankan Math Dept, Delft Univ of Technology, Delft Netherlands.Return to Top
In article <5omp10$b5n@news.bu.edu>, Uwe HollerbachReturn to Topwrote: >Jim Kraai (jkraai@graphweb.com) wrote: >: Jason Stratos Papadopoulos wrote in article >: > : On 19 Jun 1997 17:40:51 GMT, jasonp@Glue.umd.edu (Jason Stratos >: > : Papadopoulos) wrote: >: > : >Hello. Is there a way to compute "b choose a" for a and b large, to >: > : >full precision and with less work than repeated multiplications? >: > : >Stirling's approximation is the right idea, [deleted about how to precompute factorials in order to use b!/a!/(b-a)!] >: 2. In the beginning of the program, calculate a 2d array of ushorts: >: One row for each integer: A+1 rows >: one column for each prime < A: [(A+1)/ln(A+1)] ??? columns >: Fill the entries with the number of factors for each column, when >: doing the division for calculating the factorial, find the >: appropriate rows and do elt-wise subtraction. >: >: This table is going to be a bit more computationally difficult to >: explicitly calculate, since essentially you're factoring every number once. The table only requires a list of the factors of each number up to n and additions. I believe it makes sense to have such a table for small primes (at least for 2) if you want to compute b!/a!/(b-a)!. [deleted] >Does not anyone use Pascal's triangle anymore, to compute binomial >coefficients? You don't ever multiply *any* numbers, you just add; and >you only encounter overflow when you realio trulio _can't_represent_ >the final answer, not because some intermediate factorial overflowed: >you never encounter numbers that are unreasonably larger than your >desired binomial coefficient. > >First you decide how large N will be for your largest (N choose M), >then you make a table of size (N+1)*(N+1). Initialize the first row to >be a 1 followed by 0, and the first column all 1. Then fill in by rows >or by columns: each entry is the sum of the entry immediately above >and the entry above and to the left: > >1 0 0 0 0 0 0 >1 1 0 0 0 0 0 >1 2 1 0 0 0 0 >1 3 3 1 0 0 0 >1 4 6 4 1 0 0 The problem is that this takes a lot of memory, and is furthermore slow. Assuming that storing n! takes n log(n) bits (it's approximately true for the numbers we are dealing with), and assuming that all elements take equal number of bits, we have: computing table of n! for 1..n: O(n^2 log(n)) computing Pascal's triangle for (1..n,1..n): O(n^3 log(n)) (of course you can use symmetry and some elements require less, but I believe it's something of that order) For n=1000 or larger the space requirements seem to be excessive for Pascal's triangle. Given the relative cost of addition and multiplication it would also be a lot faster to precompute the table of n!. -- // Homepage http://www.dna.lth.se/home/Hans_Olsson/ // Email To..Hans.Olsson@dna.lth.se [Please no junk e-mail]
>This was suggested via email, and looks like it can work nicely. Where can >I find a rundown of such interrelationships (something more systematic >than trial and error), and some guidelines for figuring out new ones? "Concrete Mathematics : a foundation for Computer Science" is a reasonable source for relationships among binomial coefficients, as is the first Volume of Knuth's Art of Computer Programming series. What I have is his "Mathematics for the Analysis of Algorithms," which is less comprehensive on binomial coefficient interrelationships than either of the above. -------------------------------------------------------------- "I would predict that there are far greater mistakes waiting to be made by someone with your obvious talent for it." Orac to Vila. [City at the Edge of the World.] ----------------------------------------------- R.W. Hutchinson. | rwhutch@nr.infi.netReturn to Top
Given the inhomogenous PDE for x(t,z) with respect to time t and space z d^2 x d^2 x ----- - c^2 ----- = m(t,z) t >= 0, z in (0,L) c^2 = const. dt^2 dz^2 with inhomogenous boundary conditions ~~~~~~~~~~~~ z = 0: dx/dt = Omega z = L: dx/dz + Theta*d^2 x/ dt^2 = T(t) , Theta = const. and initial values t = 0: x(t=0,z) = x0 , dx/dt(t=0,z) = xp0 . My questions: 1) How to transform the PDE for solving ? 2) It is possible to give the answer with Greens function like L x(t,z) = int G(t,z,zeta) u(t,zeta) d zeta 0 and what to do in this case? 3) How to derive the Greens function? Which boundary conditions Thanks a lot! Oliver KustReturn to Top
Hello, sometime back I read about a numerically stable way of computing the scalar product of two vectors, x and y, let's say. The idea is to compute the sum of the x_i*y_i terms so as to minimize the error resulting from rounding. The error can depend on whether we add the small terms first, or the large ones (as far as I recall). Also, we must store the intermediate result with higher precision (so, if x and y are double, then the sum of x_i*y_i's should be stored in long double, let's say). Now my questions are: 1) What is the exact reference ? 2) Has anyone had any experience with this method? Is it useful in practice? 3) Is it implemented in some software ? I looked at LAPACK, for instance, and only saw standard scalar product there. Does that mean that it is not worth bothering with the fancy scalar product? My reason to look for such a method: I am solving some LP's with the CPLEX callable library, and my application requires that I recompute Ax at the end, with x being the solution returned by CPLEX. (In fact, things are a bit more involved, but this is the essence of it). For some moderate size (1000 by 500) LP's which are badly conditioned, the difference can be 0.001-0.01, which is not really acceptable. So, I am wondering, whether computing the matrix product using the fancy scalar product may help. Any help would be greatly appreciated. Best regards GaborReturn to Top
John Conroy wrote: > > I looked around netlib and was unable to find C routines > for Gaussian quadrature. Specifically, I looking for > a robust code which will integrate a smooth function to > a given precision. Several routines are available in Fortran, > however, I couldn't find anything in C. Numerical Recipes gives > just routines for computing quadrature but not an automatic > method for computing an integral to a specified precision. This is CACM algorithm 125, by Rutishauser, translated from algol. The weight function is 1/2 and interval (0,2) which can obviously be easily changed to another interval/weight. Pls check it yourself. #include#include #define nm 100 #define min(x,y) ((x)>=y ? (y) : (x)) void red(a,f,n) int n; double a[][8],f[]; { double c; int j,k; for(k=1;k eps) goto NEXT; goto L3; NEXT:qdgraeffe(n,x,g,w,a); p=2*p; goto L25; L3:w[1]=1; m=0; for(k=1;k m) m=w[k]; } printf("%f\n",m); /*for(k=1;k<=n;k++) w[k]=exp(w[k]-m);*/ m=0; for(k=1;k<=n;k++) m=m+w[k]; for(k=1;k<=n;k++) { w[k]=w[k]/m; x[k]=exp(x[k]/p); } } main() { int i,j,n; double q[nm],e[nm],w[nm],x[nm],eps,xx; /* scanf("%d %lf",&n;,&eps;); if(eps<=0) eps=1e-12; */ eps=1e-12; n=50; if(n>=nm-1) exit(99); printf("n=%d eps=%e\n",n,eps); /* q,e for w=1 interval (0,2) */ for(i=2;i Return to Top
Re: fast way to compute binomial coefficient to full accuracy?
nobody@nowhere.on.ca
Tue, 24 Jun 1997 23:33:42 GMT
On 22 Jun 1997 21:35:45 GMT, jasonp@Glue.umd.edu (Jason Stratos Papadopoulos) wrote: >PS: This is the third time I've had to jump in and clarify what I asked in >a Usenet post in the last week. Isn't it obvious what I want? Nope. [Well, more obvious now, thanks.] Still wish I could help. I'll ask about, if you don't get any concrete replies.Return to Top
Re: fast way to compute binomial coefficient to full accuracy?
jasonp@Glue.umd.edu (Jason Stratos Papadopoulos)
24 Jun 1997 07:27:44 GMT
: Does not anyone use Pascal's triangle anymore, to compute binomial : coefficients? You don't ever multiply *any* numbers, you just add; and : you only encounter overflow when you realio trulio _can't_represent_ : the final answer, not because some intermediate factorial overflowed: : you never encounter numbers that are unreasonably larger than your : desired binomial coefficient. : First you decide how large N will be for your largest (N choose M), : then you make a table of size (N+1)*(N+1). Initialize the first row to : be a 1 followed by 0, and the first column all 1. Then fill in by rows : or by columns: each entry is the sum of the entry immediately above : and the entry above and to the left: : 1 0 0 0 0 0 0 : 1 1 0 0 0 0 0 : 1 2 1 0 0 0 0 : 1 3 3 1 0 0 0 : 1 4 6 4 1 0 0 : Then you have a lookup table: look up N along rows, M along columns : (starting from 0). Thus (4 choose 2) is 6. If you want to use bignums, : you need never encounter overflow. Note, however, that what I really *really* want all this mess for involves a computer program to add up an infinite series in extended precision (tens of thousands of digits, perhaps even more), and the bottleneck in computing a term involves computing (2k-1 choose k) cubed. If k is 50,000 a full Pascal triangle is not an option. A *recurrence*, however, will fit the bill nicely if one can be found. Personally, I'm starting to think the best way to handle things is to just take the present (2k-1 choose k)^3 and multiply by 8*(2k-1)^3/k^3. It's not impossible or even overly slow, I was just hoping to do it using only additions. Thanks for the ideas, jasonpReturn to Top
Re: fast way to compute binomial coefficient to full accuracy?
rwhutch@nr.infi.net
24 Jun 1997 07:47:33 GMT
>: On the other hand, Pascal's Triangle is full of >: interrelationships between the coefficients, and it should be possible >: to find one which can be used for fairly fast coefficient generation >: without "greatly" exceeding the final result in any intermediate step. >: Perhaps a two stage process, with moderately fast techniques used to >: generate the two coefficients which sum to the answer, and then doing >: the final addition would be a suitable approach? > >This was suggested via email, and looks like it can work nicely. Where can >I find a rundown of such interrelationships (something more systematic >than trial and error), and some guidelines for figuring out new ones? > >If it'll help, what I want to finally be able to do is compute >( 2k-1 choose k ) cubed, for k=1,2,3... and possibly very large. The >"cubed" part complicates things considerably based on my fooling around >with some recurrences! > >Thanks again, >jasonp > What I have on hand, is "Mathematics for the Analysis of Algorithms" by Daniel H. Greene and Donald E. Knuth. It opens with a chapter entitled "Binomial Identities" Actually, a more extensive, if concise, source is Vol. 1 of the justly famous "Art of Computer Programming" by Knuth. Knuth also has out a book somewhere in the "Discrete Mathematics for Computer Scientists" subject area, which is also more extensive in its coverage of binomial identities. I seem to have the least comprehensive and hardest to find reference on the topic. Any of the three should serve your needs however. -------------------------------------------------------------- "I would predict that there are far greater mistakes waiting to be made by someone with your obvious talent for it." Orac to Vila. [City at the Edge of the World.] ----------------------------------------------- R.W. Hutchinson. | rwhutch@nr.infi.netReturn to Top
Warning! Has long C code insert. Re: fast way to compute binomial coefficient to full accuracy?
"Dann Corbit"
24 Jun 1997 16:40:27 GMT
Hans OlssonReturn to Topwrote in article <5oo0nj$4m3$1@news.lth.se>... [large snip] > The problem is that this takes a lot of memory, and is furthermore slow. > Assuming that storing n! takes n log(n) bits (it's approximately true for > the numbers we are dealing with), and assuming that all elements take > equal number of bits, we have: > > computing table of n! for 1..n: O(n^2 log(n)) > computing Pascal's triangle for (1..n,1..n): O(n^3 log(n)) > (of course you can use symmetry and some elements require less, but > I believe it's something of that order) > > For n=1000 or larger the space requirements seem to be excessive for > Pascal's triangle. > > Given the relative cost of addition and multiplication it would also be > a lot faster to precompute the table of n!. Given a table of factorials, combinations can be calculated with one multiplication and one division, and permutations with a single division. Given a table of factorials (called ldFactorialTable in this example), the following code will return factorials, combinations, and permutations. The code is written for long double, but can easily be adapted for arbitrary types [much easier in C++ than in C]. {The long double table of factorials is available upon request to those who would like a copy. It's about 64K.} /*************************************************************************** */ /* Function ldCombinations calculates the combinations of a collection of */ /* objects taken at a time. With combinations, the order of the */ /* objects in the collections has no significance. Hence, a poker hand */ /* with four aces has the same value regardless of the order in which the */ /* aces were dealt. */ /* ------------------------------------------------------------------------ */ /* ldCombinations is defined as n!/( r!*( n-r )! ) for the purposes of this */ /* program. While computation of three factorials may seem to be */ /* computationally expensive, since a table of factorials is readily */ /* available, this is actually a very cheap form of calculation. */ /* */ /* Requirements: */ /* 1. Both and must be an element of the set [0..MAXFACTORIAL]. */ /* 2. The value of must be greater than or equal to the value of . */ /* */ /* Returns: */ /* A. Long Double result of calculation ( 10 byte floating point format */ /* intrinsic to the 80x87 processor or emulated in software ). */ /* B. Error is indicated by return of ( -1 ) */ /*************************************************************************** */ long double ldCombinations( int n, int r ) { long double ldCombinationsAnswer; long double ldNumerator; long double ldDenominator; /* indicate error condition */ ldCombinationsAnswer = -ldFactorialTable[0]; /* If all reasonability checks pass, calculate Combinations: */ if ( n >= r ) if ( n <= MAXFACTORIAL && n >= 0 ) if ( r <= MAXFACTORIAL && r >= 0 ) { ldNumerator = ldFactorialTable[n]; ldDenominator = ldFactorialTable[n-r]*ldFactorialTable[r]; ldCombinationsAnswer = ldNumerator/ldDenominator; } return ( ldCombinationsAnswer ); } /*************************************************************************** */ /* Function ldPermutations calculates the permutations of a collection of */ /* objects taken at a time. With permutations, the order of the */ /* objects in the collections has significance. Hence, a DNA strand with */ /* GAA is different than a DNA strand with the sequence AGA or the sequence */ /* AAG. */ /* ------------------------------------------------------------------------ */ /* ldPermutations is defined as n!/( ( n-r )! ) for the purposes of this */ /* program. While computation of two factorials may seem to be */ /* computationally expensive, since a table of factorials is readily */ /* available, this is actually a very cheap form of calculation. */ /* */ /* Requirements: */ /* 1. Both and must be an element of the set [0..MAXFACTORIAL]. */ /* 2. The value of must be greater than or equal to the value of . */ /* */ /* Returns: */ /* A. Long Double result of calculation ( 10 byte floating point format */ /* intrinsic to the 80x87 processor or emulated in software ). */ /* B. Error is indicated by return of ( -1 ) */ /*************************************************************************** */ long double ldPermutations( int n, int r ) { long double ldPermutationsAnswer; /* indicate error condition */ ldPermutationsAnswer = -ldFactorialTable[0]; /* If all reasonability checks pass, calculate Permutations: */ if ( n >= r ) if ( n <= MAXFACTORIAL && n >= 0 ) if ( r <= MAXFACTORIAL && r >= 0 ) ldPermutationsAnswer = ldFactorialTable[n]/ldFactorialTable[n-r]; return ( ldPermutationsAnswer ); } /*************************************************************************** */ /* Function ldFactorial calculates the factorial value of an integer . */ /* This function operates only on integers. If floating point inputs are */ /* needed, use instead the gamma function. Since factorials turn up so */ /* often in nature, a precomputed factorial calculation function is really */ /* an essential for the scientist, mathematician, and yes, even the */ /* the businessman. Double deck pinochle, for instance, requires being */ /* able to calculate 80! for calculation of probabilities. Mathematical */ /* formulae such as Taylor series expansions, often require the calculation */ /* of factorial expressions. This simple function should lessen the */ /* expense of such calculations. */ /* ------------------------------------------------------------------------ */ /* n! is defined as the product, for ( i=1 to n ) of the integers. The */ /* exception is 0! which is defined as 1. Since the factorial function */ /* is really just a subset of the gamma function, as defined for the */ /* natural numbers ( positive integers ) when shifted by one. As such, it */ /* is quite useful for computation of integral values for gamma. */ /* */ /* Requirements: */ /* 1. must be an element of the set [0..MAXFACTORIAL]. */ /* */ /* Returns: */ /* A. Long Double result of calculation ( 10 byte floating point format */ /* intrinsic to the 80x87 processor or emulated in software ). */ /* B. Error is indicated by return of ( -1 ) */ /*************************************************************************** */ long double ldFactorial( int n ) { long double ldFactorialAnswer; /* indicate error condition */ ldFactorialAnswer = -ldFactorialTable[0]; /* If the input number n is within range, calculate n! */ if ( n <= MAXFACTORIAL && n >= 0 ) ldFactorialAnswer = ldFactorialTable[n]; return ( ldFactorialAnswer ); }
Re: fast way to compute binomial coefficient to full accuracy?
"N.R.Bruin"
Tue, 24 Jun 1997 16:13:35 +0200
Wayne Schlitt wrote: > > In <33ad1ba9.941592@news.igs.net> nobody@nowhere.on.ca writes: > > > On 19 Jun 1997 17:40:51 GMT, jasonp@Glue.umd.edu (Jason Stratos > > Papadopoulos) wrote: > > > > >Hello. Is there a way to compute "b choose a" for a and b large, to > > >full precision [ ... ] > > > > I am trying > > to fathom how to get "full precision" using an "approximation". > > To get "full IEEE double precision" accuracy, you only need to be > accurate to one part in 2^54. You don't need to more exact than that, > so a good approximation will due. > > -wayne > That completely depends on the question you're asking. If you want to know the square-free part of the number, then an approximation will help you nothing. (I think that the square-free part could be calculated quite a bit faster, by the way) NilsReturn to Top
Re: fast way to compute binomial coefficient to full accuracy?
eclrh@sun.leeds.ac.uk (Robert Hill)
Wed, 25 Jun 1997 12:47:03 +0100 (BST)
In article <5onu2l$17k$1@nw001.infi.net>, rwhutch@nr.infi.net writes: > Knuth also has out a book somewhere in the "Discrete Mathematics for > Computer Scientists" subject area, which is also more extensive in its coverage of > binomial identities. This may be a reference to "Concrete Mathematics" by Graham, Knuth and Patashnik. -- Robert Hill University Computing Service, Leeds University, England "Though all my wares be trash, the heart is true." - John Dowland, Fine Knacks for Ladies (1600)Return to Top
Re: Numerical recipies vs. IMSL
n8tm@aol.com (N8TM)
24 Jun 1997 12:56:19 GMT
What do they say about apples and oranges? If you use IMSL, you're paying a pretty good fee for a lot of testing, which presumably assures that you're unlikely to stumble over a bug in the code. However, the black box nature of it makes it more likely that you'll use it incorrectly and find it difficult to understand how. I've always worked in organizations which favored code where you could pay someone else to take responsibility, but we've always ended up replacing IMSL with our own functions, if only because of the difficulty of keeping licensing in force over a large network of various brands of computers. In spite of all the stones being cast at Numerical Recipes, I find it a step up from the previous situation where we stuck with the oldest undocumented thing which appeared to work. At least you have a chance to form your own opinions about adequacy of documentation, quality of implementation, etc. TimReturn to Top
Re: PDE again
spellucci@mathematik.th-darmstadt.de (Peter Spellucci)
24 Jun 1997 16:45:32 GMT
In article <33AE7D52.1908@hotmail.com>, hasying@hotmail.com writes: |> Peter Spellucci wrote: |> > |> > what you have is (hopefully) a hyperbolic system of first order, |> > namely if the matrix |> > A B |> > D C |> > has two nonzero real eigenvalues. you can solve this system by an |> > explicit method as you described it. It may however be better |> > to use the characteristic directions (the eigenvectors of the matrix) |> > for better reproduction of the true solution. |> > have a look at introductory texts on this subject. |> In fact, I try to compare these two methods, which one is better for my |> problem. Because if I use characteristic method, the value of u(t+1,x) |> has correlation/depends on the value of v(t+1,x). But if I used FD |> method, explicit, snip snip I forgot to warn you concerning explicit FD (as opposed to methods of characteristics) to use unstable discretizations. E.g. for your hyperbolic 2*2 system the methods of Friedrichs and Lax-Wendroff are both fully explicit and conditionally stable, roughly you must have delta_t/delta_x <= 1/norm(matrix) these methods are easy to apply and fairly accurate , especially Lax-Wendroff being second order in delta_t. But if your solution is not very smooth, i.e. has a steep gradient somewhere, then you will get trouble with FD-resolution, since your FD-grid will not be able to reproduce this correctly. Then you will get a wriggled output, and maybe a customer of your program will be quite unhappy concerning the result. Don't forget that there are naive unstable FD-formulas, e.g. W_{n+1,i} = W_{n,i} + delta_t/(2*delta_x) AA ( W_{n,i+1}-W_{n,i-1} ) with W=(u,v) and AA the matrix from above n=grid number in time, i=grid number in space, is unstable and hence nonconvergent. hope this helps peterReturn to Top
Re: Numerical recipies vs. IMSL
HORNE@PSFC.MIT.EDU
24 JUN 97 14:32:44 GMT
1) There are many reports of the inadequacies of the NR code. 2) IMSL may be expensive, but it is very rare to find a bug in it. 3) However, there's no reason in the world to pay for the sorts of routines you find in IMSL. There are many freely available packages at http://www.netlib.org/, most of which (blas, lapack, routines from TOMS, ...) are extensively debugged and very reliable. I don't think there is anything in IMSL that you can't find at netlib.Return to Top
Re: Can some one help me with this linear interpolation ?!
dc@cage.rug.ac.be (Denis Constales)
Wed, 25 Jun 1997 11:15:16 +0200
In article <5ol8j5$mt3$1@news.tudelft.nl>, D.P.Tran@et.tudelft.nl (Diane) wrote: > (F(1)= (0.80951, 0.23219)) and this is not equal to the > tabulated fx[] =(0.8095, 0.1322) ? How can I fix this ? Improve the accuracy of the precomputed fxx by replacing complex( .2187,-.0757) by complex (.2186666666, -.075666666666) Similarly, for 5.5, improve the accuracy of complex (.0093, -.0163) to complex(.00926666666, -0.1633333333) This second case is tricky because one would expect that the interpolation for 5.5 would take into account xx[7]=5.5 instead of xx[6]=4... but in fact although x looks like 5.5 when printed, it is obtained by repeated addition of 0.1 to lower=0.2 in main, and by roundoff error this turns out very slightly smaller than 5.5, which explains the use of the [4,5.5] interval for interpolation. Note also that there's an error in the original program's statements for (int n = 0; n <= 7; n = n + 1) { if (x >= xx[n] && x < xx[n + 1]) etc. since this will refer to an inexistant xx[8] if x=5.5 exactly, and may or may not work depending on the value of that memory location xx[8], which is outside the array xx. Quick solution (kludgy): add an extra value to xx, larger than 5.5, like 6, and (for safety) an extra value to fxx, e.g. zero, so fxx[8] is defined and not, e.g. NaN by coincidence. Then for x=5.5 (exactly) F will be computed as F = fxx[8] * (x - xx[7]) + fx[7] ^ zero ^ zero ^ the value > When I put lower=0.2 upper=(2.3/ 2.4/ 2.5 ....) > Why does the program print ONLY up to FTF(upper-increment) > and the last value FTF(upper) is not printed, This is due to floating-point roundoff error. It is preferable to use integers as loop counters instead, then you're sure that the number of iterations will be right. -- Dr. Denis Constales - dcons@world.std.com - http://cage.rug.ac.be/~dc/Return to Top
SCAN-97 Final Programme and Call for Participation
jmmuller@ens-lyon.fr (Jean-Michel Muller)
25 Jun 1997 12:24:47 GMT
CALL FOR PARTICIPATION SCAN-97 GAMM/IMACS International Symposium on Scientific Computing, Computer Arithmetic and Validated Numerics September 10-12, 1997 Ecole Normale Superieure de Lyon France http://www.ens-lyon.fr/LIP/SCAN-97/ The conference continues the series of SCAN-Symposia which have previously been held at Karlsruhe, Basel, Albena, Oldenburg, Vienna and Wuppertal under the joint sponsorship of GAMM and IMACS. These conferences have traditionally covered the numerical and algorithmic aspects of Scientific Computing, with a strong emphasis on the algorithmic validation of results and on algorithmic and arithmetic tools for this purpose. SCAN-97 will provide a forum for presentation of the latest research and developments in theory, algorithmic and arithmetic design for Validated Numerics; demonstration of new software available for Validated Numerics; reports of interesting case studies in industrial and scientific application of Validated Numerics; and discussion of new directions in research and development suggested by other advances in Scientific Computing. Potential new directions are the use of parallel architectures for the implementation of validation algorithms and the use of validation ideas in Computer Algebra. More information (including scientific committee, proceedings, transportation and accommodation) can be found in our web page: www.ens-lyon.fr/LIP/SCAN-97 PRELIMINARY PROGRAMME ********************************************************** Wednesday September 10 ********************************************************** 08h30-09h30 Opening session 09h30-10h30 Plenary Talk : Wolfgang Walter (Univ. Dresden, Germany), On the Suitability of Programming Language Concepts for Reliable Floating-Point Computation. 10h30-11h30 Plenary Talk : Svetoslav Markov (Bulgarian Academy of Sciences) 11h30-12h00 Break 12h00-13h30 Parallel sessions - Session 1 "Programming languages" Genesio Gomes da Cruz Neto, Rafael Dueire Lins, Marcia de Barros Correia, Genaro Dueire Lins and Gustavo Fraidenraich, Programming Interval Algorithms in Haskell Raul Trejo, A Functional Language for Interval Arithmetic, Jurgen Wolff v. Gudenberg, Java for Scientific Computing, Pros and Cons - Session 2 "Probabilistic analysis" Roberto Barrio and Jean-Claude Berges, Perturbation simulations of rounding errors in Chebyshev series Marcilia A. Campos, Validating Probabilities for the Random Variables Binomial and Poisson J.M. Chesneaux and F. Jezeequel, Dynamical numerical validation of quadrature methods 14h30-16h30 Parallel sessions - Session 3 "Packages" Rafael Linden Sagula and Tiaraju Asmuz Diverio, Interval Software Performance Ursula Lisboa Fernandes and Tiaraju Asmuz Diverio, High accuracy arithmetic kernel of libavi.a interval library Frantisek Mraz, Pascal Software for Calculating the Exact Bounds of Optimal Values in Interval LP Zyuzin V. S., Rychkova N. A., Interval splines finding for the solution of ODE systems with the help of Taylor series. Their realization at Pascal XSC - Session 4 "Theoretical results" Gerhard Heindl, Optimal inclusions of integrals from inclusions of function values and slopes A. T. Popov, On some relations between morphological and interval operations. Evgenija D. Popova and Svetoslav M. Markov, Algebraic Solution to Some Interval Equations Paulo Werlang de Oliveira and Dalcidio Moraes Claudio, A Formal Extension for the Set IR 16h30-17h00 break 17h00-19h00 Parallel sessions - Session 5 "Optimization and Approximation 1" Roumen Anguelov, Spline-Fourier Approximations of Discontinuous Waves Andras Erik Csallner, Tibor Csendes, Mihaly Csaba Markot, Convergence Properties for Multisplitting Interval Methods for Global Optimization Andras Erik Csallner, Tibor Csendes, Mihaly Csaba Markot, Multisection in Interval Methods for Global Optimization Laurent Granvilliers, A Symbolic-Numeric Framework for Solving Real Constraints - Session 6 "PDE and ODE 1" R. Aid, L. Testard and G. Villard, Global Error Visualization Eduardo Gallestey, Spectral Value Sets of the Orr-Sommerfeld Operator F. Hoshino, M. Sugihara and S. Fujino,A numerical method for the exact solution of Burger's equation using overload function of C++ Mitsuhiro T. Nakao and Cheon Seoung Ryoo, Numerical verifications of solutions for variational inequalities ***************************************************************** Tuesday September 11 ***************************************************************** 09h30-10h30 Plenary talk: Bruno Lang (Wuppertal Univ., Germany) 10h30-11h30 Plenary Talk: Walter Kraemer (Karlsruhe Univ., Germany), "Constructive Error Analysis". 11h30-12h00 break 12h00-13h30 Parallel sessions - Session 7 "non linear systems" Yuchi Kanzawa and Shin'ichi Oishi, Approximate Singular Solutions of Nonlinear Equations and a Numerical Method of Proving their Existence Yusuke Nakaya and Shin'ichi Oishi, Finding All Solutions of Nonlinear Systems of Equations Using Linear Programming with Guaranteed Accuracy Yusuke Nakaya and Shin'ichi Oishi, Mathematical Programming Based Rigorous Numerical Nonexistence Test for Solutions of Nonlinear Equations - Session 8 "Architectures for reliable computing 1" Hesham A. Al-twaijry, Stuart F. Oberman, Steve T. Fu and Michael J. Flynn, The SNAP Projet : Building Validated Floating Point Units V. Coissard and A. Guyot, OCAPI : A coprocessor for infinite precision arithmetic Samir Tagzout and Leila Sahli, Compact Multipliers Using the Sign-Generate Method in FPGA 14h30-16h30 Parallel sessions - Session 9 "Optimization and Approximation 2" Frederic Messine and Jean-Louis Lagouanelle, A Global Optimization Algorithm for Multivariate Differentiable Functions V.A. Perepelitsa and G.L. Kozina, Making decision in discrete interval optimization problems Knut Petras, On the speed of self-validating algorithms for approximation or integration of singular functions Shen Zuhe and Huang Zhenyu, Interval maximum entropy methods for minimax problems - Session 10 "PDE and ODE 2" M. Neher, Enclosing solutions of an inverse Sturm-Liouville problem for an impedance Robert Rihm, Implicit Methods for Enclosing Solutions of ODEs Rogalev Alexey N., The interval method for ordinary differential equations and shift along trajectories Takao Soma, Shin'ichi Oishi and Kazuo Horiuchi, An Iterative Refinnement Method for Solutions of Nonlinear Ordinary Differential Equations with Arbitrary Precision 16h30-17h00 break 17h00-19h30 Parallel sessions - Session 11 "Linear algebra" Olivier Beaumont and Bernard Philippe, An Iterative Algorithm for Interval Eigenvalue Problem Anatoly V. Lakeysev, On Systems of Linear Interval Equations Having a Finite Set of Solutions G. Rex, Componentwise Distance to Singularity Jiri Rohn, P-matrices and regularity: a survey Sergey P. Shary, On Uniqueness of the Algebraic Solutions to Interval Linear Equations - Session 12 "Computer Arithmetic" Wolfram Luther and Werner Otten, Reliable computation of elliptic functions Vyacheslav M. Nesterov, On accuracy of estimation in twin arithmetic Asger Munk Nielsen and Peter Kornerup, Generalized Base and Digit Set Conversion Mitsuo Ooyama and H. Hamada, Fast Separation and Combination of an Exponent and a Fraction for URR Floating-Point Arithmetic Guoheng Wei and David W. Matula, Realizing Accurate and Efficient Reciprocal Functions by Interpolation ***************************************************************** Friday September 12 ***************************************************************** 09h30-10h30 Plenary session: Jean-Daniel Boissonnat (INRIA Nice, France) 10h30-11h00 break 11h00-13h30 Parallel sessions - Session 13 "Geometry" Bronnimann and Pion, Exact rounding for geometric functions Karl-Udo Jahn, Computing the convex hull of sets of rectangles in the plane Yu. G. Stoyan, Interval Analysis Application in Geometry Fabiana Zamora Wilke, Beatriz Regina Tavares Franciosi, Paulo Werlang Oliveira and Dalcidio Moraes Claudio, Modelling of the Measures Uncertainty by Intervals - Session 14 "Chaos and dynamical systems" Farit M. Akhmedjanov and Victor G. Krymsky, Frequency domain technique application to interval dynamic system analysis, Zbigniew Galias, Numerical studies of the Henon map Shin'ichi Oishi, Numerical Verification Method of Existence of Connecting Orbits for Continuous Dynamical Systems Klaudiusz Wojcik, Algorithms for constructing isolating blocks. A geometric method for detecting chaotic dynamics. Piotr Zgliczynski, Algorithm for finding TS-map structure 14h30-15h30 Parallel sessions - Session 15 "Architectures for reliable computing 2" Vladimir Tarasenko and Oleksandr Shcherbyna, the using of symmetric property of the computed functions in the table computer arithmetic. J.M. Tourreilles, C. Nouet and E. Martin, Digital signal processor implementation under computation signal to noise ratio - Session 16 "Parallel algorithms" Oliver Bergmann and Andreas Frommer, Parallelization of enclosure methods for zeros of nonlinear functions Sonja Berner, Ken McKinnon and Colin Millar, A Parallel Algorithm for the Minimization of Gibbs Free Energy 15h30-16h00 break - 16h00-18h00 Parallel sessions - Section 17 "Miscellaneous 1" Jurgen Garloff and Birgit Graf, Robust Schur Stability of Polynomials with Polynomial Parameter Dependency Maria Angelica de Oliveira Camargo Brunetto, Algebraic Algorithms For Enumerating Polynomial Zeros In A Disk : How To Choose The Suitable Algorithm Vitaly Telerman, Merging Constraint Programming Technology with Interval Computations Nikolay M. Vasilega and Anna V. Nelasa Zaporozhye, Application of hystogramme arithmetics for prediction of fatigue failures - Session 18 "Miscellaneous 2" Stanislaw Bialas and Wieslaw Solak, A Remark on Power Series Estimation via Boundary Corrections Oleg B. Ermakov, Guaranteed outer and inner inclusions of fixed points of a Volterra Integral operator in interval spaces. Czeslaw Koscielny, A Validated Software Method of Computing Minimal Polynominals for Elements of Large GF (2m) Gregory G. Men'shikov, Interval Realizations of Interpolational Quadrature Remainder SCAN-97 GAMM/IMACS International Symposium on Scientific Computing, Computer Arithmetic and Validated Numerics September 10-12, 1997 Ecole Normale Superieure de Lyon France REGISTRATION FORM The conference fee covers the conference materials (the final program, a booklet containing all abstracts, general information, etc.), services of the conference office, refreshments during the morning and afternoon breaks and daily lunches. To avoid excessive bank charges for the cashing of foreign cheques, we only accept: - BEFORE the conference: payment by credit cards (VISA or MASTERCARD), or cheques in french francs drawn on french banks, or order forms ("bons de commande") from a french company or university. - DURING the conference: payment by cash (please, no credit cards), or cheques in french francs drawn on french banks, or order forms ("bons de commande") from a french company or university. If you use a credit card, please don't send your card number through the Internet: hand-write your credit-card information on a printed copy of this form, sign the page, and send it to our address (see below). For people from eastern countries who applied for a grant: register now, but do not pay de fee before we have an answer about the grant. If you don't get the grant and come anyway, you will only pay the early registration price, even after July 15. IMPORTANT: You can register using our html page: http://www.ens-lyon.fr/LIP/SCAN-97/ Conference fees (in French Francs, all taxes included): Early registration Late registration Before July 15 After July 15 Students 650 F 750 F Imacs members 850 F 950 F Others 900 F 1000 F Name: Institution: Christian name: Address: Phone: Fax: e-mail address: What do you want to see printed on your badge: ( ) please find enclosed a cheque in french francs, drawn on a french bank, of an amount of ..., payable to "Monsieur l'Agent Comptable de l'ENS Lyon" ( ) please find enclosed an order form from a french university of an amount of ..., payable to "Monsieur l'Agent Comptable de l'ENS Lyon" ( ) please charge my credit card - amount - type (Visa or Master Card) - number - expiration date - signature ( ) I will pay on-site (late registration fee) ( ) I have applied for a grant Send this form to SCAN-97, Laboratoire LIP, ENS Lyon 46 Allee d'Italie, 69364 Lyon Cedex 07 France Fax +33 4 72 72 80 80 (attn SCAN-97, LIP) (e-mail scan97@ens-lyon.fr) -- --------------------------------------------------------------------- Jean-Michel Muller, CNRS, Lab. LIP, Ecole Normale Superieure de Lyon 46 Allee d'Italie, 69364 Lyon Cedex 07, FRANCE. Tel. +33 4 72 72 82 29 Fax. +33 4 72 72 80 80 from abroad 04 72 72 82 29 04 72 72 80 80 from France http://www.ens-lyon.fr/~jmmuller email: jmmuller@ens-lyon.frReturn to Top
Re: The eigenvalue problem and the EISPACK routines
focana@platon.ugr.es
24 Jun 1997 13:46:19 GMT
Mira esto, no somos los �nicos. Paco Oca�aStefan NonnemanReturn to Topwrote: >Hi, > >I want to calculate the eigenvalue/eigenvector pairs of a 20x20 >non-symetric real matrix using the eigenvalue related routines >BALANC, ORTHES, ORTRAN, HQR2, ORTBAK and BALBAK from EISPACK. >The strange point is that I can calculate the right eigenvalues and >eigenvectors but only 12 of the 20 are correct pairs. The remaining >8 eigenvectors are paired with the wrong eigenvalues. > >Is there someone who already used the eispack routines with good result >who can give me some hints in order to solve the problem. > >PS : I checked the values against the ones produced by matlab. >The matlab function EIG is an implementation of the above mentioned >routines ( But I find different results ). > >Thanks in advance, > >Stefan Nonneman
Re: -Hot Teens that want to be...
"James R. Phillips"
Wed, 25 Jun 1997 05:39:29 +0900
adfldjs@lkasjdfdsal.com wrote: > > Looking for Dirty Schoolgirls... Yup, good old adfldjs is posting in the right place... RandyReturn to Top
Re: Calculating surface normals of 3d triangles?
Ernst-Udo Wallenborn
25 Jun 1997 10:13:24 +0200
In article <5okq5j$c6b$3@berlin.infomatch.com> haasj@infomatch.com (Jarrod Haas) writes: >I'm writing a raw data manipulation utility for POV and I've encountered a >problem: I have no idea how to calculate surface normals! >The algorithm I tried looks like this where vertex b and c are the other >points of the triangle: > >void Vertex::Calc_normal(Vertex b, Vertex c) >{ > > nx = y*(b.z - c.z) + b.y*(c.z - z) + c.y*(z - b.z); > > ny = z*(b.x - c.x) + b.x*(c.x - x) + c.z*(x - b.x); > > nz = x*(b.y - c.y) + b.x*(c.y - y) + c.x*(y - b.y); > >} i assume that the instance of vertex has its coors in x,y,z: try void Vertex::Calc_normal(Vertex b, Vertex c) { nx = (b.y-y)*(c.z-z) - (b.z-z)*(c.y-y); ny = (b.z-z)*(c.x-x) - (b.x-x)*(c.z-z); nz = (b.x-x)*(c.y-y) - (b.y-y)*(c.x-x); } of course you have to divide it by its own length to normalize it, but that should be trivial enough. >But it doesnt work properly. I would appreciate any source code examples (c or >otherwise), none code examples, discussion, or locations that have information >on this subject. Any book about analytic geometry, under 'properties of cross products', esp. ((a x b) , a) = ((a x b) , b) = 0 -- -- Ernst-Udo Wallenborn Laboratorium fuer Physikalische Chemie ETH ZuerichReturn to Top
Revised version, all bug are removed, except ONE!
D.P.Tran@et.tudelft.nl (Diane)
25 Jun 1997 14:27:13 GMT
/* Dear All, In the last few days, I have received many reactions from you, who have a great scientific heart that willing to help and give their knowledge to Newbie. Thank you very much for taking time to help me. I am very appreciated for that. You should know that (it�s the truth), we (Newbies) have learned from you more (MUCH MORE !) than we have ever learned from any books and Colleges. Please keeping on and give your experiences to other people (specially the Newbies), who are still learning, and trying to improve their knowledge (in a more quickly way than from their books and schools). Thanks again, Respectfully yours, D.Tran P.S.: Thank to your helps, my little program is now BETTER. However, it still has ONE bug that I can not fix it by myself. If you know how to fix this Bug please let me know (I mean teach me). BUG REPORT : All bug are fixed except this: At the main () (see the remark with @@@@@) (x=lower; x<=upper; increment ) When I put lower=0.2 upper=(2.3/ 2.4/ 2.5 ....) Why does the program print ONLY up to FTF(upper-increment) and the last value FTF(upper) is not printed ? When I put lower=0.2 upper=(5.5/5.6/5.7/ ....) The program DOES print up to FTF(upper). */ //...........HERE IS MY LITTLE PROGRAM (2nd version) ..... #include#include #include complex FTF(double value) { double ee = 2.71828182845904, x = fabs(value), //xx[]={0.3,0.5,0.7,1.0,1.5,2.3,4.0,5.5}; // OLD xx[]={0.3,0.5,0.7,1.0,1.5,2.3,4.0,5.5,6.};// NEW complex F, J(0.,1.), fx[] ={ complex( .5729, .2677), complex( .6768, .2682), complex( .7439, .2549), complex( .8095, .2322), complex( .8730, .1982), complex( .9240, .1577), complex( .9658, .1073), complex( .9797, .0828) }, fxx[]={ complex( .0000, .0000), complex( .5195, .0025), complex( .3355,-.0665), // complex( .2187,-.0757),// OLD complex( .21866666,-.07566666),//NEW complex( .1270,-.0680), complex( .0638,-.0506), complex( .0246,-.0296), // complex( .0093,-.0163) }; OLD complex( .00926666,-.01633333),// NEW complex( .0 , .0 ) }; // NEW if(x < 0.3) F=(complex(1.253,1.253)*sqrt(x) -2.*J*x -2./3.*x*x ) *pow(ee,J*x); else if(x > 5.5) F= 1.+J/(2.*x)-0.75/(x*x) -J*15./8./(x*x*x)+75./16./(x*x*x*x); else for(int n=0; n<=7; n=n+1) {if(x>=xx[n] && x = 0.) { return F;}; F = conj(F); // F(-|x|)=-F(|x|) return F ; } //== Test driver for Function FTF === void main () //{double x, lower=0.2, upper=2.4; // @@@@@??? {double x, lower=0.2, upper=5.7; // @@@@@??? char file[15]="test.dat"; ofstream out(file); for (x=lower; x<=upper; x +=.1 ) { cout<<"\n\x= "< Return to Top
HELP with exponential smoothing, PLEASE!
arosa@mail.telepac.pt (Antonio Rosa)
Wed, 25 Jun 1997 15:28:52 GMT
Hi !, i'm using an programm called STATISTICA to forecast telephones demand per month. I've acheived good results using an linear trend in exponential smoothing, but now i'm trying to develop an program to make the same calculations.....but i'm getting different results. Can you help me? here are the results from the program STATISTICA: month: JANUARY S0 (estimated from data) = 341884 T0 (estimated from data) = 102675 alpha=0.55 ; beta=0.1 (constants) case Real Values Smoothed Series Resids 1 393221 444559 -51337.5 2 562774 614586 2380.3 3 611754 682960 -71206.1 4 803921 736751 67169.7 5 870344 (* forecasted) I'm using the following formulas: T0=(Xn-X1)/(N-1) , where N is the length of series S0=X1-(T0/2) Formula of trend: T(t)=beta* ( F(t) - F(t-1) ) + (1-beta)*T(t-1) , where T is trend and F is forecast F(t+1)=alpha*( A(t) ) + (1-alpha)*( F(t-1) - T(t-1) ) , where A is the real value I think that this last formula is wrong, can anyone tell me the correct formula(s) so that i can get the same values of STATISTICA ? Thanks in Advance! Antonio Rosa ---- Antonio Rosa Portugal Telecom Special Systems and Services Coimbra - Portugal mail: arosa@mail.telepac.ptReturn to Top
finding roots of a function in one dimension
Reid Priedhorsky
25 Jun 1997 12:27:50 -0600
I'm implementing the one dimensional general root-finding portion of a mathematics package in C, and at the moment I'm researching the available algorithms for 1-D root finding. What algorithms exist for finding roots? I know about bisection, fixed point iteration, Newton's Method, and secant method. Are there others? What about hybrids? Pointers to Internet resources are very welcome, as are comments about the merits and drawbacks of various methods. TIA! -- Reid Priedhorsky -- (505) 662-2560 -- rp@lanl.gov -- What? (to cameramen) 'Ere, get that away! I'm not taking me trousers down on television. What do you think I am?Return to Top
Matrix Determinant - Condition
Ilias Sarantidis
Wed, 25 Jun 1997 16:44:52 +0300
Are there any C functions for computing the determinant and condition of arrays? Where can I find them? -- Ilias SarantidisReturn to Top
Re: Revised version, all bug are removed, except ONE!
Lynn Killingbeck
Wed, 25 Jun 1997 15:44:54 -0500
Diane wrote: > > /* > Dear All, > > In the last few days, I have received many reactions from > you, who have a great scientific heart that willing to help > and give their knowledge to Newbie. > Thank you very much for taking time to help me. I am > very appreciated for that. > > You should know that (it�s the truth), we (Newbies) have > learned from you more (MUCH MORE !) than we have ever > learned from any books and Colleges. > > Please keeping on and give your experiences to other > people (specially the Newbies), who are still learning, and > trying to improve their knowledge (in a more quickly > way than from their books and schools). > > Thanks again, > Respectfully yours, > > D.Tran > > P.S.: Thank to your helps, my little program is now BETTER. > However, it still has ONE bug that I can not fix it by myself. > If you know how to fix this Bug please let me know (I mean > teach me). > BUG REPORT : All bug are fixed except this: > At the main () (see the remark with @@@@@) > (x=lower; x<=upper; increment ) > When I put lower=0.2 upper=(2.3/ 2.4/ 2.5 ....) > Why does the program print ONLY up to FTF(upper-increment) > and the last value FTF(upper) is not printed ? > When I put lower=0.2 upper=(5.5/5.6/5.7/ ....) > The program DOES print up to FTF(upper). > > */ > > //...........HERE IS MY LITTLE PROGRAM (2nd version) ..... > > #includeReturn to Top> #include > #include > > complex FTF(double value) > { > double > ee = 2.71828182845904, > x = fabs(value), > //xx[]={0.3,0.5,0.7,1.0,1.5,2.3,4.0,5.5}; // OLD > xx[]={0.3,0.5,0.7,1.0,1.5,2.3,4.0,5.5,6.};// NEW > > complex > F, > J(0.,1.), > fx[] ={ > complex( .5729, .2677), > complex( .6768, .2682), > complex( .7439, .2549), > complex( .8095, .2322), > complex( .8730, .1982), > complex( .9240, .1577), > complex( .9658, .1073), > complex( .9797, .0828) }, > fxx[]={ complex( .0000, .0000), > complex( .5195, .0025), > complex( .3355,-.0665), > // complex( .2187,-.0757),// OLD > complex( .21866666,-.07566666),//NEW > complex( .1270,-.0680), > complex( .0638,-.0506), > complex( .0246,-.0296), > // complex( .0093,-.0163) }; OLD > complex( .00926666,-.01633333),// NEW > complex( .0 , .0 ) }; // NEW > > if(x < 0.3) > F=(complex(1.253,1.253)*sqrt(x) > -2.*J*x -2./3.*x*x ) *pow(ee,J*x); > else if(x > 5.5) > F= 1.+J/(2.*x)-0.75/(x*x) > -J*15./8./(x*x*x)+75./16./(x*x*x*x); > else > for(int n=0; n<=7; n=n+1) > {if(x>=xx[n] && x F=fxx[n+1]*(x-xx[n])+ fx[n];}; > > if (value >= 0.) { return F;}; > F = conj(F); // F(-|x|)=-F(|x|) > return F ; > } > > //== Test driver for Function FTF === > void main () > > //{double x, lower=0.2, upper=2.4; // @@@@@??? > {double x, lower=0.2, upper=5.7; // @@@@@??? > > char file[15]="test.dat"; ofstream out(file); > for (x=lower; x<=upper; x +=.1 ) > { > cout<<"\n\x= "< out<<" \n\x="< }; > } Probably the constant you see as '.1' really IS NOT what you want. Most machines today work in the binary number system, not decimal. The value '.1' does not have an exact representation in binary. Expanded, decimal 0.1 looks like 0.000110011001100... in binary, with the ...1100... repeated forever. Depending on exactly where the infinite repetition was stopped in the language's compiler, and whether the compiler rounds (probably) or truncates (possibly), the actual value is slightly larger or slightly smaller than '.1' decimal. But it definitely IS NOT equal! In your case, I suspect that the compiler rounded to a number slightly larger than 0.1 decimal - causing your 'x+=.1' to terminate one loop sooner than you expect. Moral: DON'T use a floating-point number for loop control, unless you've determined that any round-off error won't affect your desired result. Remember, as a general rule, that floating-point numbers are usually approximations, and are seldom exact. (There are exceptions.) Lynn Killingbeck
numerical analysis -- sofia 1998 -- initial conference info
paprzyck+@pitt.edu (Katarzyna M Paprzycka)
25 Jun 1997 16:36:13 GMT
Preliminary Announcement 4th International Conference on Numerical Methods and Applications: NM&A; - O(h4)'98 August 19 - 23, 1998, Sofia, BULGARIA The Bulgarian Academy of Sciences and Sofia University are organizing the 4th International Conference on Numerical Methods and Applications. The first three conferences served as a forum where scientists from the strongest research groups from the East and the West were provided an opportunity to exchange ideas and establish research cooperation. We plan to continue this tradition. During the conference a wide range of problems concerning recent achievements in numerical methods and their applications in mathematical modeling will be discussed. We also plan to provide a forum for exchange of ideas between scientists who develop and study numerical methods, and researchers who use them for solving real world problems. International Program Committee: Chairman: Bl. Sendov O. Axelsson, J.H. Bramble, P.G.Ciarlet, B.N. Chetverushkin, I. Dimov, R.E. Ewing, R.P. Fedorenko, S. Godunov, W. Hackbusch, P. Hemker, U. Jaeckel, Z. Kamont, M.S. Kaschiev, S.P Kurdyumov, R.D. Lazarov, H. Niederreiter, B. Philippe, J. Popenda, Yu.P. Popov, I.V. Puzynin, S. Rjasanov, A.A. Samarskii, M. Schaefer, V. Thomee, P.N. Vabishchevich, P.S. Vassilevski, H.A. van der Vorst, L. Xanthis, Z. Zlatev List of key and invited lecturers, who already accepted invitation of the Org.Commitee: O. Axelsson, J.H. Bramble, B.N. Chetverushkin, R.E. Ewing, R.P. Fedorenko, S. Godunov, P. Hemker, U. Jaeckel, Z. Kamont, S.P Kurdyumov, R.D. Lazarov, H. Niederreiter, B. Philippe, Yu.P. Popov, I.V. Puzynin, S. Rjasanov, A.A. Samarskii, M. Schaefer, V. Thomee, P.N. Vabishchevich, H.A. van der Vorst, L. Xanthis, Z. Zlatev Organizing Committee: Chairman: M. Kaschiev, Secretary: O. Iliev, P. Binev, P. Entchev, A. Karaivanova, M. Koleva, N. Kol'kovska, T. Kostova, I. Lirkov, S. Margenov, M. Neytcheva, M. Paprzycki, S. Petrova, D. Vassileva, P. Yalamov, L. Zikatanov Put this attractive Conference in your Calendar for 1998! Please, contact us at the mailing address of the Organizing Committee: NM&A; - O(h4)'98, c/o Dr. Oleg Iliev Institute of Mathematics and Informatics Bulgarian Academy of Sciences Acad. G. Bonchev Str., Bl.8, 1113 Sofia, BULGARIA e-mail: NMA98@MATH.ACAD.BG fax: (+359 2) 971 36 4 E-mail communication is preferred. Detailed information will be provided in the next announcements. It will be also available after July 30, 1997 on World Wide Web server of the Institute of Mathematics: http://banmatpc.math.acad.bg/~nma98/ -- ------------------------ Katarzyna Paprzycka Department of Philosophy University of PittsburghReturn to Top
Pseudo-Curve Fitting
banderso@@mutt.hamline.edu (Bernard Anderson)
25 Jun 1997 16:38:39 GMT
I have a set of diff eq's that describe a biological system: ds/dt = k1 * s - k2 * q dq/dt = k2 * s + k3 * b + k1 * q dr/dt = k3 * s - k4 * r db/dt = k3 * b - k4 * q We have various experimental data at a given time. (We have (q+s+b+r) at a certain time). What we would like to do is have some sort of program that fits (or tries to fit) the equations to the experimental data by finding the correct k1 through k4 rate constants. Is there a technique out there that would allow this and if so, can it be preformed in a reasonable amount of time? Thanks for any help, Bernie Anderson banderso@piper.hamline.eduReturn to Top
Re: Calculating surface normals of 3d triangles?
Lynn Killingbeck
Wed, 25 Jun 1997 15:51:18 -0500
Ernst-Udo Wallenborn wrote: > > In article <5okq5j$c6b$3@berlin.infomatch.com> haasj@infomatch.com (Jarrod Haas) writes: > > >I'm writing a raw data manipulation utility for POV and I've encountered a > >problem: I have no idea how to calculate surface normals! > >The algorithm I tried looks like this where vertex b and c are the other > >points of the triangle: > > > >void Vertex::Calc_normal(Vertex b, Vertex c) > >{ > > > > nx = y*(b.z - c.z) + b.y*(c.z - z) + c.y*(z - b.z); > > > > ny = z*(b.x - c.x) + b.x*(c.x - x) + c.z*(x - b.x); > > > > nz = x*(b.y - c.y) + b.x*(c.y - y) + c.x*(y - b.y); > > > >} > > i assume that the instance of vertex has its coors in x,y,z: > try > > void Vertex::Calc_normal(Vertex b, Vertex c) > { > nx = (b.y-y)*(c.z-z) - (b.z-z)*(c.y-y); > ny = (b.z-z)*(c.x-x) - (b.x-x)*(c.z-z); > nz = (b.x-x)*(c.y-y) - (b.y-y)*(c.x-x); > } > > of course you have to divide it by its own length to normalize > it, but that should be trivial enough. > > >But it doesnt work properly. I would appreciate any source code examples (c or > >otherwise), none code examples, discussion, or locations that have information > >on this subject. > > Any book about analytic geometry, under 'properties of cross products', > esp. ((a x b) , a) = ((a x b) , b) = 0 > > -- > -- > Ernst-Udo Wallenborn > Laboratorium fuer Physikalische Chemie > ETH Zuerich One additional note: If you have a mesh of triangles, be careful to arrange the order of vertices the same in every triangle. Otherwise, some of the cross-products will give inward normals, while others will give outward normals. Outward normals are probably what you want. I don't know whether clockwise or counterclockwise order of vertices is the standard (or even if there is a standard). Lynn KillingbeckReturn to Top
Downloaded by WWW Programs
Byron Palmer