Yes, I’d noted this recently
I found that I didn’t need to iterate the std normalization as in your second code block; the means were reduced to ~1.e-8 after switching the while
statements.
Subsequently, I found that @stas had already made the same discovery
But @Kagan found that the idea doesn’t work, and @stas verified this.
Also @SteveR had similar idea , which @stas had also considered.