This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's
TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.
TI-Basic =>
TI-BASIC
Author |
Message |
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 23 Jan 2008 08:51:15 pm Post subject: |
|
|
Note to stranger: your question has been moved (you can find it here) because it had nothing to do with this topic.
As for the compression method - I don't think this can be better, on average, than just encoding the sequence of ones and zeros in binary.
Last edited by Guest on 23 Jan 2008 09:57:51 pm; edited 1 time in total |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 24 Jan 2008 01:12:09 am Post subject: |
|
|
Then I'll propose a modified RLE where the run each step cannot exceed 9, and zeros are inserted to prevent interruption by the intermediate changes in color. That is, if every element "A" of length 10 or greater is substituted by augment(9-18fPart(seq(X,X,1,int(A/9),.5)),{0,9fPart(A/9, then the numbers in the list are restricted to single digits, but the list itself would logically produce the exact same image. The list can then be exchanged for a string without commas.
Converting this picture (including borders) into binary, we get a number that, in base ten, has 309 digits.
The string RLE...
[font=courier new]19090906909090329011219072711612903279021190125573901241905382\
33223252822171325272323252526242212231526255222162529341625292\
34714272323241213252344142113241323222411142354211114262411133\
22427292324282822433828221225172922123416290122133225290221243\
124290211272123283128112427222631252756222621848290909039090906
...has 311 digits... ugh.
Alas, my hope of countering the last few digits becomes diminished as the whitespace in the image is too spacious; thanks to the messy distribution of random numbers, it now seems unreasonable to believe that the key(s) which would improve upon this image will feasibly be found. All the work has gone against my argument more than it has helped it. Oh, well. Besides, the image can be represented in 256 hexadecimal digits anyway – it appears that random numbers in general just will never come out on top.
[EDIT]
Well, I guess something like an asterisk in place of each nine-comma-zero and a new conditional statement in the decoder would help quite a bit, at least in the midst of horizontal black lines everywhere.
Last edited by Guest on 05 Jul 2010 08:21:58 am; edited 1 time in total |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 30 Jul 2009 09:59:08 am Post subject: |
|
|
Here is another random number algorithm: the one used on the TI-89 series for randNorm() (the TI-83 algorithm doesn't work there since the calculator wouldn't know how to compute invNorm().
Code: :randNorm(x,d)
:Func
:Local u,v,s
:Loop
: 2*rand()-1→u
: 2*rand()-1→v
: u*u+v*v→s
: If 0<s and s<1
: Return x+d*v*√(-2*ln(s)/s)
:EndLoop
:EndFunc
Last edited by Guest on 05 Jul 2010 08:19:52 am; edited 1 time in total |
|
Back to top |
|
|
ztrumpet
Active Member
Joined: 06 May 2009 Posts: 555
|
Posted: 30 Jul 2009 10:47:00 am Post subject: |
|
|
That's pretty cool! (So is the whole topic!)
My necropost:
DarkerLine wrote: Here's a cute little result: if you seed rand with 196164532 then get a random number from rand, it will return 1. Sweet!
This is only true to an extent, because the calculator rounds when it shows this on the homescreen.
From TIBD: http://tibasicdev.wikidot.com/rand
Quote: Note: Due to specifics of the random number generating algorithm, the smallest number possible to generate is slightly greater than 0. The largest number possible is actually 1, but since returning a result of 1 would mess up the output of randBin( and randNorm(, the actual value returned in such cases is 1-1.11e-12 (which is displayed as 1, and is "equal" to 1 for the purposes of the = command). To see 1, store 196164532 to rand and then run the random number generator.
You can check this with a method I saw used by Darkerline.
Do this from the homescreen:
1. 196164532->rand
2. rand->A
3. Go to the Solver ([Math] [0])
4. For the equation put the letter A
5. Press down
6. Now you can see all the decimals the calc can hold
1-1.11e-12=.99999999999889
It's pseudo-one |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 30 Jul 2009 11:51:56 am Post subject: |
|
|
...you are aware that you are replying to me by quoting a paragraph written by me, and suggesting a method you saw used by me, right?
Last edited by Guest on 30 Jul 2009 11:52:22 am; edited 1 time in total |
|
Back to top |
|
|
ztrumpet
Active Member
Joined: 06 May 2009 Posts: 555
|
Posted: 30 Jul 2009 11:54:27 am Post subject: |
|
|
Yes, using stuff I read on your blog, quoting stuff from the site you're master admin of...
Last edited by Guest on 30 Jul 2009 12:28:39 pm; edited 1 time in total |
|
Back to top |
|
|
|
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page