Glenn Linderman wrote:

> An excellant idea.  I was unaware of that standard, but was trying to head that
> direction in my last posting.
>
> Someone thought it wouldn't work with imaginary numbers, but there actually is
> no ambiguity if the imaginary i must immediately follow the number, and the
> metric suffix follow that, if both exist.

You're right, I was assuming that the imaginary i must be in the very
end of literal, and was even thinking about using j instead. :)
OK, that seems to be the nicest solution. So we have:

5G    means 5 * 10**9,      5 giga
5Gi   means 5 * 2**30,      5 gibi
5iG   means 5 * 10**9 * i,  5i giga
5iGi  means 5 * 2**30 * i,  5i gibi

(I really like those binary prefixes names!)

Very nice, unambiguous, compatible with SI standard, no need for any
pragmas, I'm really impressed!

- RaFaL Pocztarski, [EMAIL PROTECTED]


Reply via email to