* Precalculate g's value.