9

Why is this table not formatted correctly?

Base (base) Exponent (exp) Math.pow(base, exp) numeral(n).format('0[.]00e+0') logFormatter(n, base)
10 -5 0.000009999999999999999 10e-6 1 x 10⁻⁵
10 -2.445 0.0035892193464500534 3.59e-3 3.59 x 10⁻³
10 -1 0.1 1e-1 1 x 10⁻¹
10 0 1 1e+0 1 x 10⁻⁰
10 1 10 1e+1 1 x 10¹
10 2.545 350.75187395256796 3.51e+2 3.51 x 10²
10 5 100000 1e+5 1 x 10⁵
2 -5 0.03125 3.13e-2 1 x 2⁻⁵
2 -2.445 0.18364607915978864 1.84e-1 1.47 x 2⁻³
2 -1 0.5 5e-1 1 x 2⁻¹
2 0 1 1e+0 1 x 2⁻⁰
2 1 2 2e+0 1 x 2¹
2 2.545 5.836081376960701 5.84e+0 1.46 x 2²
2 5 32 3.20e+1 1 x 2⁵
Math.E -5 0.006737946999085469 6.74e-3 1 x e⁻⁵
Math.E -2.445 0.08672613490173116 8.67e-2 1.74 x e⁻³
Math.E -1 0.36787944117144233 3.68e-1 1 x e⁻¹
Math.E 0 1 1e+0 1 x e⁻⁰
Math.E 1 2.718281828459045 2.72e+0 1 x e¹
Math.E 2.545 12.743228086065521 1.27e+1 1.72 x e²
Math.E 5 148.41315910257657 1.48e+2 1 x e⁵

Somehow I can post this table here in the meta SO just fine but I get this error in regular SO.

The error is

Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.

enter image description here

5
  • 3
    Looks like a bug to me... Feb 6, 2021 at 1:17
  • 3
    Most likely a bug, the misformatted code detection is just a heuristic and it might miss cases. The simple workaround is to post less data in the table.
    – user202729
    Feb 6, 2021 at 1:21
  • 1
    @CertainPerformance I am trying to use this table on this post stackoverflow.com/questions/66072520/… to no avail, resorting to a picture of the table above 😩. But yet when I tried to open this meta issue, it works perfectly fine. BTW the regular SO formats the table just fine in the preview, just doesn't let me complete the review. Feb 6, 2021 at 1:24
  • 1
    This issue had been resolved Feb 17, 2021 at 20:34
  • "table with code" may or may not refer to Math.pow(base, exp) and numeral(n).format('0[.]00e+0') May 3 at 12:04

0

Browse other questions tagged .