mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 07:19:17 +02:00
* improves node complexity calculations
This commit is contained in:
parent
3d9d80b007
commit
f2a5bf17fc
@ -964,9 +964,18 @@ implementation
|
|||||||
in_cos_real,
|
in_cos_real,
|
||||||
in_sin_real,
|
in_sin_real,
|
||||||
in_arctan_real,
|
in_arctan_real,
|
||||||
in_sqr_real,
|
|
||||||
in_sqrt_real,
|
in_sqrt_real,
|
||||||
in_ln_real:
|
in_ln_real:
|
||||||
|
begin
|
||||||
|
inc(result,15);
|
||||||
|
if (result >= NODE_COMPLEXITY_INF) then
|
||||||
|
begin
|
||||||
|
result:=NODE_COMPLEXITY_INF;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
p:=tunarynode(p).left;
|
||||||
|
end;
|
||||||
|
in_sqr_real:
|
||||||
begin
|
begin
|
||||||
inc(result,2);
|
inc(result,2);
|
||||||
if (result >= NODE_COMPLEXITY_INF) then
|
if (result >= NODE_COMPLEXITY_INF) then
|
||||||
|
Loading…
Reference in New Issue
Block a user