If somebody is interested I can write the code. But somebody else has to add the code for handling int / long int / double cases, since I do not have enough experience in that.