From: tinywanda@aol.com (TinyWanda)
Newsgroups: comp.sys.hp48
Subject: --The Cabbage Shui Method--
Lines: 307
NNTP-Posting-Host: ladder01.news.aol.com
X-Admin: news@aol.com
Date: 18 Nov 1998 12:17:10 GMT
Organization: AOL http://www.aol.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <19981118071710.03756.00002335@ng110.aol.com>
Xref: republic.btigate.com comp.sys.hp48:18722


Cabbage Shui    [ Cab-Badge Ssssch-way ]

  The Deeply Spiritual Guide 
  To Finding Your Harmonious Circumference.

Brought to you by: The TinyWanda Collective
--------------------------------------------- ::

Have you ever wondered if your life is in Harmony with the Great Cabbage, That
Cabbage of which no greater Cabbage may be imagined...???

Eh?

Is there a Quantitative Process which will allow you to Determine an accurate
measurement of your Harmonious Status...! (?)
Is there...???

Huh?

Yes---There is.
Its called; Cabbage Shui.

Cabbage Shui is based on the ancient belief that things that most closely
resemble the Great Cabbage are themselves more spiritually pure and more
deserving than People &/or Things that dont or arent.

People that are green and leafy are held in greater awe than people that are
pinkish, brown, Or yellowish and Oblong...

But there are other criteria as well.
The Great Cabbage is thought to be essentially spherical...

...Or Roundish, And derivative of that, Is the ratio of pi that is related to
roundish things.
Thus; Things that relate to pi are more beloved by the Great Cabbage than
things which are not.

How can you determine if youre Schematically related to pi?

The Cabbage Shui Program for the HP48 can help you do this!

------------------------------------------------------:: o

The Cabbage Shui Directory
-----------------------------------------o    ::-:

The Directory consists of 5 programs;

Shui    Determines how closely your data set equals pi
CFz     Compares two lists of Common Factors
Fctrz   Creates a list of Factors for a given number 
Bep     Makes a variety of beeping noises.

Bonus Program!
Prm?    Determines if a number is Prime.
-----------------------------------------o    ::-:

How To Use The Programs

>-----------------------------:: o 
Shui
The idea of Determining your Harmonious Circumference is based on using a Set
Of Numbers that are somehow related to Your Personal Situation...???
These numbers could be taken from Measurements of your Bodily Proportions, The
height of things in your home, Apartment or room, The numbers of items of
clothing that you have, Numbers from your Personal telephone directory, Numbers
relating to a Hobby or Business, Or the increments of Time when Important
things happen to You during any given day...???

This collection of whole integer numbers should then be assembled into a list
and put on the stack.

1:    { 238 26 17 989 666 45 902 ... }

You can use as many or as few numbers as youd like.
The more you use, The Happier the Great Cabbage will be, 
But the longer it will take to determine the results.

Then simply hit Shui.
A reminder will come up... 
That its expecting a list of numbers...
Hit Enter, And sit quietly for a few moments.

The Display will provide a Countdown.

The Screen will then display a number that should be close to pi.
The closer it is to pi, The Happier The Great Cabbage is with you.

The last line on the Message Box is how far the number, 
That should be pi, 
Deviates from pi, As a percentage of that deviation.

Hit OK or ON to Return to Normal Calculator Operations.

>-----------------------------:: o 
CFz
Common Factors takes two lists of factors and counts how many common factors
the lists have.
CFz has a double click feature to remind you of the required input!
CFz assumes that neither of the lists will mention any given factor more than
once...!

Input:
2:      { list Of factors For Any given number }
1:      { List of Factors for any Given Number }

Output:
1:      Number of Common Factors

>-----------------------------:: o 
Fctrz
Factors takes an Positive Integer Number and Returns all the Factors of that
Number.

Input:
1:           Positive Integer

Output:
1:         { List of Factors }

>-----------------------------:: o 
Bep
Bep takes either a number of the type; 1, 2, 3, 4 or 5
And returns a Bepping noise peculiar to each,

Or Bep can take a List of 2 Numbers;
The First being; How many beps will be played,
And the Second being; What kind of bep will be repeated.

Input:
1:                     TypeOfBep: 0<b<6

or 

1:     { NumberOfBepsPlayed  TypeOfBep }

Output:
Bep or Bepping

-----------------------------------------o    ::-:

Bonus Program

>-----------------------------:: o 
Prm?
Prime takes a Positive Integer and returns a list of Prime Factors.
If the Original Number is Prime, That number is returned to the list, Alone.

Input:
1:                Positive Integer

Output:
2:                 Original Number
1:       { List of Prime Factors }


-----------------------------------------o    ::-:
-----------------------------------------o    ::-:

The Directory Checksum:

Name:            Cab\183S   \183 is the Center Dot
Checksum:          # 442D
Size:              1485.5

-----------------------------------------o    ::-:

The Directory:

%%HP: T(3)A(D)F(.);
DIR
  Shu\161                  @ \161 is the inverted ! 
    \<<                    @ which looks like an i
"1: {ListOfNumbers}"       @ on the Menu key...!
"" { 3 4 } Bep
INPUT OBJ\-> DUP SIZE
DUP 2 COMB DUP \-> z
\GD \240
      \<< 1
        \<< Fctrz DUP
SIZE
          \<< SWAP
DROP
          \>> :: +
IFTE
        \>> DOLIST 0
SWAP CLLCD 1 z 1 -
        FOR \Ga \Ga 1 +
z
          FOR \Gb
"  " '\240' DECR "   "
+ + 3 DISP DUP \Ga
GET OVER \Gb GET CFz
SIGN NOT ROT + SWAP
          NEXT
        NEXT DROP \GD
/ '6/(\Gr^2)' SWAP =
'\Gr' 3 ROOT DUP \pi
\->NUM %CH ABS 1 RND
" % Deviatn" + DUP2
10 CHR SWAP
"  Cabbage Shui:" 3
PICK DUP + + 4
ROLLD + + + CLLCD {
12 3 } Bep MSGBOX
'\Gr' PURGE
      \>>
    \>>
  CFz
    \<<
"2: {ListOfFactors}
1: {ListOfFactors}"
.2 WAIT KEY
      \<< DROP ""
INPUT OBJ\->
      \>> :: DROP
IFTE + SORT 0 SWAP
      \<< SWAP OVER
== ROT + SWAP
      \>> STREAM DROP
    \>>
  Fctrz
    \<< DUP DUP \v/ DUP
FP CEIL \-> $ \162 \163
      \<< { } { } 2 \162
        FOR \Ga $ \Ga /
DUP FP
          \<< DROP
          \>>
          \<< SWAP +
SWAP \Ga + SWAP
          \>> IFTE
        NEXT \163 NOT
        \<< 2 OVER
SIZE SUB
        \>> IFT +
      \>>
    \>>
  Bep
    \<< DUP TYPE 5 ==
      \<< EVAL
      \>>
      \<< 1 SWAP
      \>> IFTE \-> \Ge \GD
      \<< { { 20 15
.5 } { 100 20 .1 }
{ 2000 500 .02 } {
4000 1000 .005 } {
8000 10 .04 } } \GD
GET EVAL \-> a b c
        \<< RCLF -56
CF 1 \Ge
          START
RAND a * b + c BEEP
          NEXT STOF
        \>>
      \>>
    \>>
  Prm?
    \<< CLLCD DUP { }
SWAP 2 SWAP 0 1
      FOR z z
        DO 2 PICK 4
DISP
          DO 2 +
DUP 4 PICK SWAP - 2
DISP DUP2 / FP NOT
          UNTIL 4
PICK 3 PICK < OR
          END DUP 4
ROLL \<=
          \<< DUP 4
ROLL SWAP + 3 ROLLD
DUP 2 - 3 ROLLD / z
            \<< DUP \v/
            \>> 2
IFTE CEIL IP SWAP
ROT 0
          \>>
          \<< DROP
DUP \v/ CEIL IP SWAP
1
          \>> IFTE
        UNTIL
        END
      NEXT SWAP
DROP DUP 1 >
      \<< +
      \>>
      \<< DROP
      \>> IFTE
    \>>
END



--------------[ TERMINUS ]---------------




----------- :: o
.---..-..-..-..-..-..-.  .  .-. .-.  .-..-..-..   .-.  
`| |'| || .` | >  /  \ \/ \/ / /   \ | .` || | ) /   \ 
 `-' `-'`-'`-' `-'    `. ^ .' `--^--'`-'`-'`-'' `--^--'
Join The BabyNous Cult : The Friendly Neighborhood Cult