Found a 64bit double implementation library, but I cannot compile it

Make sure you move the definition of pi to be after where it sets the scale, as I discussed above.