Are programmable, portable, battery (or solar?) powered calculators still a thing?

Save your formula into ‘permanent’ memory in the calculator, then run it against the input number. Hot key button on the calculator to run the calc would make it ‘foolproof’