Holger Vogt
cac87d9dd0
Improve response to error: reporting the error when
detecting an expression, not simply move on with a
wrong meas result.
2 years ago
Holger Vogt
49951cd197
Bug 664: Report an error if token in meas statement is not a vector and
cannot be evaluated as a number.
2 years ago
Holger Vogt
732c12c93f
Remove another potential crash if buggy user input
2 years ago
Holger Vogt
c69018fe82
Enable measurements with ?-sweep (v, i, temp, or res).
Improve error messages.
Prevent crash is compüdata is not available.
Add to examples for measure failures.
2 years ago
Holger Vogt
4d4f226a83
Prevent crash, when vector is defined, but still empty.
2 years ago
Giles Atkinson
d9b52eb3e1
Fix a bug reported by Thomas Hoffmann in ngspice-users discussion,
2023-02-18. Incorrect tests were used to detect a crossing in the
first two data samples.
3 years ago
Giles Atkinson
dbb5219dc7
Fix a crash reported by Thomas Hoffmann when using the "TARG AT=xxxx"
variant of "measure", General Form 1.
3 years ago
Holger Vogt
ffc09208bf
send error message to stderr, not to stdout
4 years ago
Giles Atkinson
04445e42ea
Make FROM/TO work in TRIG/TARG and WHEN variants of .meas/meas command.
Discussion at
https://sourceforge.net/p/ngspice/discussion/133842/thread/973e152274/
4 years ago
Holger Vogt
4ee0586cee
Enable output redirection for meas command
replace printf("... by fprintf(mout, "...
mout is routinely set to cp_out, which then allows redirection by > and >>
4 years ago
Holger Vogt
018713cc43
Bug 572 Error message 'function 'xyz' currently not supported' was buggy.
xyz had not been set.
Copy function name to the heap and free accordingly.
4 years ago
Holger Vogt
1ef4115578
In a command 'meas tran teval when v(2)=1' the rhs
should be treated as a number '1', not as a vector v(1)
5 years ago
Jim Monte
2d9110bf65
Add const to some parameters, made function static
6 years ago
Holger Vogt
a9f83f3445
remove two small memory leaks
6 years ago
Holger Vogt
7ae76f0f51
update to the .measure and meas error messages:
remove crash uipon buggy inputs
add buggy example input file
unify fcn returns: 0 is OK, 1 is bad
Improve on error message for bad syntax
6 years ago
Holger Vogt
85e0a08cff
error message even if pNAME is not defined
6 years ago
Holger Vogt
94d5ad312e
Improve error messages for the 'meas' command.
6 years ago
Jim Monte
068df274bf
Made ft_numparse() thread-safe (no internal static variables) and prepared to support ngspice variable type CP_NUM.
6 years ago
Jim Monte
f086fd3bef
[PATCH #61 ] Removed unnecessary check for null pointer. There would have
been several access violations before the check if it were invalid.
7 years ago
h_vogt
b0da1f2a0f
com_measure2.c, write a fft vector (sp plot) with complex data
and real frequency to file and load it again, frequency now has become
a complex number as well. This was not recognized, thus ngspice crashed
(see https://sourceforge.net/p/ngspice/discussion/127605/thread/8cccd69c/
by Michal Janik - 2014-11-04
9 years ago
dwarning
5380c3f4da
prevent a small memory leak
8 years ago
rlar
dc6e1cb064
use strchr() instead of strstr()
9 years ago
rlar
40a0cea0d2
swap some `SWAP' arguments for readability
10 years ago
rlar
bd0bc3038b
use `SWAP' macro
10 years ago
Marcel Hendrix
f9432cb3da
frontend/com_measure2.c, bug fix for "meas AVG"
meas "AVG" did merely the average of the given values,
without consideration of their spacing on the "scale" axis.
now use trapezoidal summing to calculate the AVG
note, there is "meas INTEG"
which goes beyond trapezoidal summing
11 years ago
rlar
64da5a99bf
src/frontend/com_measure2.c, cleanup, rewrite `correct_vec()'
11 years ago
rlar
27aae75ade
src/frontend/com_measure2.c, bug fix, typo when setting `m_vectype2'
this doesn't change anything, because m_vectype2 is nowhere used.
11 years ago
rlar
c5e0bcde04
cleanup using `hypot()'
11 years ago
rlar
6050e2e0ea
cleanup some extra parentheses
13 years ago
h_vogt
8f44839f3e
com_measure.c, measure.c: remove memory leaks
13 years ago
rlar
11579d9369
cleanup, ngspice/config.h is already in ngspice/ngspice.h, #1/2 (easy ones)
14 years ago
rlar
fe1acd3757
src/frontend/** remove superfluous `return' invocations
14 years ago
rlar
ab98f03622
src/frontend/** whitespace, indentation, ...
checked for object file invariance on linux
14 years ago
rlar
7454a6d486
src/frontend/**, whitespace, indentation, ...
untabify
delete-trailing-whitespace
braces
...
checked for object file invariance on linux
14 years ago
h_vogt
11ae043c3d
com_measure2.c: enable 'meas dc' without 'from' and 'to' given
measure.c: no error printout during autostop
14 years ago
h_vogt
d1d2ff94e4
measure, error message updated and return(NAN) in case of measure failure
test for failure with isnan()
14 years ago
h_vogt
14914025c0
measure_at(), allow real valued data for meas ac
14 years ago
rlar
d8105873db
remove error.h, use fteext.h for controlled_exit()
14 years ago
rlar
a1ea1b3193
round to next nearest integer for the rise, fall and cross arguments of `measure'
Simon Guan reported
Bug item #3509528 , `Meas goes wrong when put in a while loop'
In a .control block a `let' variable was passed to the `measure' command.
The value of this variable would have been a plain integer,
yet it was converted internally to an internal ascii representation
with exponential representation (203 ==> 2.03e2)
and then processed by `ft_numparse()' where it was converted back to
double floating point.
Because the intermediate 2.03 has
no exact representation in the space of double floating point numbers
this conversion was lossy and resulted in a non-integer value.
This non-integer was then truncated towards minus infinity in com_measure
yielding an error of -1
This commit implements round to nearest in com_measure2
to avoid the problem.
FIXME,
the internal intermediate conversion of double floating point machine
values to ascii representations must be dropped,
or replaced with an exact/lossless ascii representation.
(for example GNU printf/scanf %a or 64bit hexadecimal representation)
14 years ago
rlar
4ca58067a2
#2/6 config.h --> ngspice/config.h, #include's
14 years ago
rlar
0b5042e7da
remove CVS `Id',`log' etc. keyword incantations
15 years ago
rlar
10346e055c
#1/4 #include <ngspice/...> --> #include "ngspice/..."
15 years ago
h_vogt
893fbe1264
warning 'real ac' removed
15 years ago
rlar
d26015586c
#1/7 use a subdirectory "ngspice" for includes to create a uniq namespace
15 years ago
rlar
7dfe20bb21
surpress warnings, disable currently unused functions
15 years ago
rlar
6ab91f2e9f
com_measure2.c, uninitialized variable warning
15 years ago
rlar
b778c50bd6
code cleanup, some warnings, some casts, ...
15 years ago
h_vogt
ebda0af288
update FIND ... WHEN measurements
15 years ago
h_vogt
8b4edf1a0c
fix bug. no 3165634
15 years ago
rlar
05441d5823
Nr 5/5 (x = ...) == NULL , swallow warnings
16 years ago