Ah, you have to convert (Alpha/255) and (Value) to Floats so the equasion works properly.
Sorry, pseudocode is wacky.

BTW, Lookup Tables aren't much faster for slower CPUs and memory.
But the higher your cpu/memory speeds get, the faster it is.