is there a command/simple way to see wether a number is odd or even? I can't seem to find any

:not(fPart(.5Ans

this code will give a 1 if Ans is odd, and a 0 of Ans is even.

That solved it, cheers!

I have a custom method:

```
If iPart(Ans/2)=Ans/2
[The number is Even!]
```

Coffee + Radiohead = ^^

Or an alternate:

`2fPart(Ans/2`

Returns 1 if the number is odd, 0 if even. Using not(fPart(Ans/2 returns the opposite of that (0 if odd, 1 if even). I think it is faster, though.

Yay for alternate methods! If you have the new OSes with remainder(, you can also do remainder(Ans,2 as an alternate version of my code, or if you don't care much for precision, cos(Ansπ in radians mode will return -1 if Ans is odd, 1 if it is even. You can also do:

fPart(√10^(Ans which is 4 bytes and returns 0 if Ans is even, some other number if odd. But the issue here is that it won't work for negative numbers or numbers >99. So to summarise:

```
2fPart(Ans/2 ;returns 1 if odd, 0 if even
not(fPart(Ans/2 ;returns 1 if even, 0 if odd
remainder(Ans,2 ;returns 1 if odd, 0 if even
cos(Ansπ ;returns -1 if odd, 1 if even
fPart(√10^(Ans ;returns: 0 if even, non-zero if odd
gcd(Ans,Ans+2 ;returns: 1 if odd, 2 if even
```

And there are tons of other ways to do it, too o.o

47%? Take a look and try to imagine how cool 100% will be. This has won zContest 2011 and made news on TICalc. This compromise between Assembly and BASIC parses like BASIC and is fast like assembly. Grammer 2

oooh…I like the cos(Ansπ solution… me gusta trig functions :P

Hehe, thanks :D Since I know you use the 68K language as well, you can simply use mod(num,2) and it will return 0 for even, 1 for odd.

47%? Take a look and try to imagine how cool 100% will be. This has won zContest 2011 and made news on TICalc. This compromise between Assembly and BASIC parses like BASIC and is fast like assembly. Grammer 2

Just have to make sure your calc is in the right mode first…

Edit: for the cos( solution, not the mod( solution

Yeah, good point. This can be remedied with the radian symbol token, though :D It adds a byte, though :/

47%? Take a look and try to imagine how cool 100% will be. This has won zContest 2011 and made news on TICalc. This compromise between Assembly and BASIC parses like BASIC and is fast like assembly. Grammer 2