Here's my opinion on different models. Note that I don't own all of them.
Math : Definitely the TI-68k series and CAS HP calcs. They have a very friendly UI for this purpose. The Nspire CAS has Ndless menus so it's not very handy. The TI-z80 series has only a floating point math engine which is not interesting at my school level. It's great for physics though.
Programming : The TI-z80 series (especially 83+/84+) are very programmable since they have BASIC (slow but nice for heavy math), and support native execution with ASM and Axe. There are also third party interpreted languages such as Grammer and BBC BASIC, and BASIC expansions such as XLib/Celtic/Omnicalc/BatLib.
The TI-68k series has ASM, C, BASIC and NewProg (like Axe for this series of calcs). Only the last two are on calc though.
The HP-50G looks awesome for that purpose too, especially since it has equivalent on-calc programming possibilities to the TI-z80s.
Casio calcs have native prog and BASIC too even though the editor is even worse than on TI-z80s. There is LuaZM for Lua, too. On calc native programming is not here yet though.
The Nspire requires a PC to program it in ASM/C and Lua so don't think about it.
Power : Definitely the Nspire CX. It's currently the most powerful calc out there. Then come the PRIZM and HP-50G, the TI-68k and last but not least the TI-z80s.
Hacking : TI calcs are 100% proprietary and officially undocumented calcs, a lot of research is being done on them. We already found a lot about the z80s though, but the Nspire is fairly recent and we have yet to factor it's RSA keys.
Hope this can help you choose !