Commit Graph

39 Commits

Author SHA1 Message Date
Holger Vogt b9221a07a3 Fix a bug when evaluating -0.5^3.
Use code which has been up to now only applied with LT compatibility.
2026-04-11 14:12:52 +02:00
Holger Vogt 8c806912d0 Improve convergence in Infineon Power MOS.
0**something is 0
2024-12-06 22:41:18 +01:00
Holger Vogt e5195c10a3 Enable monotonic negative growth of abscissa values. 2024-06-22 14:21:42 +02:00
Holger Vogt e28d3feee0 Remove unused variable debarr.
Add another example.
2022-12-11 15:39:10 +01:00
Holger Vogt 6c1be283a7 Add a function ddt (derivative versus time) to the B-source funtion parser. 2022-12-11 15:38:22 +01:00
Brian Taylor a0cf65ca1a Add B-source note 2022-12-11 15:33:24 +01:00
Holger Vogt f13aa89626 Add new functions for operators x**y or x^y
compatmode hs: x>0 pow(x, y), x<0 pow(x, round(y)), X=0 0
compatmode lt: x>0 pow(x, y), x<0 pow(x, y) if y is close to integer, else 0
2022-12-11 15:27:26 +01:00
Holger Vogt d77e36dc1b To find the nearest integer, use nearbyint(). trunc() has delivered
only one-sided answers.
2022-12-11 15:23:20 +01:00
Holger Vogt 47f2b7c6af AlmostEqualUlps setting has been too strict: it failed in MINGW gcc.
3 --> 10
2022-12-11 15:22:54 +01:00
Holger Vogt edab163192 If compatmode is lt, change the pow(x,y) and x**y functions:
If x < 0, output only if y is integer number, otherwise output 0
2022-10-14 13:50:37 +02:00
Holger Vogt 07bb809158 Iterations for op or dc may start with arguments 0 for ln().
To cope with this, and potential overflow in exp function,
some limits have been added.
2022-10-07 13:19:22 +02:00
Holger Vogt e2cf397b6d Restrict the limit for exp function (linear growth when exponent
is larger than 14, commit [93a76d]) to the PSPICE compatibility
mode.
2021-07-02 11:50:42 +02:00
Holger Vogt c112279555 new compatibility handling with struct compat newcompat:
simplify the compatibility handling, better readability
make it easily extendable
add new flag 'ki' for KiCad compatibility
2020-08-20 15:38:43 +02:00
Holger Vogt 93a76d8e21 add a limit exp(arg) to the exp function. If arg is larger
than 14 (arbitrarily selected), continue with linear response.
2020-04-21 19:57:19 +02:00
Holger Vogt 75d1e45737 consider all PSPICE containing compatibility settings
for the evaluation of the pwr function
or allowing '-' in a subcircuit name
2018-10-20 23:54:02 +02:00
rlar 611596c916 PTpower 2018-05-18 17:06:14 +02:00
Holger Vogt af351eab5f add a non-zero fudge factor to zero function argument 2018-05-18 16:55:31 +02:00
rlar 8b98b9b350 use 'fabs()' 2016-10-15 15:06:17 +02:00
rlar 9e72296e40 src/spicelib/parse, implement `nint()' (`B' language) 2014-09-20 17:15:09 +02:00
rlar bdf70bd2b0 cleanup, rename PTln --> PTlog, PTF_LN --> PTF_LOG (`B' language) 2014-09-12 19:09:30 +02:00
rlar 93a212ca3c cleanup, rename PTlog --> PTlog10, PTF_LOG --> PTF_LOG10 (`B' language) 2014-09-12 19:05:56 +02:00
rlar d146502fc9 ptfuncs.c, drop inaccurate replacements for ashinh() acosh() and atanh() 2014-01-02 09:33:23 +01:00
dwarning 91ab0a3c74 parser/*.c: implement a signed power function `pwr' for controlled sources 2013-12-31 16:10:12 +01:00
dwarning b9a954df60 inpptree.c, ptfuncs.c: whitespace cleanup 2013-12-31 16:09:45 +01:00
h_vogt 1b4c17a464 rename spicelib/parser/inp.h to inpxx.h
since we have another "inp.h" in src/frontend
2012-12-27 14:25:43 +01:00
rlar 11579d9369 cleanup, ngspice/config.h is already in ngspice/ngspice.h, #1/2 (easy ones) 2012-10-06 12:12:08 +02:00
h_vogt ff11ccda20 In B source the argument to 'log' may be 0 upon start of simulation, allow recovery like in function 'ln' 2012-06-13 19:15:22 +02:00
rlar 4ca58067a2 #2/6 config.h --> ngspice/config.h, #include's 2011-12-27 11:33:01 +00:00
h_vogt 75767fcc3d floor(), ceil() added 2011-12-26 11:34:21 +00:00
rlar 10346e055c #1/4 #include <ngspice/...> --> #include "ngspice/..." 2011-12-11 18:05:00 +00:00
rlar d26015586c #1/7 use a subdirectory "ngspice" for includes to create a uniq namespace 2011-08-20 17:27:09 +00:00
rlar c178bdb059 cosmetical changes 2010-06-30 20:08:57 +00:00
h_vogt e66ef33c57 ngspice compatibility mode 2010-04-23 22:00:40 +00:00
h_vogt 75d891e4c0 new parser for B source 2010-02-28 16:00:40 +00:00
dwarning a0667438f1 changed ancient double vector declaration in pwldata 2009-11-17 19:27:43 +00:00
dwarning ef245cee3d rm debug printf's 2009-10-13 20:17:32 +00:00
dwarning 8e8ecc784c PWL functionality for B sources 2009-10-11 08:50:54 +00:00
pnenzi 5296cd51b8 Partially applied Paul Reich patch (missing include and c++ style comments) 2005-12-04 08:52:10 +00:00
arno b3a9a784f6 * src/spicelib/devices/parser/*: Moved all files to
src/spicelib/parser.

        * configure.in, src/Makefile.am, src/spicelib/Makefile.am,
        src/spicelib/devices/Makefile.am: Files affected by the move.
2000-07-25 06:03:06 +00:00