FYI: LTSpice can't understand recursion

Thread Starter

ci139

Joined Jul 11, 2016
1,898
i'm not telling what i think of the person(s) we may thank for this F....p

just noticed that Spice does not re-seed the rand() at the initialization time

attempting to fix that resulted in following :: . . . no fix
( well there is a manual fix using consecutive variables each to reseed the rand() . . . but it can't be done iteratively )

RAND - TEST.pngRAND - TEST _new.png

Spice error log:
(( ? weird enough i can't see but the potentially infinite recursion here -- no comments . . . ))
Code:
WARNING: Can't resolve .param p2=p0*(1-2*xrnd(1,2))
WARNING: infinite recursion in: "if(u(u-1),(if(u(((u-1))-1),(if((((((u-1)))-1))((((((u-1)))-1))-1),(if((((((u-1)))-1))(((((((((u-1)))-1)))-1))-1),(if((((((((((((u-1)))-1)))-1)))-1))((((((((((((u-1)))-1)))-1)))-1))-1),(if((((((((((((u-1)))-1)))-1)))-1))((((((((((((((u-1)))-1)))-1)))-1))-1))-1),(if((((((((((((((((([xdec(u])))-1)))-1)))-1)))-1)))-1))(((((((((((((((((xdec(u)))-1)))-1)))-1)))-1)))-1))-1),(if(((((((((((((((((xdec(u)))-1)))-1)))-1)))-1)))-1))(((((((((((((((((xdec((xdec(u)))))-1)))-1)))-1)))-1)))-1))-1),(if((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))-1),(if((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))((((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))-1))-1),(if(((((((((((((((((xdec((xdec((xdec((xdec((xdec(u)))))))))))-1)))-1)))-1)))-1)))-1))(((((((((((((((((xdec((xdec((xdec((xdec((xdec(u)))))))))))-1)))-1)))-1)))-1)))-1))-1),(if(((((((((((((((((xdec((xdec((xdec((xdec((xdec(u)))))))))))-1)))-1)))-1)))-1)))-1))(..."
Error: too many decimal points in: "if(u(u-1),(if(u(((u-1))-1),(if((((((u-1)))-1))((((((u-1)))-1))-1),(if((((((u-1)))-1))(((((((((u-1)))-1)))-1))-1),(if((((((((((((u-1)))-1)))-1)))-1))((((((((((((u-1)))-1)))-1)))-1))-1),(if((((((((((((u-1)))-1)))-1)))-1))((((((((((((((u-1)))-1)))-1)))-1))-1))-1),(if(((((((((((((((((xdec(u)))-1)))-1)))-1)))-1)))-1))(((((((((((((((((xdec(u)))-1)))-1)))-1)))-1)))-1))-1),(if(((((((((((((((((xdec(u)))-1)))-1)))-1)))-1)))-1))(((((((((((((((((xdec((xdec(u)))))-1)))-1)))-1)))-1)))-1))-1),(if((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))-1),(if((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))((((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))-1))-1),(if(((((((((((((((((xdec((xdec((xdec((xdec((xdec(u)))))))))))-1)))-1)))-1)))-1)))-1))(((((((((((((((((xdec((xdec((xdec((xdec((xdec(u)))))))))))-1)))-1)))-1)))-1)))-1))-1),(if(((((((((((((((((xdec((xdec((xdec((xdec((xdec(u)))))))))))-1)))-1)))-1)))-1)))-1))([...]"
Error: too many decimal points in: "if(u(u-1),(if(u(((u-1))-1),(if((((((u-1)))-1))((((((u-1)))-1))-1),(if((((((u-1)))-1))(((((((((u-1)))-1)))-1))-1),(if((((((((((((u-1)))-1)))-1)))-1))((((((((((((u-1)))-1)))-1)))-1))-1),(if((((((((((((u-1)))-1)))-1)))-1))((((((((((((((u-1)))-1)))-1)))-1))-1))-1),(if(((((((((((((((((xdec(u)))-1)))-1)))-1)))-1)))-1))(((((((((((((((((xdec(u)))-1)))-1)))-1)))-1)))-1))-1),(if(((((((((((((((((xdec(u)))-1)))-1)))-1)))-1)))-1))(((((((((((((((((xdec((xdec(u)))))-1)))-1)))-1)))-1)))-1))-1),(if((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))-1),(if((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))((((((((((((((((xdec((xdec((xdec((xdec(u)))))))))-1)))-1)))-1)))-1))-1))-1),(if(((((((((((((((((xdec((xdec((xdec((xdec((xdec(u)))))))))))-1)))-1)))-1)))-1)))-1))(((((((((((((((((xdec((xdec((xdec((xdec((xdec(u)))))))))))-1)))-1)))-1)))-1)))-1))-1),(if(((((((((((((((((xdec((xdec((xdec((xdec((xdec(u)))))))))))-1)))-1)))-1)))-1)))-1))([...]"
Questionable use of curly braces in "b2 t2 0  v={p2}"
Error: yet unevaluated parameter in: "[p2]"
Circuit: * D:\USER\Programs\LTC\LTspiceIV\New Grid\Vtg~New\RAND - TEST.asc
Fatal Error: B2:  -- Syntax Error --
Unknown symbol: p2
 
Last edited:

Thread Starter

ci139

Joined Jul 11, 2016
1,898
it's somewhat surprising to find out where they ran short of wisdom making such - otherwise sophisticated - tool
 
Top