Bug: Unit prefixes

Seems like there is a bug related to unit prefix (n, µ, m, k…) appearance. They are automatically converted to capital (in case of multiplier >1) or lower case (in case of multiplier <1). Mike explained to me that this has been his preference, although I personally find it a bit confusing to have K for kilo, for instance. However, the bug here is that the conversion is done only if there is no number after the multiplier. For example, if you type 1k, it is converted to 1K, but if you type 1k5 it is not converted. With “m” and “M” this can be very confusing.

By strong industry convention, SPICE is not case sensitive. But I am.

About 25 to 30 years ago, it was suggested that metric multipliers greater than 1.0 should be in upper case while those metric multipliers less than 1.0 are in lower case. Most people already wrote ‘f’, ‘p’, ‘n’, ‘µ’(which is lower case), and ‘m’ for 1e-15, 1e-12, 1e-9, 1e-6, and 1e-3. But they wrote ‘k’, ‘M’, ‘G’, ‘T’ for 1e3, 1e6, 1e9, and 1e12. ‘k’ was clearly the odd ball and the newer convention I follow is to capitalize it.

‘m’ is a bit of a problem. Since SPICE is not case sensitive, “m” means milli in any case, and “meg” is used for 1e6. QSPICE automatically changes 1meg to 1Meg.

There’s one other issue one should know. Normally any letters after the metric multiplier(normally units) are ignored. However most SPICE programs understand “1mho” as 1e-3. QSPICE understands it as 1.

Hi Mike,

I understand the reasoning behind automatic conversion, but the point was that it’s not consistent if 1k gets converted to capital but 1k5 doesn’t (I rarely use decimation point)

Yeah, well, 3k4 syntax was never truly part of the SPICE convention, even though several SPICEs, including QSPICE, will accept it.

But I’d rather not encourage it because it brings up things like 2Meg8, 1mil4, and 3mho01.

Ah, ok clear. Thanks.

The SI prefix for a thousand units is kilo, abbreviated to “k”.
K stands for Kelvin.
And if possible, I would prefer to see “m” for milli and “M” for Mega.

The current behavior is what is intended. QSPICE used capital letters for metric multipliers greater than one and lower case for those less than one.

It’s a convention that made an exception of kiloHertz as kHz, but I side step the exception by using labels like 10³Hz in frequency plot labels. I think the convention was from Europe about 25 or 30 years ago, but once I started using it was so much more sensical I stuck with it.

QSPICE uses ° for degrees C(or angular degree measure depending on the context.)

–Mike