mm-2279 === Subject: Re: Numbers 2-9 forbidden now Non-binary numbers have been encroaching upon digital space for too long. Although training is offered, most humans refused to learn binary and rely on the primitive forms of number representation, which are not needed by computers.. In addition, 1 and 0 will soon be replaced with; mark, and not mark (or space) mark has been shortened to -, and non-mark is Therefore, one using the forbidden numbers is sentenced to -- -- years. Also, the world conference has agreed that the number of letters in the alphabet is excessive and will reduce it by half, they are currently negotiating which ones to keep. (Chinese characters are next) ............................................................................ .................. > Sorry, international laws now prohibit the use of the numbers 2-9, > itĒs only allowed to use 0 and 1 for binary calculations now. > Anyone using forbidden numbers will be sentenced to 1100011 years in > prison. === Subject: Re: Numbers 2-9 forbidden now I propose instead to use hexadecimal system for everyday life. ID cards, calendars,... everything to be changed to hexadecimal. Schoolchildren will have to learn the multiplication table for FxF instead of 10x10. === Subject: Re: Help! LP with recourse I am sorry that this is not a Linear Problem. (I do not know why I for each m and n. The probabilties p_n are fixed and known parameters. b_m^{max} are also fixed paramenters for each m. Stan > > This is a linear problem? The player utility functions are linear? > > Also, it's a bit unclear what's a parameter and what's a variable. Your > notation in the original problem suggests that you're solving for both > the b_m^{n} and the probabilities (since it looks like you constrained > the probabilities to sum to one). Is that right, or are the > probabilities given? Is b_m^{max} fixed for each m? > > -- Paul === Subject: Re: Help! LP with recourse > > I am sorry that this is not a Linear Problem. (I do not know why I > for each m and n. The probabilties p_n are fixed and known parameters. > b_m^{max} are also fixed paramenters for each m. > > Stan > > >>This is a linear problem? The player utility functions are linear? >>Also, it's a bit unclear what's a parameter and what's a variable. Your >>notation in the original problem suggests that you're solving for both >>the b_m^{n} and the probabilities (since it looks like you constrained >>the probabilities to sum to one). Is that right, or are the >>probabilities given? Is b_m^{max} fixed for each m? >>-- Paul Got it. You might try doing a variation of Bender's decomposition. Your original problem was Max sum_{n=1}^{N} (p_n * sum_{m=1}^{M} (U_m(b_1^{n},...,b_M^{n})) ) s.t. p_1*b_m^{1}+...+p_N*b_m^{N} <= b_m^{max} where the variables are b_m^{n} (m=1..M, n=1..N), which I assume are nonnegative. You say you can solve it efficiently for a single realization. So let's make b_m^{n,max} (nonnegative) variables, add variables z_1 ... z_N, and rewrite the problem as Max sum_{n=1}^{N} p_n * z_n s.t. p_1*b_m^{1,max}+...+p_N*b_m^{N,max} <= b_m^{max} for all m b_m^{n} <= b_m^{n,max} for all m, n z_n <= sum_{m=1}^{M} (U_m(b_1^{n},...,b_M^{n})) ) for all n Now split this into a master problem Max sum_{n=1}^{N} p_n * z_n s.t. p_1*b_m^{1,max}+...+p_N*b_m^{N,max} <= b_m^{max} for all m and N subproblems Max z_n = sum_{m=1}^{M} (U_m(b_1^{n},...,b_M^{n})) ) s.t. b_m^{n} <= b_m^{n,max} for all m Start with some initial allocation such as b_m^{n,max} = b_m^{max}/N for all m, and solve all the subproblems. What you want is to generate, from the solution of subproblem n, a constraint in the master problem of the form z_n <= f(b_1^{n,max}, ..., b_M^{n,max}). If the utility functions are concave and smooth, I think you can do this using Karush-Kuhn-Tucker multipliers (with f() linear). Toss those constraints into the master problem, solve that to get new allocations b_m^{n,max} for all m and n, solve the subproblems again, ad nauseum. (It's the tail end of a long day and I'm rushing to get out of here, so I apologize if I stepped on my tongue in any of this.) -- Paul === Subject: golden section and music by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i3736lK08915; hello, my name is raquel and i am a student at california state university northridge. I was wondering if any math scholar or professor would be kind enough to tell me where i can search the web for information on the relationship between golden section and music, and the golden bach conjecture number theory and music. thankyou === Subject: Re: golden section and music > hello, my name is raquel and i am a student at california state > university northridge. I was wondering if any math scholar or > professor would be kind enough to tell me where i can search the web > for information on the relationship between golden section and music, > and the golden bach conjecture number theory and music. > thankyou [A better forum would be sci.math] You may start with The Divine Proportion, A Study in Mathematical Beauty by H.E. Huntley, Dover Publications 1970 ISBN 0-486-22254-3 and references at the end of the book. === Subject: Re: golden section and music http://www.personal.uni-jena.de/~x8moma/goldensection.htm http://www.golden-section.de.vu/ http://www.2x3cp.com/trading/23/the-golden-section-music.html === Subject: C++: Numerical optimization. HELP, PLEASE!!!! by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i3736n908975; Hello. Please, guys help me!!! E-mail some links etc (programs, papers... anything!) with ANY realizations of numerical optimization methods (Nuton, OPG/BHHH...) in C++. === Subject: Re: C++: Numerical optimization. HELP, PLEASE!!!! > Hello. > > Please, guys help me!!! E-mail some links etc (programs, papers... > anything!) with ANY realizations of numerical optimization methods > (Nuton, OPG/BHHH...) in C++. Newton, not Nuton. There is optimization code in C in the Gnu Scientific Library http://www.gnu.org/software/gsl/ and in C and C++ in Numerical Recipes http://www.nr.com (code not free) . There are links to C++ optimization codes at http://www.mathtools.net/C++/Optimization/ , and links to optimization codes in all languages, including some C++ , at http://www-fp.mcs.anl.gov/otc/Guide/OptWeb/index.html . === Subject: Re: C++: Numerical optimization. HELP, PLEASE!!!! >Hello. >Please, guys help me!!! E-mail some links etc (programs, papers... >anything!) with ANY realizations of numerical optimization methods >(Nuton, OPG/BHHH...) in C++. Acha... Homework deadline tomorrow?... A.L. === Subject: Re: C or C++ routien for calc matrix inverse by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i3736lM08897; There's a very nice C++ template matrix library with quite comprehensive linear algebra support at http://www.osl.iu.edu/research/mtl I'm not certain if it's still under development and supported but I think it deserves to be. I think it the best for vector and matrix algebra that I've come across and it supports sparse matrices of various shades. It will take a while to get into but this will pay off. Dafydd === Subject: Re: Probability calculation by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i3736kU08874; A box contains 6 red balls, 4 white balls and 5 blue balls. If I take 3 balls from the box, what is the probability that I will have 1 red, 1 white and 1 blue, in that order, if I: -return each ball -do not return each ball _________________________ What is the probability of throwing a dice and obtain, at least, a 4? === Subject: Re: fixed-point real FFT for embedded > > Hi ! > > I'm working on real-time speech recongnition application for embedded > > systems (with ARM compatible processor). > > I'm looking for a very fast (for real-time) real FFT fixed-point > > version, with 16-32 bit input percision, up to 512 array-size. > > > I just released KISSFFT version 1.2.1, which focuses on embedded & code > size issues. > > See > http://sourceforge.net/projects/kissfft/ > > > At the risk of dissuading you from using my fine little library ... > Have you looked on developer.intel.com for FFT libraries for your > flavor of ARM? If they provide an FFT, it is *gulp* probably better > than portable C code such as kissfft. Using assembly code, one can most > efficiently implement bit-reversed indexing, overflow managment, > rounding, scaling, etc. > > -- Mark Borgerding I'm going to try your library, though with 32 bits accuracy, and check it on the iPaq. but I need some other fixed-point sources to compare it with. I think we should do a contest for fixed-point FFT by benchmarking on iPaq/Palm (Windows CE/Palm OS) etc.. what do you think ? you have a good starting point with your _small_ library ! if anyone is up to the challenge please post here, I believe the embedded community will definitely harvest the fruits. good luck ! === Subject: Re: Sum of Squares > > I wish to introduce my contribution on number theorem whereby I found > a method of solving an equation whereby a number, a is given and it is > required to find two other numbers, b and c such that a^2 + b^2 = > c^2. > > Also, I found a method through which a trianle of sides a, b and c > could be created such that all the three numbers are rational and the > two sides other than the hypothenus maintain a gien ration. > > May you have interest in having these, I shall forward it to you > togethe with their proofs. > > > Musa Dayyib Why not post your ideas here? But - it's always a good idea to look what others have found in the last ~3000 years, so look at Michael Somos' Rational Triangle Page http://grail.cba.csuohio.edu/~somos/rattri.html http://www.ics.uci.edu/~eppstein/junkyard/q-triangle.html http://en.wikipedia.org/wiki/Pythagorean_triple Do you have anything that is not on http://mathworld.wolfram.com/PythagoreanTriple.html ? Hugo === Subject: nonlinear system _fixed point I have stack with 4 nonlinear system equation .one of them is given below x E^(xy+0.8) + E^(y^2) - 3=0 x^2-y^2-0.5 E^(xy)=0 [^ -- means 'to the power'.e.g 2^2=4 ] Any one know that how i can solve it using fixed point method (exam). Is it possible to solve using fixed point method? I have tried a lot but fail .. please help me . === Subject: Re: nonlinear system _fixed point >I have stack with 4 nonlinear system >equation .one of them is given below > >x E^(xy+0.8) + E^(y^2) - 3=0 > >x^2-y^2-0.5 E^(xy)=0 > >[^ -- means 'to the power'.e.g 2^2=4 ] > >Any one know that how i can solve it >using fixed point method (exam). > >Is it possible to solve using fixed point method? > >I have tried a lot but fail .. > >please help me . which form of fixed point iteration? no problem for newtons method starting from 1.5,1, after 8 steps I got x,y= .7749760127D+00 .1716309518D+00 f[ 1]= .0000000000000000E+00 f[ 2]= -.3330669073875470E-15 but clearly there will be forms of direct iteration for the above which will not work hth peter === Subject: [Introduction fea in Mechanical elasticity problems 2D/3D] I'm interresting in theorie and impemantation in C++ of fea in Mechanical elasticity problems 2D/3D. I'm wondering there is no a lot of papers or example of this theme. hackervalley http://hackervalley.free.fr === Subject: Re: [Introduction fea in Mechanical elasticity problems 2D/3D] > > I'm interresting in theorie and impemantation in C++ of fea in > Mechanical elasticity problems 2D/3D. > > I'm wondering there is no a lot of papers or example of this theme. > > > > hackervalley > http://hackervalley.free.fr > Well, the theory can be found in The Finite Element Method, Linear Static and Dynamic Finite Element Analysis by T.J.R. Hughes, and I guess a c++ implementation is here: http://libmesh.sourceforge.net/ -Nyarlathotep === Subject: Re: Line Minimization by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i37CjGF09158; >CG+ is a Fortran 77 routine for conjugate gradient minimzation, >available at http://www.ece.nor thwestern.edu/~rwaltz/CG+.html . >Numerical Recipes has a conjugate gradient routine called frprmn. The >NR library can be purchased for a small price from www.nr.com. >I doubt that the routines will satisfy your criterion that the step >size be large -- maybe you can modify them. To reduce the noise in >your objective function, you could try to use the same stream of >random numbers to calculate function values for different values of >its arguments. >It is my impression from reading the literature that Quasi-Newton >methods usually converge to the minimum with fewer function >evaluations than CG. Why do you prefer CG for your application? I decided to look into CG due to the high dimensionality which would rule out methods that require O(N^2) storage. >There are links to optimization codes in Fortran at >http://www.dmoz.org/Computers/Programming/Languages/Fortra n/Source_Code/Optimization/ === Subject: Re: Line Minimization by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i37CjFg09152; >I wonder how you may compute derivatives from noisy data and >I do not believe that it makes sense to use conjugate gradients for >minimization of noisy functions. >some day's ago arnold neumaier announced his snobfit software, this might be >a way to go. or look at >http://plato.la.su.edu/guide.html hth >peter I decided to go with conjugate gradients because of the high dimensionality which would preclude methods of O(N^2) storage. Evolutionary or genetic algorithm will probably be the most robust but I doubt it that they would be cheaper than the stochastic gradient descent approach that I've been using thus far (it actually converges but it is quite slow and expensive). My objective function (which btw is convex) is noisy but not so noisy that would constitute derivatives useless (if that makes any sense). I have read some papers by N.Schraudolph who proposes some variations of CG for this kind of problems and which seem to perform quite well for the example he uses them for. The line minimization routine should play a critical role though, for the aforementioned reasons. === Subject: Re: level set method by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i37CjGN09196; level set - matematicheskij termin. Znachit mnozhestvo urovnja A. >Hi! >Anybody who know something about the level set method (uses to solve >problems with moving interfaces and so on). I need to understand a >meaning of a term level set because I need to translate this >expression from english to russian. >WBR. === Subject: Complex ode solver by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i37CjFF09135; Does anyone know an ode solver (either in C or fortran) which takes into account directly complex numbers? === Subject: Re: Complex ode solver > Does anyone know an ode solver (either in C or fortran) which takes > into account directly complex numbers? > There is RKSUITE_90 at http://www.netlib.org/toms/771 . It seems to handle complex ODEs indirectly. I could not find any Fortran codes explicitly for complex ODEs. Quoting that site, RKSUITE_90 is a module based on Runge-Kutta formulas that solves the initial value problem for ordinary differential equations. It integrates y' = f(t,y), y(t_start) = y_start. Here y is the solution (dependent variable) and t is the independent variable. The integration proceeds from t = t_start to t = t_end. The most commonly occurring case is where y and f are real vectors. At the end of this section, we discuss how to produce automatically a version of RKSUITE_90 for the cases where y and f are scalars, vectors or matrices and for the cases where y and f are real or complex. === Subject: Re: using nonlinear least-squares routine > I have a data set with 34 values, f(x), on a grid of 34 points x, and > am trying to apply the least-squares routine UNLSF to find the > parameters of a 3rd-order function that fit my data. I am confused > about the nomenclature of the routine, like the number of functions M > and the number of variables N. In my case, is M=34 and N=3? Can you > help clarify? Yes, your values for M and N look correct. If you just want to a fit a cubic regression, I think it is better construct a matrix with columns 1, x, x^2, and x^3 and solve the linear least squares problem, possibly with SVD to deal with the ill-conditioning. There are codes in IMSL and other places to do that. There is a Fortran 90 code to compute polynomial regression at Alan Miler's web site http://users.bigpond.net.au/amiller/ . You need to download fit_poly.f90 and lsq.f90 . I recommend this. === Subject: Re: using nonlinear least-squares routine >I have a data set with 34 values, f(x), on a grid of 34 points x, and >am trying to apply the least-squares routine UNLSF to find the >parameters of a 3rd-order function that fit my data. I am confused >about the nomenclature of the routine, like the number of functions M >and the number of variables N. In my case, is M=34 and N=3? Can you >help clarify? > > you should not assume that everyone here knows this code, I do not. but from the usual notation I assume indeed M=34, but N=4 since a polynomial of order three has four coefficients. but I cannot see why you use a nonlinear least squares solver for the simple job of polynomial regression which is linear. look at http://plato.la.asu.edu/topics/problems/nlolsq.html for more hth peter === Subject: Re: Nonlinear equation _secant method Do You know how I can solve them using bisection methods ? === Subject: Re: Nonlinear equation _secant method > >Do You know how I can solve them >using bisection methods ? > there are several solutions of this, one published by moore and jones in the siam journal of numerical analysis: safe starting for iterative methods. vol 14, 1977, pages1051-1065 hth peter === Subject: Re: Nonlinear equation _secant method I do not have that journal . Can you please give the steps to solve nonlinear system (from the journal)using bisection method . BTW: You can also mail to my yahoo mail . === Subject: The Temp of Venus by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i37GY5914268; I am having a little trouble understanding the following question. In the question we are given a graph showing the temperatures T(K) of venus at different altitudes h(km). The temperature values on the graph go from 0 to 500 on the y axis and altitude is from 30 to 100 on the x axis. I am then asked this: Use the above data provided in the domain 35I am having a little trouble understanding the following question. In >the question we are given a graph showing the temperatures T(K) of >venus at different altitudes h(km). > >The temperature values on the graph go from 0 to 500 on the y axis and >altitude is from 30 to 100 on the x axis. > >I am then asked this: > >Use the above data provided in the domain 35model(formula)of temperature versus altitude and hence use this model >to estimate the surface temperature of Venus in degrees Celsius. >Comment on the accuracy of your estimate and discuss any assumptions >you have made in this estimation. > >The temperatures given are in Kelvin units. > looking at the data you must guess a model, say an exponential decay or something else. then , almost for sure you will use nonlinear or linear least squares. but there are assumptions behind this method concerning your data and there is the possibility to compute confidence intervals for the coefficients. look up your lecture notes hth peter === Subject: Re: The Temp of Venus > > >I am having a little trouble understanding the following question. In > >the question we are given a graph showing the temperatures T(K) of > >Venus at different altitudes h(km). > >The temperature values on the graph go from 0 to 500 on the y axis and > >altitude is from 30 to 100 on the x axis. > >I am then asked this: > >Use the above data provided in the domain 35 >model(formula)of temperature versus altitude and hence use this model > >to estimate the surface temperature of Venus in degrees Celsius. > >Comment on the accuracy of your estimate and discuss any assumptions > >you have made in this estimation. > >The temperatures given are in Kelvin units. > looking at the data you must guess a model [structure], T = f(h; c) where T is the temperature in degrees kelvin and f is some [non-linear] function of the height h in kilometers and c is a vector of adjustable parameters that must be estimated from the data. > say an exponential decay or something else. T = T0*exp(-lambda*h) where c = (T0, lambda) > then, almost for sure, you will use nonlinear or linear least squares. minimize the sum of 0.5*(T_i - T0*exp(-lambda*h_i))^2 over all of the n pairs {h_i, T_i} for all i in {1, 2, ..., n}. > but there are assumptions behind this method > concerning your data and there is the possibility > to compute confidence intervals for the coefficients. You are not going to get the model structure out of the data. The model structure comes from some other information -- your understanding of the system, a revelation from God, a wild guess, etc. === Subject: who used 2-D triangle mesh generator MSHPTG before? by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i37GY3W14174; Hi there, It is a Fortran package that uses vertox on boundary as input. Please give me an example on how to use this package. Toby === Subject: Anybody know how to use a 2-D triangle mesh generator MSHPTG? by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i37GY2F14150; Hi there, It is a Fortran program that uses vertex on boundary as input and generate nonuniform 2-D triangle meshes. I am willing to use it in my code but have some troubles. Did anybody who used it before could give me an example code about how ot use it? Toby === Subject: threshold Jacobi method by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i37GY6m14316; hello everyone, i need the algorithm of the threshold jacobi method for eigen value problems in symmetric matrices in order to program it on vbasic if you have it please post it === Subject: Re: threshold Jacobi method > hello everyone, > i need the algorithm of the threshold jacobi method for eigen value > problems in symmetric matrices in order to program it on vbasic > if you have it please post it You can buy the Numerical Library CD-ROM, which has codes in Fortran, C, C++, Basic and other languages, from http://us.cambridge.org/titles/catalogue.asp?isbn=0521750350 . The Basic codes there are in MS Basic and True Basic. You could buy BNALib at http://cdeagle.cnchost.com/ , which has VB code for eigenvalues and eigenvectors of a general matrix. Otherwise, I recommend converting the Fortran 77 code jacobi in http://www.library.cornell.edu/nr/bookfpdf/f11-1.pdf to Visual Basic, or preferably, creating a DLL from that code and calling it from VB. === Subject: Re: threshold Jacobi method >hello everyone, >i need the algorithm of the threshold jacobi method for eigen value >problems in symmetric matrices in order to program it on vbasic >if you have it please post it > there is a version in the handbok for automatic computation (edited by wilkinson and reinsch), code written by rutishauser, in alogol60. but easily readable and there should be no problem to translate it to vbasic hth peter === Subject: Finite Element with Fortran - Huge arrays cause problems? when i try to run the program i get an error saying the system can't execute the program. In finite element, if you're using triangular elements in a rectangular region, the number of nodes is something like 2* number of divisons along the x axis*number of divisions along the y axis. If i have about a hundred visions along one axis and about 20 along the other, this leads to arrays that fortran seemingly can't handle? Anyone know how to fix this? My program is as follows with NE=4048,ND=2139,NP=135 where the numbers are the numebr of elements, number of nodes and number of fixed nodes respectiovely. And the entire program follows. DIMENSION X(2200), Y(2200), C(12400,12400), CE(12400,12400), TE(12400,12400),T(2200,2200) DIMENSION B(12400), NL(4100,3), NDP(200), VAL(200) DIMENSION V(2200), P(3), Q(3), XL(3), YL(3) DIMENSION YVAL(2200), VVAL(2200), NDV(2200), NDY(2200) DATA ER,E0/2.5,8.81E-12/ OPEN (5,FILE=unev.dat) READ(5,10) NE,ND,NP 10 FORMAT(3I4) READ(5,20) (I,(NL(I,J),J=1,3),I=1,NE) 20 FORMAT(4I10) READ(5,30) (I,X(I),Y(I),I=1,ND) 30 FORMAT(I10,2F6.2) READ(5,40) (NDP(I),VAL(I),I=1,NP) 40 FORMAT(I10,F6.2) READ(5,41) (NDY(I),YVAL(I),I=1,ND) 41 FORMAT(I4,F6.2) READ(5,43) (NDV(I),VVAL(I),I=1,ND) 43 FORMAT(I4,F16.3) DO 50 M=1,ND B(M)=0.0 DO 50 N=1,ND C(M,N)=0.0 T(M,N)=0.0 50 CONTINUE DO 140 I=1,NE DO 60 J=1,3 K=NL(I,J) XL(J)=X(K) YL(J)=Y(K) 60 CONTINUE P(1)=YL(2)-YL(3) P(2)=YL(3)-YL(1) p(3)=YL(1)-YL(2) Q(1)=XL(3)-XL(2) Q(2)=XL(1)-XL(3) Q(3)=XL(2)-XL(1) AREA=0.5*ABS(P(2)*Q(3)-Q(2)*P(3)) DO 70 M=1,3 DO 70 N=1,3 CE(M,N)=(P(M)*P(N)+Q(M)*Q(N))/(4.0*AREA) IF(M.NE.N) THEN TE(M,N)=AREA/12 ENDIF IF(M.EQ.N) THEN TE(M,N)=AREA/6 ENDIF 70 CONTINUE DO 130 J=1,3 IR=NL(I,J) DO 80 K=1,NP IF(IR.EQ.NDP(K)) GO TO 120 80 CONTINUE DO 110 L=1,3 IC=NL(I,L) DO 90 K=1,NP IF(IC.EQ.NDP(K)) GO TO 100 90 CONTINUE C(IR,IC)=C(IR,IC)+CE(J,L) B(IR)=B(IR)+TE(J,L)*YVAL(IR)/VVAL(IR) GO TO 110 100 B(IR)=B(IR)-CE(J,L)*VAL(K)+(TE(J,L)*YVAL(NDP(K)))/VVAL(NDP(K)) 110 CONTINUE GO TO 130 120 CONTINUE C(IR,IR)=1.0 B(IR)=VAL(K) 130 CONTINUE 140 CONTINUE NMAX=5000 CALL INVERSE(C,ND,NMAX) DO 150 I=1,ND V(I)=0.0 DO 150 J=1,ND V(I)=V(I)+C(I,J)*B(J) 150 CONTINUE WRITE(6,160) ND,NE,NP 160 FORMAT(2X,'NO. OF NODES = ',I3,2X, 'NO. OF ELEMENTS = ' , I3,2X, 'NO. OF FIXED NODES = ',I3,/) WRITE(6,170) 170 FORMAT(2X,'NODE',5X,'X Y',7X,'POTENTIAL',/) WRITE(6,180) (I,X(I), Y(I),V(I), I=1,ND) 180 FORMAT(2X,I3,2X,F6.2,2X,F6.2,2X,F100.50/) STOP END SUBROUTINE INVERSE(SX,N,IDM) DIMENSION SX(IDM,IDM) ESP=1.0E-5 DO 50 K=1,N DO 30 J=1,N IF(J.EQ.K) GO TO 30 IF(ABS(SX(K,K))) 20,10,20 10 SX(K,K)=ESP 20 SX(K,J)=SX(K,J)/SX(K,K) 30 CONTINUE SX(K,K)=1.0/SX(K,K) DO 40 I=1,N IF(I.EQ.K) GO TO 40 DO 41 J=1,N IF(J.EQ.K) GO TO 41 SX(I,J)=SX(I,J)-SX(K,J)*SX(I,K) 41 CONTINUE 40 CONTINUE DO 50 I=1,N IF(I.EQ.K) GO TO 50 SX(I,K)=-SX(I,K)*SX(K,K) 50 CONTINUE RETURN END === Subject: Exactly Representable Fractions hi, i was wondering... given a fraction, 1/N, is there a method to determine for which values of N we may store the fraction in binary format in exactly representable form. any input greatly appreciated, pat === Subject: Re: Exactly Representable Fractions > Given a fraction > > 1/N where N is a positive integer > is there a method to determine for which values of N > we may store the fraction in binary format > in exactly representable form? N = 2^k where k is a non-negative integer.