Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Resistance; once more into the breach.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Rodger Rosenbaum  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 10:20
Newsgroups: comp.sys.hp48
From: Rodger Rosenbaum <nos...@aol.com>
Date: 31 Oct 2009 05:20:03 -0500
Local: Sat 31 Oct 2009 10:20
Subject: Resistance; once more into the breach.
In 2006 there was a thread concerning the calculation of parallel resistances:

http://groups.google.com/group/comp.sys.hp48/browse_frm/thread/aabdab...

Then in 2007 I picked up the topic again:

http://groups.google.com/group/comp.sys.hp48/browse_thread/thread/2d4...

Now I think I've come up with a way to cause all of the computations to be done
with 15 digit arithmetic with only user RPL commands.

The idea is to start with a list of resistor values such as:

{ 6124. 1700. 8602. 6034.}

and convert it to a 1x1 matrix containing the resistor values as an explicit sum
of reciprocals.  In other words, the above list should become:

[[ 1./6124.+1./1700.+1./8602.+1./6034 ]]

Then invert the matrix by pressing the 1/x key.  On the HP48G series, and its
descendants the HP49G+ and HP50G, all of the arithmetic appears to be done with
15 digits.

The examples Joe Horn gave that failed on all the previous user RPL programs:

{ 6124. 1700. 8602. 6034.}

{ 2808. 8850. 9487. 6824.}

give the correct result with this method.

The example I gave, {11599 60411 80364 67092}, that fails with 15 digit
arithmetic, still fails with this new scheme, as expected.

I invite the reader(s) to come up with a program to make the conversion from a
list of values to a 1x1 matrix of a sum of the reciprocals of those values.

The program I came up with is such a kluge that I'm ashamed to post it until I
see if somebody else can do a better job.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 14:06
Newsgroups: comp.sys.hp48
From: Dave <davidbr...@gmail.com>
Date: Sat, 31 Oct 2009 07:06:19 -0700 (PDT)
Local: Sat 31 Oct 2009 14:06
Subject: Re: Resistance; once more into the breach.
On Oct 31, 6:20 am, Rodger Rosenbaum <nos...@aol.com> wrote:

> I invite the reader(s) to come up with a program to make the conversion from a
> list of values to a 1x1 matrix of a sum of the reciprocals of those values.

> The program I came up with is such a kluge that I'm ashamed to post it until I
> see if somebody else can do a better job.

Here's a nice succinct implementation:
<< INV \GSLIST 1 ROW\-> 1 ROW\-> INV 1 GET >>

Note that I don't think this will work on a 48S/SX (needs the G/GX
list processing features).

-Dave


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
The Phantom  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 18:32
Newsgroups: comp.sys.hp48
From: The Phantom <phan...@aol.com>
Date: 31 Oct 2009 13:32:01 -0500
Local: Sat 31 Oct 2009 18:32
Subject: Re: Resistance; once more into the breach.

This works ok if the numbers in the starting list are exact integers, and the
calc is in exact mode.

With exact mode, the program << INV \GSLIST INV >> gives the desired final
result for parallel resistors (one might want a final EVAL in there).

I'm looking for a way to do it if the starting numbers are approximate, and the
calc is in approximate mode.

If you're starting with { 2. 3. }, for example, the first INV in your program
will give { .5 .333333333333 }, and you're dead in the water.

I want to end up with [[ 1./2.+1./3. ]].  The divisions associated with the
reciprocals mustn't happen until the matrix is inverted.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John H Meyers  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 21:06
Newsgroups: comp.sys.hp48
From: "John H Meyers" <jhmey...@nomail.invalid>
Date: Sat, 31 Oct 2009 16:06:47 -0500
Local: Sat 31 Oct 2009 21:06
Subject: Re: Resistance; once more into the breach.

On Sat, 31 Oct 2009 05:20:03 -0500, Rodger Rosenbaum wrote:
> [[ '1./6124.+1./1700.+1./8602.+1./6034' ]] @ quotes added

> Then invert the matrix by pressing the 1/x key.
> On the HP48G series, and its descendants the HP49G+ and HP50G,
> all of the arithmetic appears to be done with 15 digits.

Do you mean HP49G, since HP48G[X] (and earlier)
do not have symbolic matrices?

Brilliant idea for HP49/50!

[r->] [OFF]


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John H Meyers  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 21:28
Newsgroups: comp.sys.hp48
From: "John H Meyers" <jhmey...@nomail.invalid>
Date: Sat, 31 Oct 2009 16:28:04 -0500
Local: Sat 31 Oct 2009 21:28
Subject: Re: Resistance; once more into the breach.

{ 6124. 1700. 8602. 6034. }

\<< 1. \<< 1. SWAP ::/ DTAG
IF NSUB 1. > THEN ::+ DTAG END \>>
DOSUBS \->ALG INV \->NUM \>>

@ [r->] [OFF]


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John H Meyers  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 21:34
Newsgroups: comp.sys.hp48
From: "John H Meyers" <jhmey...@nomail.invalid>
Date: Sat, 31 Oct 2009 16:34:28 -0500
Local: Sat 31 Oct 2009 21:34
Subject: Re: Resistance; once more into the breach.
Forgot to make a "Matrix":

{ 6124. 1700. 8602. 6034. }

\<< 1. \<< 1. SWAP ::/ DTAG
IF NSUB 1. > THEN ::+ DTAG END \>>
DOSUBS \->ALG { 1. 1. } \->ARRY INV ARRY\-> DROP \>>

@ [r->] [OFF]


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rodger Rosenbaum  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 23:16
Newsgroups: comp.sys.hp48
From: Rodger Rosenbaum <nos...@aol.com>
Date: 31 Oct 2009 18:16:06 -0500
Local: Sat 31 Oct 2009 23:16
Subject: Re: Resistance; once more into the breach.
On Sat, 31 Oct 2009 16:06:47 -0500, "John H Meyers" <jhmey...@nomail.invalid>
wrote:

>On Sat, 31 Oct 2009 05:20:03 -0500, Rodger Rosenbaum wrote:

>> [[ '1./6124.+1./1700.+1./8602.+1./6034' ]] @ quotes added

>> Then invert the matrix by pressing the 1/x key.
>> On the HP48G series, and its descendants the HP49G+ and HP50G,
>> all of the arithmetic appears to be done with 15 digits.

>Do you mean HP49G, since HP48G[X] (and earlier)
>do not have symbolic matrices?

What the HP48G does that the the HP48S doesn't do, is to carry out matrix
arithmetic with all 15 digit arithmetic.  Paul McClellan reworked the linear
algebra routines to achieve that result.

That's what I was thinking of when I said HP48G.  It's been so long since I've
played with my HP48G that I was thinking that an object like [[ ' 1./5.' ]]
wouldn't be symbolic since it doesn't have any literal variables. :-(

However, this is not so.  You're right, you can't have algebraics in matrices on
the HP48G.

So my new scheme only works for the HP49 and after.

BTW, I noticed while playing around with all this that the fraction:

29782376044851960
-----------------
  3779523269677

which is the exact solution for these resistor values:

{ 87039 17111 86195 22040 }

doesn't evaluate to a properly rounded 12 digit floating point number after
executing ->NUM.]

Has it been known before that ->NUM doesn't always round properly?

It appears that it converts the numerator and denominator separately to floating
point and then divides.  This is interesting, because it means that just using
the exact arithmetic capability of the HP49/50 to get a rational exact solution
and then converting it to a 12 digit floating point number with ->NUM won't give
as good a result as my matrix scheme for { 87039 17111 86195 22040 }.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John H Meyers  
View profile   Translate to Translated (View Original)
 More options 1 Nov, 03:37
Newsgroups: comp.sys.hp48
From: "John H Meyers" <jhmey...@nomail.invalid>
Date: Sat, 31 Oct 2009 22:37:47 -0500
Local: Sun 1 Nov 2009 03:37
Subject: Re: Resistance; once more into the breach.

I don't see how \->NUM could evaluate a general algebraic expression
without doing exactly that, since otherwise any intermediate results
could only be integers, although I suppose the actual issue
is that this conversion may be to ordinary reals,
rather than to "long" reals?

Although you note that numeric matrix operations, in 48G/49G/50G series,
are carried out with "long real" precision, what about during
evaluation of symbolic expressions?

What, then, when operating with a "matrix" whose element(s)
are themselves symbolic expressions?

'29782376044851960/3779523269677' \->NUM @ 7879.92927146

[[ '29782376044851960/3779523269677' ]] \->NUM @ [[ 7879.92927146 ]]

The desired result is 7879.92927145, so no joy thus far.

Continuing with some other simple experiments:

[[ '1./7.' ]] INV @ [[ 7. ]]

Since '1./7.' INV already produces 7.
this is not yet remarkable.

[[ '0.+1./7.' ]] INV @ [[ 7. ]]

This last example is a bit more remarkable, since:

'0.+1./7.' \->NUM @ 0.142857142857 @ INV @ 7.00000000001

'0.+1./7.' INV @ '1/(0.+1./7.)' @ \->NUM @ 7.00000000001

Placing the symbolic within a matrix, then performing a function,
but without ever using \->NUM,
seems to have somehow improved the numerical accuracy,
even though all numerics in the input were reals!

[[ '0+3779523269677/29782376044851960' ]] INV @ [[ '29782376044851960/3779523269677' ]]

Oh well -- I must leave it to someone with more time,
to figure out how to more accurately evaluate '29782376044851960/3779523269677'

Note that many of you have one extra hour to complete that task tonight!

[r->] [OFF]


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Hayden  
View profile   Translate to Translated (View Original)
 More options 3 Nov, 22:29
Newsgroups: comp.sys.hp48
From: Dave Hayden <d...@larou.com>
Date: Tue, 3 Nov 2009 14:29:44 -0800 (PST)
Local: Tues 3 Nov 2009 22:29
Subject: Re: Resistance; once more into the breach.
Rodger Rosenbaum suggested this program:

<< DUP PILIST OVER DUP / OVER * ROT / SIGMALIST / >>

I came up with a similar program that's slightly smaller:
<< DUP PILIST DUP ROT / SIGMALIST / >>

The results are still no better however.

Dave


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google