Use a lookup table encoded in floating-point numbers
A slightly advanced tip:
Small lookup tables are useful for code golf: it's very often that we need a function that maps, for example, 0 to 1, 1 to 2, 2 to 1, and everything else to 0. However, TI-BASIC arrays are not suited for this purpose: for one thing, they're one-based, and for another, a value cannot be extracted until the array is stored in
Ans or a list variable.
In my answer here, I store a small lookup table in a magic constant in base 11. Simply list the values you want to use,
convert to a useful form
write in your desired base (base 11)
and convert to base 10
The shortest array approach is 8 bytes longer!
TI-BASIC only stores floats to 14 decimal digits, so you can store up to 44ish bits but only 14 decimal digits.
This technique can often be improved further by using brute-force search to find a magic constant rather than base-N encoding. I'm still in the process of golfing the answer above, but the lengendary TI-BASIC golfer Weregoose used this method to generate the differences between numbers coprime with 30 (that is, a repeating list of
6, 4, 2, 4, 2, 4, 6, 2 ) on the wiki/forum TI-BASIC Developer with this snippet:
The magic constant 576 was found using Mathematica, but if you don't own a copy use a script in your favorite language.