Maker Pro
Maker Pro

Prefered resistor range

L

Larry Brasfield

[Useless invective cut.]
If tables "...are used...for certain limited arbitrary data and to correct for those few results that do not agree
with the publish tables when computed algorithmically" which is your bullsh_t way of saying WHEN THE "ALGORITHM" FAILS, then you
don't have much of an algorithm,

I suppose, in your world, it would be a better
algorithm to duplicate whatever calculation
errors led to those odd values. Or devise
some hoky polynomial of sufficiently high
order to fit the misfits, then not recognize it
as the equivalent of a lookup table.

I am thankful that your influence is so limited.

What do you make of the fact that the odd 7
values near the middle of the E24 series are
too low and just 1 is too high near, but not
at, the end of the series, recognizing, as you
must, that the underlying exponential has no
possiblity of such behavior? And what do
you make of the fact that only the E24 (and
consequently E12) series has that behavior
whereas the finer-stepped series do not?

Those are honest questions, Fred -- a chance
to exhibit some of that intellectual firepower
you would seem to possess.

[Useless invective cut.]
But you go ahead and sit on your little self-styled pedestal of superiority- the more you open your ignorant, pompous, mouth, the
more we can point out your pedestal is a pile of pig sh_t.

Wow! Do I detect, from your slightly obscured
spelling, the beginning of a move away from your
obsession with excrement? I hope it is something
you are doing for your own good rather than mine.
And I hope your invisible friends let you continue.
 
F

Fred Bloggs

Larry said:
I suppose, in your world, it would be a better
algorithm to duplicate whatever calculation
errors led to those odd values.

Actually they are not "odd values" at all- but your perspective is very
telling. As I have stated before, to the point of becoming tedious, your
narcissism is so pronounced that you once again declare the whole world
defective when it fails to live up to your ego centric fiction.
Or devise
some hoky polynomial of sufficiently high
order to fit the misfits, then not recognize it
as the equivalent of a lookup table.

Nah- an approach which although highly sophisticated compared to your
Perl kluge, is still too pedestrian to be truly successful.
I am thankful that your influence is so limited.

What do you make of the fact that the odd 7
values near the middle of the E24 series are
too low and just 1 is too high near, but not
at, the end of the series, recognizing, as you
must, that the underlying exponential has no
possiblity of such behavior? And what do
you make of the fact that only the E24 (and
consequently E12) series has that behavior
whereas the finer-stepped series do not?

Those are honest questions, Fred -- a chance
to exhibit some of that intellectual firepower
you would seem to possess.

It took me about 60 minutes of sheer joy to break that code- I will not
reveal it yet- having too much fun reading the conjectures. Right now we
have Brasfield, Woodgate, and the Phantom in the race. Phantom is
leading, but Woodgate is starting to heat things up. Brasfield comes in
dead last because he thinks he knows everything and is content to stay
with his little Perl kluge, whereas Phantom and Woodgate are in the
numerical explore phase, actively searching for answers and recognizing
inconsistencies- good for them.


eh- shut- the-f-up...snip the rest of your garbage.
 
R

Robert Monsen

Fred said:
Well- I am here to tell you that 1) the explanation about color contrast
is bunk, 2) no curve fit necessary, and 3) there exists a very-very-very
simple formulation to calculate precisely every single value to three
digits without the mysterious roundoff error effect due to preferred
values. You know how to do this too- just stop playing your games.

I don't know how to do this. The simple 10^(i/N) formula doesn't work,
particularly for the 20%, 10% and 5% values.

Could you post it? And please, no basic... :)

Thanks

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.
 
R

Robert Monsen

The said:
And in answer to Robert Monsen, modern computers are *really* fast.
You don't really notice the time the routine takes. If you're only
going to do a few computations the results will seem instantaneous.
If you're going to do what Terry is doing, do what I describe below.

Right, it was the generate and test algorithm I was a bit concerned with
when I posted.
I have done the same sort of thing Terry Given describes, finding
optimum combinations of resistors. I just call the Basic routine a
few times and fill an array with the values. This is just as fast as
having a static table, but I don't have to have all the tables as I
mentioned above. I just create the tables or portions therof that I
need.

Ok, caching is a usually a good strategy.

Sadly, I don't have a basic interpreter, so I guess I'm stuck with the
clumsy table lookup. It's ok, since I already have all the values typed
(actually cut and pasted) in here:

http://home.comcast.net/~rcmonsen/resistors.html

You have a cute routine, though. Curve fitting is fun. Somebody had alot
of fun doing it, I think. That "if 919, output 920" is hilarious.

I'm hoping Bloggs posts the simpler scheme he claims to know.

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.
 
L

Larry Brasfield

The Phantom said:
-------> But using that kind of

Can you explain what you mean by this? Maybe with an example of how
tables would be better than the little routine?

I am not saying that a complete change from a
formula based computation to table lookups
would be an improvement. In general, I try
to use tables for values that are inherently
arbitrary. For example, the allowed values
for tolerance might be 1%, 5%, and 10%.
There is no real reason, apart from people
favoring numbers related to how many
digits they find on their hands, for those
numbers to be used. Now imagine that
series of numbers generated by, say, a
quadratic formula given inputs {1,2,3},
probably with rounding, to produce that
same set of values. Some people would
see it and say "Neat!" Other people may
notice it took 3 input numbers to get 3
output numbers. Still others wonder how
it will fare when a new value is added to
the series, say 0.5% (woops, gotta revise
the polynomial and the rounding scheme)
or 20% (probably just requires a cubic in
lieu of the quadratic).
The routine I gave will take up less space than than all the tables
for E12, E24, E48, E96 and E192.

I'm not sure that's true if the code space
needed for computing the transcendental
functions is charged against your "space".
It could be close, but I imagine you may be
right if an FPU or uncharged (DLL) library
handles the serious arithmetic.

[snip]
 
A

Active8

On Tue, 15 Mar 2005 20:07:10 -0800, Robert Monsen wrote:
Christ I hate perl. What a monstrosity. I'd learn javascript
<snip>

JS is much like C/C++ and so is PHP which IMO, is the preferred CGI
scripting language. Python isn't a bad language, either. I never did
like perl, but reading about perl did at least open my eyes to how
malformed queries can cause commands to be executed as root. IIRC,
the backtick " ` " in a perl script tells the perl executable to
execute a system command and if it's slipped into a query properly
and there's no input validation, you're screwed.
 
R

Robert Monsen

Active8 said:
On Tue, 15 Mar 2005 20:07:10 -0800, Robert Monsen wrote:


<snip>

JS is much like C/C++ and so is PHP which IMO, is the preferred CGI
scripting language. Python isn't a bad language, either. I never did
like perl, but reading about perl did at least open my eyes to how
malformed queries can cause commands to be executed as root. IIRC,
the backtick " ` " in a perl script tells the perl executable to
execute a system command and if it's slipped into a query properly
and there's no input validation, you're screwed.

Cool trick. Thanks... ;)

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.
 
J

James T. White

John Woodgate said:
I managed to locate T Roddam's explanation, in a Letter to the Editor,
May 1984. This includes a very interesting piece about calculations
using preferred values. I can't render it in ASCII, because it includes
logs to base 6! So I'll scan it and put it on A.B.S.E. as 'Preferred
values and colour codes'.

John,

Did you post this? If so, my news service missed it. Would you be so kind as
to post it again?

Thanks.
 
T

The Phantom

It took me about 60 minutes of sheer joy to break that code- I will not
reveal it yet- having too much fun reading the conjectures. Right now we
have Brasfield, Woodgate, and the Phantom in the race. Phantom is
leading, but Woodgate is starting to heat things up. Brasfield comes in
dead last because he thinks he knows everything and is content to stay
with his little Perl kluge, whereas Phantom and Woodgate are in the
numerical explore phase, actively searching for answers and recognizing
inconsistencies- good for them.
I guess Fred isn't going to give us the answer. I was hoping. :)
 
L

Larry Brasfield

The Phantom said:
I guess Fred isn't going to give us the answer. I was hoping. :)


Fred posted something clever on this a few weeks back.
It looked like it might have nearly replicated the process
that was used to create the values long ago, when folks
used published logarithm tables with 4 or 5 decimal digits
of precision to do arithmetic. (Of course, his post speaks
for itself; I say this only to suggest it is worth a look.)
 
F

Fred Bloggs

The said:
I guess Fred isn't going to give us the answer. I was hoping. :)

I did post it under "E96 series computation", E192 and E48 left as
exercise for the student:


For the **E96** series the basic calculation is something like this,
where Log's are base 10, and R is input value normalized to 100<=R<1000,
IROUND is round-to-nearest-integer function:

X=1.5*LOG10(R) % compute and scale log base 10 of R
F=FRACT(X) % fractional part of X
Y=INT(X) % integer part of X
RSTD=IROUND(10^((Y+ IROUND(64*F)/64)/1.5)) % standard value output

In words, for normalized R in range 100 to <1000 to be converted to
standard value with hand calculator:

1) compute logarithm base 10 and multiply by 1.5
2) note integer portion and subtract off
3) multiply remaining fraction by 64
4) mentally round that result up/down to nearest integer and then divide
by 64
5) add back in original integer portion subtracted in step 2)
6) divide the above by 1.5
7) take antilog ( raise 10 to this power)
8) round result to nearest integer

It turns out that 920 is a genuine error in the original tabulation of
E192, not a part of E96 and lesser precision series, and 919 should be
the entry instead for E192, unless there is an ancient multi-point
smoothing interpolation I am overlooking. This and a bit more logic to
filter the RSTD calculated produces the correct results, and there is a
very simple theoretical basis for this that I am certain follows the
original thinking and computation. The original table was not generated
using the above formula- the formula is a luxury not available to the
original number crunchers and is an analog of their computation. The
formulation for the other series, which is similar, and of any other
series to be created with specified tolerance makes for an elegant
generalization of which the E96 formula is just one instance.

Some numbers from pi 31415927 say to spot check 314,141,415,159,592,927:

314 X=3.7453945 F=0.7453945 Y=3 RSTD=316
141 X=3.2238287 F=0.2238287 Y=3 RSTD=140
415 X=3.9270721 F=0.9270721 Y=3 RSTD=412
159 X=3.3020957 F=0.3020957 Y=3 RSTD=158
592 X=4.1584826 F=0.1584826 Y=4 RSTD=590
927 X=4.4506196 F=0.4506196 Y=4 RSTD=931

These results are right on. The formula has been checked in other ways
so that 1) standard values are always returned and 2) deviations from
absolute closest standard value to arbitrary input R are hopelessly lost
as noise compared to tolerance.
 
Top