Merging changes from svd_f into svd_d. Compiles but untested.
Adding support for case where only singular values are required.