Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:The context here /is/ lots of zeros. In the real world, usage such as such as 'N million' or 'N billion' typically scales N by a million or billion.
[...]Since numbers using exponents without also using decimal points areYou might want to look at Ada for existing practice.
rare in my code base, I've decided to experiment with numbers like 1e6
being integer constants rather that floats. (This is in my language.)
In C, a constant with either a decimal point or an exponent is
floating-point. In Ada, 1.0e6 is floating-point and 1e6 is an integer.
Of course this isn't very helpful if you want to represent numbers with
a lot of non-zero digits; for that, you need digit separators.
Les messages affichés proviennent d'usenet.