Kind of a mess (some hacks, but maybe the original is buggy?), but SVD cross-compared against C++ version intact up to near-zero values