3 ms·
I typically use 1e8 instead 100000000 when writing large (integer) numbers
by hans_castorp 3y ago
I typically use 1e8 instead 100000000 when writing large (integer) numbers
- NeoTar 3y agoI imagine there are cases where you want a large number not expressible in base-10 exponential notation. The obvious examples are the upper limits of integers - 2_147_483_647 and 4_294_967_295.
- thaumasiotes 3y agoUsually you'd want to express those as 0x7fff_ffff or 0xffff_ffff.
- marginalia_nu 3y agoRight, but what if you want to express something that does not end in a bunch of zeroes?
- fbdab103 3y agoIn Python that returns a float. In [1]: 1e8 Out[1]: 100000000.0 In [2]: type(1e8) Out[2]: float