Calculation of the electronic spectrum of formaldehyde