Bifunctional enzyme. Involved in de novo dTMP biosynthesis. Key enzyme in folate metabolism. Catalyzes an essential reaction for de novo glycine and purine synthesis, DNA precursor synthesis, and for the conversion of dUMP to dTMP (By similarity). (6S)-5,6,7,8-tetrahydrofolate + NADP(+) = 7,8-dihydrofolate + H(+) + NADPH (6R)-5,10-methylene-5,6,7,8-tetrahydrofolate + dUMP = 7,8-dihydrofolate + dTMP Cofactor biosynthesis; tetrahydrofolate biosynthesis; 5,6,7,8-tetrahydrofolate from 7,8-dihydrofolate: step 1/1. In the N-terminal section; belongs to the dihydrofolate reductase family. In the C-terminal section; belongs to the thymidylate synthase family.