I'm extracting the poles and zeroes of a circuit using HSpice, but I need it to be as accurate as possible. HSpice is only giving me 6 decimal places, and I'm wondering if it would be possible to increase the number of decimal places outputted.
Asked
Active
Viewed 50 times
1
-
Accuracy and precision are different things. What makes you think the numbers you got are accurate to 6 figures? And if they aren't, what good would it be to get more than 6 figures of precision? – The Photon Jun 03 '20 at 00:14
-
Very likely SPICE uses single precision floating point numbers internally. That would mean that even if your model is more accurate, obtaining greater than 7 figures of precision would require rebuilding SPICE from the ground up. – The Photon Jun 03 '20 at 00:20
-
HSPICE® User Guide: HSPICE uses double-precision numbers (15 digits) for expressions, user-defined parameters, and sweep variables. For better precision, use parameters (instead of constants) in algebraic expressions because constants are only single-precision numbers (7 digits). – Spehro Pefhany Jun 03 '20 at 02:27
-
@SpehroPefhany, any word on what it uses for circuit variables? – The Photon Jun 03 '20 at 03:17
-
@ThePhoton I am pretty sure they use doubles internally. The absolute tolerance settings vtol, chgto etc. vs. range imply a lot more than a 32-bit float. Somewhat surprisingly (to me anyway) Circuitlab claims double-double (128-bit) variables are used. – Spehro Pefhany Jun 03 '20 at 04:12
-
@SpehroPefhany I can't wait for them to upgrade to [GMP](https://gmplib.org). Only then you can really say you're solving circuits with 1000 bits precision! – a concerned citizen Jun 03 '20 at 06:22
-
What application do you have that would require a very high level of precision / accuracy in the knowledge of pole/zero locations? – Chu Jun 03 '20 at 06:39
-
@Chu I am using the pole/zero locations to calculate the Q value of a circuit, which I found to be extremely sensitive. – torpdeo Jun 06 '20 at 02:20