I want to print floating-point numbers as a table as follows.
(ruby)
irb(main):001:0> printf("%10.3e %10.3e\n%10.3e %10.3e", 0.1111, 0.02222, 3333, -44444)
1.111e-01 2.222e-02
3.333e+03 -4.444e+04
However, in Rust, {:10.3e} format doesn't align e and .
fn main() {
println!("{:10.3e} {:10.3e}\n{:10.3e} {:10.3e}", 0.1111, 0.02222, 3333, -44444);
}
1.111e-1 2.222e-2
3.333e3 -4.444e4
How should I format?