Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: danny90444 on July 02, 2012, 06:43:14 pm

Title: Function
Post by: danny90444 on July 02, 2012, 06:43:14 pm
I just wanted a further explanation of this:

Data(NUM,...)
Key: Ξ”List() 
Adds the bytes to program memory. Numbers ending with r are added as 2 byte numbers.

Title: Re: Function
Post by: kindermoumoute on July 02, 2012, 06:50:08 pm
You have to point your liste of data. Eg :
Code: [Select]
:Data(2,5,100,40,3)->Str1
You can read those data in this way :
Code: [Select]
:{Str1}
:.Return 2

:{Str1+1}
:.Return 5

...

:{Str1+X}

If you want add a 2-bytes number, you can use ^r (2nd angle 3) :
Code: [Select]
:Data(12,500^r,200,30000^r)->Pic1

:{Pic1}
:.Return 12

:{Pic1+1}^r
:.Return 500

:{Pic1+3}
:.Return 200

:{Pic1+4}^r
:.Return 30000
Title: Re: Function
Post by: danny90444 on July 02, 2012, 06:53:39 pm
Which numbers are two bye and which are single bye , etc ?
Title: Re: Function
Post by: kindermoumoute on July 02, 2012, 06:56:55 pm
Endeed a byte is 8 bits. Then a byte can take 2^8 (=256) values, that to say a number beetwen 0 and 255. A 2 byte number can take 2^16 (=65356) values, it means a number beetwen 0 and 65355.

Axe variables are 2 bytes number.
Title: Re: Function
Post by: danny90444 on July 02, 2012, 07:02:05 pm
Endeed a byte is 8 bits. Then a byte can take 2^8 (=256) values, that to say a number beetwen 0 and 255. A 2 byte number can take 2^16 (=65356) values, it means a number beetwen 0 and 65355.

Axe variables are 2 bytes number.

Thanx this really helps.
Title: Re: Function
Post by: danny90444 on July 03, 2012, 02:57:33 pm
Do you know about anything about numbers bigger than 65355? Are they 3 bytes or 4 or something like that?
Title: Re: Function
Post by: blue_bear_94 on July 03, 2012, 03:00:51 pm
You can combine 2 real variables or use the OP registers...
Title: Re: Function
Post by: danny90444 on July 04, 2012, 08:18:57 pm
Combine how ? and what are OP registers?
Title: Re: Function
Post by: Hayleia on July 05, 2012, 02:07:40 am
You can combine 2 real variables or use the OP registers...
Or use this (http://ourl.ca/4129/155369) ;)
Title: Re: Function
Post by: ben_g on July 05, 2012, 08:04:57 am
Do you know about anything about numbers bigger than 65355? Are they 3 bytes or 4 or something like that?
Depends on how much bigger than 65355.
Title: Re: Function
Post by: danny90444 on July 05, 2012, 12:00:01 pm
Do you know about anything about numbers bigger than 65355? Are they 3 bytes or 4 or something like that?
Depends on how much bigger than 65355.

Like in the millions.
Title: Re: Function
Post by: Hayleia on July 05, 2012, 12:04:41 pm
Basically, to know the limit of X bytes, you do 2X*8-1.
So 1 byte stops at 255, 2 bytes stop at 65535, etc :)
Title: Re: Function
Post by: danny90444 on July 05, 2012, 12:06:31 pm
Basically, to know the limit of X bytes, you do 2X*8-1.
So 1 byte stops at 255, 2 bytes stop at 65535, etc :)

Ok thanks . Whats OP though?
Title: Re: Function
Post by: calcdude84se on July 06, 2012, 02:50:48 am
The OP "registers" are a set of memory areas that are used as operands by the OS's floating point routines. Unless you need floating point, there shouldn't be a need to explicitly deal with them.
If you want to do math with larger integers, you basically need to write the routines yourself (precluding a library/axiom already having been written. I don't follow Axe too much.).
For example, to add the number BA (formed from variables A and B) to DC, and store the result back to BA, you could do something like A+C->A<C+B+D->B, where -> is the STO> symbol.
An easier-to-follow variation goes like this:
Code: [Select]
A+C->A
If A<C
B+D->B
Else
B+D+1->B
End
Title: Re: Function
Post by: aeTIos on July 06, 2012, 08:38:59 am
By the way, the r in the description is the radians r (it's in the [2nd][Apps] menu)
Title: Re: Function
Post by: danny90444 on July 06, 2012, 10:47:05 am
The OP "registers" are a set of memory areas that are used as operands by the OS's floating point routines. Unless you need floating point, there shouldn't be a need to explicitly deal with them.
If you want to do math with larger integers, you basically need to write the routines yourself (precluding a library/axiom already having been written. I don't follow Axe too much.).
For example, to add the number BA (formed from variables A and B) to DC, and store the result back to BA, you could do something like A+C->A<C+B+D->B, where -> is the STO> symbol.
An easier-to-follow variation goes like this:
Code: [Select]
A+C->A
If A<C
B+D->B
Else
B+D+1->B
End


I don't understand the BA part. Is that one number split between two variables? And I don't know what floating point is exactly.
Title: Re: Function
Post by: Hayleia on July 06, 2012, 10:54:12 am
I don't understand the BA part. Is that one number split between two variables? And I don't know what floating point is exactly.
Your number A is 16 bits (2 bytes). Let's represent a bit by X. So A looks like this
XXXXXXXXXXXXXXXX.
Same for B, B looks like this
XXXXXXXXXXXXXXXX.
Now, what would be BA ? It is B followed by A so BA looks like this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
And you just created a 32 bits number ;)

Floating point is basically numbers with a decimal where the period is not at the same place for each number. So you could work with 53.21 and 589.4 as opposed to fixed point where the period is always at the same place for everyone :)
Title: Re: Function
Post by: danny90444 on July 06, 2012, 01:19:17 pm
I don't understand the BA part. Is that one number split between two variables? And I don't know what floating point is exactly.
Your number A is 16 bits (2 bytes). Let's represent a bit by X. So A looks like this
XXXXXXXXXXXXXXXX.
Same for B, B looks like this
XXXXXXXXXXXXXXXX.
Now, what would be BA ? It is B followed by A so BA looks like this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
And you just created a 32 bits number ;)

Floating point is basically numbers with a decimal where the period is not at the same place for each number. So you could work with 53.21 and 589.4 as opposed to fixed point where the period is always at the same place for everyone :)

So that number would be 4 bytes?
Title: Re: Function
Post by: parserp on July 06, 2012, 02:06:25 pm
yes.
Title: Re: Function
Post by: danny90444 on July 08, 2012, 08:14:22 pm
thanks