Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Back in the dark ages, when I was in school, we were "encouraged" to take a
numerical analysis course if we were interested in computers. (I was an EE major.) It was not an easy topic, but it made us well aware of the difference between correct results and computational precision. I was recently astonished to find that most computer science students have no concept of this area and even less interest in it. These current thoughts extend to other areas: - C is more accurate than Fortran (or Basic, or what whatever) - Obtaining "stable" numeric results means you get the same answer if you run the program twice - C produces the fastest programs - if C is good then C++ is better - Using all the obscure C operators produces a better program (Anyone remember the IBM 7030 system? The user could control the rounding direction of the floating point LSB. In this case running a program twice (with different rounding options) really was relevant.) Bill W2WO |
#2
![]() |
|||
|
|||
![]()
Dear Bill:
I too am appalled at the abandonment of a solid numerical analysis course in engineering education. Consider the common problem of solving a set of linear, independent algebraic equations. Students have to be shown that Cramer's rule will not work when using the (inevitable) finite resolution of a computer or calculator. Of course, some of the time Cramer's rule does work so it is important to teach students why it does not work in general. This is relevant to antennas where we routinely need to solve large sets of equations. When using a computer to perform calculations, one needs to think differently about methods than in the day when one needed to use large sheets of paper and a pen. If one is to use numbers, one needs to know the limitations of methods of use. 73 Mac N8TT -- J. Mc Laughlin; Michigan U.S.A. Home: "Bill Ogden" wrote in message ... Back in the dark ages, when I was in school, we were "encouraged" to take a numerical analysis course if we were interested in computers. (I was an EE major.) It was not an easy topic, but it made us well aware of the difference between correct results and computational precision. I was recently astonished to find that most computer science students have no concept of this area and even less interest in it. snip Bill W2WO |
#3
![]() |
|||
|
|||
![]()
This doesn't really matter anymore in the U.S. but it is important that
other countries do not abandon it.We do not rely on home grown engineers as we have in the past since a simple telephone call offshore meets our economic needs. Art "J. Mc Laughlin" wrote in message ... Dear Bill: I too am appalled at the abandonment of a solid numerical analysis course in engineering education. Consider the common problem of solving a set of linear, independent algebraic equations. Students have to be shown that Cramer's rule will not work when using the (inevitable) finite resolution of a computer or calculator. Of course, some of the time Cramer's rule does work so it is important to teach students why it does not work in general. This is relevant to antennas where we routinely need to solve large sets of equations. When using a computer to perform calculations, one needs to think differently about methods than in the day when one needed to use large sheets of paper and a pen. If one is to use numbers, one needs to know the limitations of methods of use. 73 Mac N8TT -- J. Mc Laughlin; Michigan U.S.A. Home: "Bill Ogden" wrote in message ... Back in the dark ages, when I was in school, we were "encouraged" to take a numerical analysis course if we were interested in computers. (I was an EE major.) It was not an easy topic, but it made us well aware of the difference between correct results and computational precision. I was recently astonished to find that most computer science students have no concept of this area and even less interest in it. snip Bill W2WO |
#4
![]() |
|||
|
|||
![]()
"J. Mc Laughlin" wrote in message
... I too am appalled at the abandonment of a solid numerical analysis course in engineering education. Consider the common problem of solving a set of linear, independent algebraic equations. Students have to be shown that Cramer's rule will not work when using the (inevitable) finite resolution of a computer or calculator. I was never shown that, but I do remember it being drilled into our heads that Cramer's rule was the bogosort of linear system solving -- just about the least efficient means you could possibly choose, and that it existed primarily because it can be useful to have a closed form solution to a system of equations. Numeric analysis of linear systems is an incredibly in-depth topic, as far as I can tell. Books such as SIAM's "Numerical Linear Algebra" spends hundreds of pages going over it all. ---Joel |
#5
![]() |
|||
|
|||
![]()
"Bill Ogden" wrote in message
... Back in the dark ages, when I was in school, we were "encouraged" to take a numerical analysis course if we were interested in computers. (I was an EE major.) It was not an easy topic, but it made us well aware of the difference between correct results and computational precision. I was recently astonished to find that most computer science students have no concept of this area and even less interest in it. Realistically 90+% of CS students are going to end up in jobs programming web pages, databases, and other applications where it just isn't going to matter. There just isn't time in the curriculum these days to cover everything... For that matter, these days something like understanding the effects of finite precision in integer arithmetic and how it relates to fixed point DSP calcuations is probably applicable to a larger number of students! (OK, ok, I'd be the first to admit that college courses have been dumbed down over the years as well, but this is a direct reflection of the fact that industry just doesn't _think_ they need that many engineers who DO know the 'hard core' bits...) These current thoughts extend to other areas: - C is more accurate than Fortran (or Basic, or what whatever) Arbitrary statement (on the student's part). - Obtaining "stable" numeric results means you get the same answer if you run the program twice Ditto. - C produces the fastest programs There is some truth to this, perhaps if only because so much more work (as far as I can tell) has been done on C optimiziers than for other languages. Perhaps a better statement would be, "With novice programmers, C tends to produce the fastest programs." - if C is good then C++ is better C++ does have a lot of nice benefits over regular old C. The last time I programmed in FORTRAN it was FORTRAN 77, but I can only imagine that FORTRAN 90 has some nice improvements over FORTRAN 77 as well. (And Delphi is purpoertedly a nice improvement to Pascal, etc...) - Using all the obscure C operators produces a better program Uggh. ---Joel |
#6
![]() |
|||
|
|||
![]()
On Mon, 25 Apr 2005 17:47:55 -0700, "Joel Kolstad"
wrote: - C produces the fastest programs There is some truth to this, perhaps if only because so much more work (as far as I can tell) has been done on C optimiziers than for other languages. Perhaps a better statement would be, "With novice programmers, C tends to produce the fastest programs." Hi Joel, I skipped this groaner the first time through. You could program in almost any language to the same speed of performance if you simply focused on the 5% bottleneck and coded it in assembler. Nearly every "optimizer" consists of saving a lazy programmer's bacon when they sloppily write poor control structures and assignment statements. It should be called a de-babelizer. 73's Richard Clark, KB7QHC |
#7
![]() |
|||
|
|||
![]()
Hi Rich,
"Richard Clark" wrote in message ... I skipped this groaner the first time through. You could program in almost any language to the same speed of performance if you simply focused on the 5% bottleneck and coded it in assembler. Good point, although in the case of highly sophisticated CPUs (superscalar, VLIW, etc.), the difficulty in getting all the cache and register access scheduling optimal is difficult enough that there are typically very few people who can consistently do better in assembly than a high level language with an optimizer. In many cases selecting a better algorithm might buy one a lot more! |
#8
![]() |
|||
|
|||
![]()
On Tue, 26 Apr 2005 08:35:35 -0700, "Joel Kolstad"
wrote: Good point, although in the case of highly sophisticated CPUs (superscalar, VLIW, etc.), the difficulty in getting all the cache and register access scheduling optimal is difficult enough that there are typically very few people who can consistently do better in assembly than a high level language with an optimizer. In many cases selecting a better algorithm might buy one a lot more! Hi Joel, Almost every performance gain you describe is hardware limited - not software limited. If you can conspire to make every reference call a cache hit, you win, but 99.999% of the applications used by everyone here (including antenna modeling) fail in that one regard and stumble over the rest of the "optimizations." When I look at my performance monitor, it is idling along at 0 to 2% usage as I type (no surprise). When I pull up a page from the New York Times (before I set my firewall filters to turn off advertising) it would peg at 100% ad infinitum (I guess there's an ironic pun in that). I dare say that no one is using optimized code for running Nike ads - or if they are, that it makes any appreciable difference at 2GHz (with a memory access running at, what, 10% of that?). What HAS been optimized is the data compression schemes that make up for sloppy code (the problem is undoubtedly a memory leak or a failed garbage collection routine). In a sense, I used client side optimization to kill the advertising stream. 73's Richard Clark, KB7QHC |
#9
![]() |
|||
|
|||
![]()
I love "religious wars" over languages and algorithms!!!
grin Warmest regards, John "Richard Clark" wrote in message ... On Mon, 25 Apr 2005 17:47:55 -0700, "Joel Kolstad" wrote: - C produces the fastest programs There is some truth to this, perhaps if only because so much more work (as far as I can tell) has been done on C optimiziers than for other languages. Perhaps a better statement would be, "With novice programmers, C tends to produce the fastest programs." Hi Joel, I skipped this groaner the first time through. You could program in almost any language to the same speed of performance if you simply focused on the 5% bottleneck and coded it in assembler. Nearly every "optimizer" consists of saving a lazy programmer's bacon when they sloppily write poor control structures and assignment statements. It should be called a de-babelizer. 73's Richard Clark, KB7QHC |
#10
![]() |
|||
|
|||
![]()
On Tue, 26 Apr 2005 08:45:36 -0700, "John Smith"
wrote: I love "religious wars" over languages and algorithms!!! Hi Brett, Well, I've programmed in them all from binary to AI - so that makes me an agnostic. 73's Richard Clark, KB7QHC |
Reply |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
JvComm32 and other digisoft on WinXP | General | |||
Mismatch Uncertainty and an EZNEC transmission line sudy | Antenna | |||
EZNEC v. 4.0 at Dayton | Antenna | |||
3 antennas modeled with EZNEC | Antenna | |||
Eznec modeling loading coils? | Antenna |