Thread View: comp.sources.hp48
1 messages
1 total messages
Started by Carlos Ferraro
Thu, 19 Nov 1992 21:10
v07i044: poly.cf - Poly v2.2, Part01/01
Author: Carlos Ferraro
Date: Thu, 19 Nov 1992 21:10
Date: Thu, 19 Nov 1992 21:10
219 lines
10975 bytes
10975 bytes
Checksum: 2978283719 (verify with brik -cv)
Submitted-by: Carlos Ferraro <carlos@fy.chalmers.se>
Posting-number: Volume 7, Issue 44
Archive-name: poly.cf
BEGIN_DOC poly.doc
(Unshure of which version you have? Hit REVIEW once you are
in the LIBRARIES menu !)
Gbg. , November 92
Hello everybody!
This is a very little (1702 bytes) and very fast (full
sys-rpl !) xlib to deal with the fundamental polynom necessities:
ROOTS (all roots of poly), PDIV (poly div), PMULT (obvious),
PADD (poly add), PEVAL (poly eval in a point), PDER (poly der).
IMPORTANT : Unlike other polynom utilities I use vectors
instead of lists to represent polynoms.
## ROOTS takes all the roots (real or complex) of a real poly.
Up to 2nd degree polynoms can also have complex coefficients.
An aptent to round every element of the resulting polynoms,
as well as every root - taking the real and imaginary
parts of the complex numbers separatelly - is made.
Sometimes it works fine, sometimes not, see :
Taking the roots of [ 4 33 68 15 ] :
the answer { -4.9999999998 -3 -.25000000005 } = { -5 -3 -.25 }
comes in 1,78 seconds !!!
Taking the roots of [ 5 16 18 18 13 2 ] gives
the answer { -1 (0,-1) (0,1) -2 -.2 } in 7,1 seconds !!
Taking the roots of [ (1,0) (9,0) (20,0) (12,0) ] gives
the answer { (-6,0) -2 -1 } after only 2 seconds !!
Observe that althought the coefficients look complex, they
are merely real numbers !
## PDIV checks for 2 vectors at level 1 and 2 and if not found,
dispatches to the usual / (division). It will give the
(eventual) rest at level 2. If it's found to be close to
zero, it won't appear.
## PMULT checks for 2 vectors at level 1 and 2 and if not found,
dispatches to the usual * (multiplication)
## PADD is obvious.
## PEVAL takes a vector from level 2 and a number or a
symbol from level 1.
## PDER takes a vector from level 1.
In the next coming versions I may replace PDER by
a prog taking rational poly as well. Also PADD may desappear and
instead a partial fraction "solver" will come.
INSTRUCTIONS FOR DOWNLOADING:
First you must uudecode or ASC-> the corresponding versions.
In order to make it really ease for you, I include both
the code of the librarie and an auto-instalation program called INSTL in a
directory called XLIBS which simply will auto-purge itself once the lib is
installed ! Simply go into XLIBS and press INSTL. The calc will turn off, but
don't worry, it's part of the instrucctions! When you turn it on, you'll find
a little surprize in your CST! Yes, I include 1 menu-label (GROB) called
POLY who will auto-include in your CST...for your comfort!
Once the libs are installed, the values are :
Library POLY , LID 1224 , bytes 1702 , chksum #15FAh .
(Observe that this values are from taking "bytes" when the stack shows :
Library 1224 : POLY )
INSTRUCCIONS TO PURGE THE LIBRARIES:
Althought I can't imagine why anybody would like to purge this beauty,
here it is:
:&:1224 DUP DETACH PURGE
Thanks ...
a lot to Detlef Mueller for his <-LIB-> and <-RPL-> !!
Any questions? Call me!
END_DOC
BEGIN_ASC poly.asc
%%HP: T(1)A(R)F(.); @ tasc v2.52 file
"69A20FF71CE00000005094E43545C450D9D20E1632C2A201400054E647562702
07F6274702E627A047F60296E6374716C602C696263702A347A204B2A24B2A28
4E201065B2130AC422B7FC1858A1C2A203300094E6374716C6C696E676A0C696
26271627965637E2E2E2ED2A2485A184E2020C41384E204034354513B51A1456
3284E205085C494243597632A3212041A14563284E203034354597632FD332B4
402F1732DCC025DF22DBBF1DCC02E13A193632B21309510020C4132004B2074D
005105F4C4950202A30223E22302341627C6F637729323518C4C3C0000000CEB
0050000D9D20119208C40090770B2130D9D20ECE819FF3029E208C460030040D
9D20C2D5029E208C46003223029E208C46003223072C50B2130B2130D9D20BA0
D144230EF116EEDA1803A2EEDA12C23088130EEDA13223090DA1473B12C23059
9A12C23090DA133F06599A13223076BA1EF116ED2A2EEDA150FA133F06ED2A2E
EDA150FA1B2130D9D20BA0D198050AEC81FEF30322309C2A29C2A203D4371040
073E5954500D4702A1704B2A2E04163A1164B2A24B2A24B2A2C121612040E041
6CBD30FED30516162A17083416A1826516162E2307E31628216CB9A2479A26B3
169A216CB9A2479A2B60167A726AF0167E316EF116CB9A2479A26B316C1216CB
9A2479A28DF0644230834165304091D308C170EF11688130CB9A2EF116E5216C
B9A2189A288130F1AA1B67A28DA16D9D20442309C2A29C2A2B2130D9D20E5216
E5216CB9A2A3216940402E230CB9A2189A22C230EF9A2C1216940402E230CB9A
29A21628216CB9A2189A259230EF9A2B2130881306B316479A20E516747267E3
16479A20F51672C5026025339201990000000000010178A24CB2666F068C170E
0416E62309C2A27E31629E208C4B00029A26B43629E208C4B00029A23F2A2C20
D1B2130D9D20881302653047A2003D4303D43B21300D4706B31630040D2C26D9
D207E3168DA3632230D1730442309FF3059230D17304423050FA1599A1DEE32D
6E2040C4963747F125079E60D6E2040C496374772D70B2130D9D206B316D0040
D2C26D9D207E31629E208C4A0029E208C4B003223029E208C4B009B136D6E204
0C4963747F125079E60D6E2040C496374772D70B2130D9D207E3168813029E20
8C49008813029E208C4A0029E208C4B003223029E208C4B009B136D6E2040C49
63747F125079E60D6E2040C496374772D7029E208C41001DF6029E208C4800B2
130B213079470B2130D9D201981644230AC4363C3704B2A2433706B316FED305
2330BA0D1980506B436FBD81479A2C20D1B2130D9D209BC269C2A2925B2189A2
009A23392049900000000000106B8A2CB916D9D209C2A2925B2B2130B213088C
4500D9D20ECE8171040D9D20BA0D1980506720588130FC436B9F06AEC81BD370
122705233012270FBD81CB9A212270E9330433706B436C20D1B2130B213088C4
400D9D20FDE81ADB46D9D2032230BA0D198050AEC815C2263991685230881303
0040CBD30523304B2A233F069FF30CBD3047A2003D4303D43B21300D4702A170
6B3165233076BA17E316EEDA16B316E0E30881300E5163004091D308C1707947
076BA1B2130B213088C4300D9D20FDE8120C46D9D201413614136CA13047A200
3D4303D43B21300D4704EC30CB916322307E3166B436B0591189A2009A2AEC81
29E208C470051163B2130B213088C4200D9D20FDE8120C46D9D2014136881306
2D36D9D20C0726BA0D144230CD263B2130141368813062D36D9D2085230BA0D1
44230CD263B21304EC30CB916322301413614136CA130CBD30E0E3012F0647A2
003D4303D4303D4303D43B21300D4709FF30E0416D17304423083416EEDA16B3
16DEE32F0E737E316FED30300407F37012270E0416D17304423083416EEDA112
270E0E3029E208C47006B316DEE32F0E73511634337079470B2130FEF30EEDA1
B213088C4100D9D20FDE8120C46D9D20141368813062D362AC81141368813062
D36D9D2085230BA0D144230CC363B2130B0591CA130189A2262052C230672050
3D43B2040073E5954500D47083416AEC81BD37012270C6416D173044230ED2A2
12270FBD817E316189A2262055F6A2E041626205322307F4917F370122708527
038D302FA30CB916D9D20122702E23012270C5416D173044230EEDA190DA1B21
3043370122707E316AEC8138D302FA30CB916D9D209FF30C5416D17304423050
FA1B2130433706B316C20D188130BC963339200000000000000010A88A28DA16
D9D207E31626205AEC81E9330B2130442307E31679470C20D1B2130FEF3050FA
1B213088C4000D9D20ECE8171040D9D20881302653062D362AC81881308A7533
9916D9D20852302AC81B2130442309E55047A20D6E2040C4963747B21300D470
29E208C4800D6E2040C496374779470B2130B2130E4A2014000A5FFF45DFF4EB
FF55BFFC7AFF8F9FF699FFC39FFC67FFEE4FF354FF6F3FFE4A20CC0000000000
0000000064000860000000000000000000000000000000000000000000000000
000000000950004005449465100400514444430040054454255005025F4F4453
50005005D455C4452005005546514C4400D20009500082000650003200035000
171E45D0040343545134047A2047A20E1B20F30008000051000000000000000C
D5410455410C558004458004CD900000000D9D2088704119208C400FBD819761
4B2130B2130B2130CEC2"
@ BYTES: #2CECh 1960
END_ASC
BYTES: #2CECh 1960
BEGIN_UU poly.uue
begin 644 poly
M2%!(4#0X+466*O!_P0X````%24Y35$P%G2W@82,L*A`$`$5N=&5R('!O<G0@
M;G(*=&\@:6YS=&%L(&QI8G,@.G0J0"LJM**"Y`(!5BLQH$PB>\^!A1HL*C`#
M`$EN<W1A;&QI;F<*;&EB<F%R:65S+BXNWJ)"6!I(+B#`%(/D`@1#4U0Q6Z%!
M92-(+E"`Q90D-)5G(SH2`A0:5#:"Y`(#0U-4>3;R/2-+!/)Q(\T,4OTBO?O1
MS"`>HY%C(RLQD!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+8`E
M`Z*,L1(#1#*07@5T*M#F`@1,:7-T*S$`30>2+H!,"-#F`@1,:7-TEW2P$@,K
M,>"D`D$`H/7_5/U/OO]5^\^G__CY;YG_//G/=O_N]#]%__;S[Z0"S```````
M`````$8`@`8`````````````````````````````````````D`4`!%!$258!
M0``51$0T``101$52!5`@]?1$-04`!5!-54Q4`E``5605Q$0`+0"0!0`H`&`%
M`",`,`4`<>%4#4`P-$450T"G`G0JX+$"/P"````5`````````,!=%$!5%,!5
A"$!4"$#<"0```-#9`H@'%)$"R`3PVQAY%K02`RLQL!(#
`
end
sum -r/size 27921/2733 section (from "begin" to "end")
sum -r/size 50947/1968 entire input file
END_UU
--
+--------------------------+----------------+
| carlos@fy.chalmers.se | "The ultimate |
| Carlos Angel Ferraro | truth was the |
| Mathematical physics | penultimate |
| University of Gothemburg | falsehood..." |
| SWEDEN | |
+--------------------------+----------------+
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads