work, life

I've been coding a ray tracing toolkit that does a lot of quadratics, to find the intersections of rays with spherical surfaces. If the roots are pathologically closely spaced, computing the discriminant (b**2-4ac) becomes a problem, but if the roots are very different in magnitude (which is the other, and more common, source of problems with quadratics), you just flip the equation around and solve for 1/x (taking sgn(0) = 1)

-b - sgn(b)*sqrt(b**2-4*a*c) x1 = --------------------------- 2*a

2*c x2 = ---------------------------- -b -sgn(b)*sqrt(b**2-4*a*c)

The second quadratic equation is one of those obvious things that lots of people don't think of because they learned the first formula in their youth. (I think I found it in Acton about 20 years ago, an event closely followed by the sound of a loud forehead slap.)

The normal equation system for the basis set {1, x, x**2, ....} is so ill-conditioned for high orders that it rapidly becomes numerically indeterminate even if the data are exact. (It's the famous Hilbert matrix.)

One way of seeing this is that the Chebyshev polynomial of order N is bounded between y = +-1, but has a leading coefficient of 2**N.

If you rearrange terms and divide by 2**N, you get

x**N = (some polynomial of order N-2) + E/2**N

where -1 packages, and a neat saturating S32.32 math package for the 68K, as useful as

I usually use either singular value decomposition or just the ratio of the transforms, followed by windowing in the time and/or frequency domains to control the noise gain. Alternatively you can just smooth off the target function to keep the noise gain reasonable. If you just go for it, the noise gain is what it is.

I mostly agree. But there are a bunch of other pretty things that are actually useful, especially in the relationships between infinite series and contour integrals, and in asymptotic methods such as steepest descents, WKB theory, and higher-order stationary phase.

One of these times I have to try out an FPGA.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs
Loading thread data ...

Event driven programs, e.g. what you need to implement a GUI, are structured pretty much like that. The OS feeds you a stream of window messages, which you typically handle with a big switch statement or a table of function pointers, one per message type.

It's been done several times, e.g. Hypersignal, which I actually bought around 1994 or so. (Might have been '96.) Never used it for anything real.

Universities seem to have settled on Matlab for everything.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

And your being a rude useless git isn't mine, but there we are.

It arises amongst other

Of course we do polynomial curve fits to straighten ADC and DAC curves, and linearize time ramps and temperature things, but a numerical curve fit is not "solving a quadratic" in the sense that this thread has been using.

As I said, use the standard equation; Wikipedia has it, in case you've forgotten. And as I said, I haven't had to do that in decades of electronic design.

I'm an engineer, so I do what works. I don't need to know polymer chemistry to make PC boards, and I don't need to derive trig identities to use them. If I find a curve fit subroutine, and it obviously works, I don't have to study every line of code. I finish the product, put up a web page, sell them, and do something else.

People who don't have jobs, or the responsibility to meet payrolls, can dawdle with math in their plentiful spare time.

Yes, but if an nth order curve hits every point, why would a higher order curve hit every point but flail wildly in between? I've seen that in commercial poly regression programs and I don't think it's fundamental.

Sorry that you are easily bored. I design maybe a dozen products or systems a year and think about a lot more, and it's not boring, so I don't dawdle (often) with symbolic math puzzles.

I've done a lot of that, but it's tedious and documents poorly. The S32.32 thing let me keep everything in actual units all the way through. Nowadays, with hardware floats being basically free, faster than scaling integer math, we do PID and trig type stuff as floats.

Which is why I called it "the deconvolution problem", visible below.

and frankly if you don't understand why you

It works great and was great fun to play with. The algorithm is fast and iterative but involves no transforms, so doesn't have the problems of the classic techniques. I was going to design a USB TDR system, build a fast but ugly TDR and clean it up with a trained FIR filter, but it's hard to compete with used 11801/SD24 systems that are cheap on ebay. Some day, maybe. Never, if things keep coming in like they are now.

There is an infinite number of things that I don't know. I am priviliged to be able to explore some of them, and to pick the ones that are fun and profitable. And to implement them in hardware, which is the fun part.

There are lots of papers by PhDs that do it just that way. How would you do it?

The filter evolves quickly and works. The "target" and "filtered" waveforms can't be distinguished on that screen because one perfectly covers the other.

100% blather. How would you do it?

How would you derive the FIR filter that convolves an ugly step into a nice Gaussian step?

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

Hey, nobody grasps it, so I'm not embarassed. The Obamacare site is said to have

500 million lines of code. Grasp them, if you have time on your hands.

Exactly! Fun toys, and profitable. And brutally reliable.

Well, it's not working.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

I'd be corrupting youth, if there was any youth on Usenet.

--

John Larkin         Highland Technology, Inc 

jlarkin at highlandtechnology dot com 
http://www.highlandtechnology.com 

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom laser drivers and controllers 
Photonics and fiberoptic TTL data links 
VME thermocouple, LVDT, synchro   acquisition and simulation
Reply to
John Larkin

Actually it is, but only very slowly. Today's development tools and optimising compilers are way better than what was available a decade ago and that is down to the research work of universities.

But the first mover advantage, ship and be damned culture of the big players in the software industry makes it hard for things to improve. Junior engineers fresh out of university can be pretty easily bullied into conforming with a crazy high octane corporate culture.

What you measure gets controlled and if the primary objective is to ship stuff and get paid for it surprise surprise that it what happens.

--
Regards, 
Martin Brown
Reply to
Martin Brown

Surprise, surprise. Academic programming doesn't work in the real world any better than academic economics. I'd bet it's for the same reason.

Reply to
krw

There are a lot of *ideas* that get incubated in schools. The problem is that most of those ideas aren't immediately "portable" to Industry. So, you rely on people with vision and resources and PATIENCE to turn them into reality.

Left to their own devices, schools build ivory towers *or* "bastards" that try to appease the needs of one (or more) "sponsors" -- usually failing to please the needs of *any*!

Exactly. And, if the person doing the work is not the one making the decisions as to *how* it will be done, what hope is there for change? How likely are the "worker bees" to invest (gamble) on a better approach if all they effectively see is downside risk? I.e., if things work well SOMEONE ELSE is richly rewarded. And, if the pooch gets screwed, it's their own tail!

And, looking from the shortsightedness of the consumer upwards, the *only* way to win is to drive cost to zero (regardless of what that does to quality, reliability, etc.). Even a temporary

*increase* in cost (e.g., to bring a new technology onboard that may LOWER your future costs) is a risky undertaking!

Note that most folks have no problem bottom feeding when it comes to their own personal *health* (sedentary lifestyles, lack of exercise, poor eating/sleeping habits, lack of preventative measures, weight control, exposure to toxins, etc.). Yet, once their tit's in the ringer, "bar no expense" to *fix* them!

Reply to
Don Y

Right. Why would Computer Scientists care about reliable computing systems?

And why would they care about programming? Computers have more important things to do than run programs.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

hines that are (usually) synchronously clocked. And the designers plan and understand the states. A program has states, but the number is essentially uncountable and the states are not generally visible or controlled.

ite memory machine. It is just that 2^(8 x 2^32) ~ 10^(10^10) or 10^(10,000 ,000,000) if you prefer. Is a very very large number and most machine state s are not useful ones

values of any variable that can control program flow. Big number. A formal state machine would have one declared state word, and it would seldom have even 8 states. But the critical point is that every state would be named an d accounted for.

our hardware is a toy by comparison.

re is no real theory, and there is no drive, in academia or most industry, for software quality.

y in academia and designing new languages that use the ability of fast comp uters to enumerate vast combinatorial permutations systematically to defend against the sort of common human errors we know get made.

d be world-famous, and their grads would be in enormous demand. Is there on e?

to be true of the USA. CalTech seems pretty good. But remember that the bes t graduates tend to go on and do research. The UK list is:

omputer%20Science

n undergraduate computing course (they used to be research only).

s show that they also include hardware development it is quite a wide rangi ng course spanning theory and practice.

sity is in the worlds top twenty animation centres:

Effects/

edingly rare (though some new releases appear now to have performance probl ems as they have pushed the envelope too far).

sity. I cooked them breakfast, including my famous Pancake Descending A Sta ircase. I asked her, the Dean, what sort of programming they taught these d ays. I got an icy response, "We don't teach programming." oops, sorree, wro ng thing to ask a Computer Scientist.

s?

Not necessarily what her response implied. She might not have wanted to tal k about the subject with a bumptious hardware designer with an inflated ide a of his own competence. Or maybe she doesn't do technical conversations un til after she's had her coffee.

--
Bill Sloman, Sydney
Reply to
Bill Sloman

Hence, the benefits of economic downturns!

BigCo lays off workers due to downturn. Most workers move on to other employers, spreading BigCo's bad business practices, but a few, realizing the opportunity, decide to implement change in a new business. New business revolutionizes industry, and brings in innovation. BigCo buys out new little firm, and claims the innovation as its own... ;-)

Reply to
Charlie E.

...and proceeds to install all of its business practices into the new acquisition. Rinse, repeat.

Reply to
krw

Depends. Companies that get too pathological go away or get bought out and their management replaced. Unlike government entities, which just fester.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

Unfortunately, as is often the case, BigCo then works hard to "infect" the new acquisition with its broken systems. Then wonders why the acquisition is suddenly less capable/agile. Someone's "empire" needs to be fed and, rather than realizing THEY are the problem, tries to bring their "benefits" (wisdom, good practices, structure, etc.) to the acquisition.

Folks get "wed" to their past decisions and can't bring themselves to embrace new paradigms -- even if you can PROVE to them that their old systems are the things that are presently hindering them!

"But, we've got all this analog design expertise!" (then find a market where *that* is an asset; it's not going to help you design the new generation of products in your traditional market!)

"We've got all this ASM code written for M68K's!" (but ARMs are faster and cheaper and you can write in a HLL in this century -- your codebase is worthless. Deal with it.)

"We've got all these robots capable of cutting and welding metal pipe in all these various configurations!" (but new products are carbon fiber based. Find someone who wants to buy your lot of industrial robots while they still have value!)

Reply to
Don Y

Not necessarily. Cadence is still there... ;-)

Reply to
Charlie E.

Like Government Motors...

Reply to
Robert Baer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.