I'm just not mathematician enough to convert that into a C function. Let alone one that is both efficient and reasonably accurate.