compression
#1
Posted 08 April 2003 - 11:07 AM
#2
Posted 08 April 2003 - 11:21 AM
Say that all you numbers are less than 10, you could pack 15 numbers into one cell (seeing as how Casio's varables holds 15 digits), plus you could even use the exponent to hold 2 numbers.
if you had the numbers 3, 2, and 8
you would put them at their designated cell by assigning it: 3 + 2 * 10 + 8 * 100, and so on
you could retreive them through a loop, extracting the most or least significan number, removing it from the mantissa, and "shifting" the mantissa up or down to make the next number ready for extracion
obviously, you could chose to multiply by 100, or 1000, or whatever size your numbers are, and naturally this will make less numbers fit in one cell
you don't have to chose a power of 10 multiplier either, you could use any number that might fit the size of your numbers
#4
Posted 09 April 2003 - 05:41 AM
do this if you dont understand
1234567890123456->A
A (enter) (to show that it wont display all the digits)
you can loop this part if you want
Frac (A/10) (you get the lowest digit 6, multiply by 10 for non decimal)
Int (A/10) -> A (cut the last digit off A, and repeat if you want)
thats basically how it's done both Frac and Int are found under NUM (option f.. something)
#5
Posted 09 April 2003 - 08:14 AM
think i'll write a tutorial or something.
#6
Posted 09 April 2003 - 04:36 PM
Maybe you'd look for his site.
#7
Posted 09 April 2003 - 05:44 PM
the calc variables hold 15 digitsi also used it in my tetris program it can take 16 digits per cell
9 byte packed bcd numbers
first byte:
bits:
0 - 3: exponent seccond digit
4: exponent first digit
5 - 7: sign, and format
seccond byte:
bits:
0 - 3: mantissa, first digit
4 - 7: exponent last digit
byte 3 - 9: mantissa
a packed bcd number holds 2 digits per byte, the mantissa is 7 bytes and 1 nibble, making for 15 digits of precision, if you want more, you have 2 digits and1 bit in the exponent + 1 bit in the sign
#8
Posted 10 April 2003 - 05:26 AM
what's discosheep's site? anyone got a bookmark? what's his real name i'll look itup on CPA.
#9
Posted 10 April 2003 - 09:58 AM
In the CASIO site there is various tutorials, see it......
see the related topic.....
#10
Posted 10 April 2003 - 11:43 AM
it is only a small tutorial.
which casio site are you reffering to?
#11
Posted 10 April 2003 - 11:46 AM
..i am working on my rpg engine, and i wanna know, how do i compress a matrix? I see you guys talking about compressing matrices. how have you guys done it and how can i do it?
You have no clue how to compress stuff, and then, all of a sudden your making a tutorial..
doesn't sound right
#12
Posted 10 April 2003 - 12:03 PM
especially something like this I already have all the necessary background knowledge to do, but just didn't now how to do it.
#13
Posted 10 April 2003 - 12:18 PM
but, why make a tutorial, aren't there enough basic programming tutorials for basic programmin n00bs? (waist of time in'it?)
#14
Posted 10 April 2003 - 03:03 PM
#15
Posted 10 April 2003 - 08:26 PM
it's holidays for me now though so i have more time.
#16
Posted 11 April 2003 - 08:17 AM
the calc variables hold 15 digits
weird, my calc (cfx9800gb+) seems to know 10 digits only
#17
Posted 11 April 2003 - 09:52 AM
you can see the other 5 by doing something like this:
123456789012345->A A_ //this outputs A, 10 first digits Frac(A/1E5)_ //this outputs the 5 last digits
#18
Posted 11 April 2003 - 05:20 PM
#19
Posted 11 April 2003 - 05:43 PM
not input the letter? YOu should press the EXP key! a smaller E will appear.
#20
Posted 11 April 2003 - 05:45 PM
strange,
perhaps you did something wrong (like inputting the letter E, instead of exonent E.. )
-- EDIT --
sorry huhn_m, didn't see ur post
#21
Posted 13 April 2003 - 05:21 AM
sorry for the late reply, but I've been trying to get this to work and it wont so I just wrote my own, mabey Pixter is having the same problem I am.It displays only 10 digits,
you can see the other 5 by doing something like this:<!--QuoteEBegin-->123456789012345->A<!--QuoteEBegin-->A_ //this outputs A, 10 first digits<!--QuoteEBegin-->Frac(A/1E5)_ //this outputs the 5 last digits<!--QuoteEBegin-->
.0123456789123456->A Lbl 0 10A->A A-Int A)->A Int (10A)_ //output sign [SHIFT]+[VARS]+[F4] Goto 0
that should output all the digits.
#22
Posted 13 April 2003 - 09:44 AM
#23
Posted 13 April 2003 - 01:18 PM
#24
Posted 13 April 2003 - 01:40 PM
#25
Posted 13 April 2003 - 01:42 PM
#26
Posted 13 April 2003 - 01:44 PM
#27
Posted 13 April 2003 - 01:47 PM
now it makes sense... :iws:
oh well, mine works to so
#28
Posted 13 April 2003 - 02:04 PM
just thought this was an easier way of demonstrating how to display more digits of a number than what is printed on screen..
say, for pi, you could do something like this:
pi_ //displays the first 10 digits Frac (pi x 1e5) //gets rid of the first 5 of the fraction + the integer part, all in all the 6 first digits of the number and displays the last 8 (pi is stored only with 14 digits of precission..)
#29
Posted 13 April 2003 - 02:34 PM
It always displays 0 for the last 5 digits, even if I type in
Frac (1234567890.12345)
#30
Posted 13 April 2003 - 02:45 PM
#31
Posted 14 April 2003 - 01:36 AM
http://www.angio.net/pi/piquery#find
http://www.angio.net...igits/10000.txt
http://www.hepl.phys...if1000c.data.gz
if anyone finds these useful or interesting, please tell me.
#32
Posted 14 April 2003 - 06:01 AM
Too few digits, how can I know the surface of my circle precisely enought with that few digits! lolpi related sites:
http://www.angio.net/pi/piquery#find
http://www.angio.net...igits/10000.txt
http://www.hepl.phys...if1000c.data.gz
if anyone finds these useful or interesting, please tell me.
#33
Posted 14 April 2003 - 08:40 AM
#34
Posted 14 April 2003 - 10:38 AM
I am trying to put as much digits of pi as possible on my calc (just for fun :S).
for every byte I have, I can store one digit.
But now something more interesting: is it possible to compress numbers?
I know that you can write 1000 as 1E3 but I'm looking for better ways to compress.
#35
Posted 14 April 2003 - 02:08 PM
OPTN->NUM->ESYM
(only for makeing the program smaller.
#36
Posted 14 April 2003 - 03:27 PM
I mean that I'm thinking about how I can put more numbers in one byte. A programm like winzip or so.
btw, can someone send me a program or a game that uses the 15 digits in one matrix-cell trick? I can't get that working . Maybe I'm just too stupid
My email is rick_heuijerjans AT hotmail.com
thank you very much
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users