changed hgd calc function to use logs (prevent overflow)
still need to fix some errors on the super fast hgd calculator