where s=(a+b+c+d)/2.
Heron's formula for the area of a triangle is the special case obtained by taking d=0.
... to drive the reaction NADP+ + H+ + 2e- → NADPH This consumes the H+ ions produced by the splitting of water, leading to a net production of O2, ATP, and NADPH ...