[Solved] What does “%.7le ” in printf means?


.7 is the precision and le means normal form.

double x = 0.012345678910;
printf("%.7lf\n", x);  // 0.0123457
printf("%.7le\n", x);  // 1.2345679e-02
printf("%.9le\n", x);  // 1.234567891e-02

Edit
See Eric Postpischil’s unswer below, it’s way more comprehensive than this one.

2

solved What does “%.7le ” in printf means?