NACA 5 series headache

Time for an update on SeaHorse Foils. I am working on the implementation of NACA 5 series in SeaHorse, but the equations are giving me a headache, or Windows is giving me a headache. Actually, Windows is been giving me a headache since 1994. I wasn't very clever and upgraded my development Win7 machine to Windows 10 technical preview, bad call. Most of the NACA 5 series section generators found on the interwebs use the tabulated values for the constants m and k1. These values were computed in the 1930's and for the sake of simplicity they were rounded off a bit. The problem with using the tabulated values is two-fold, accuracy suffers (although the inaccuracy is simply negligible) and the fact that you cannot create anything else than standard one integer parameterized foils. Meaning, you can only create NACAXXXXX. The present NACA 4 digit series implementation in SeaHorse Foils allows users to create NACA(X.X)(X.X)(X.X)(X.X) and I would like to keep that system for the 5 series implementation, allowing users to create "exotic" foils. Therefore, I had to dig up the equations defining those two pesky constants and forget about the tabulated values. VB doesn't like long math expressions, I learned, furthermore, that it is pretty painful to work with complex numbers in VB. Bummer, wish I was an experienced programmer to deal faster with those darn things. Well anyway, NACA5 is just a few lines of code away. Be patient.
X above is actually m and p is the position of maximum camber.