I allready have a latex document describing how th function works. I am not sure where can I put this documentation. Maybe it can be merged together with Haibing and Thomas Nagels documentation.