In the section for Behavioral sources, the manual says "If the argument of log, ln, or sqrt becomes less than zero, the absolute value of the argument is used". However, I tested sqrt with negative arguments in B sources, and a transient simulation aborts at the moment when the argument becomes negative.
The attached test circuit demonstrates the simulator aborting when the argument to sqrt is negative. I tested no compatibility mode, pspice compatibility mode an ltspice compatibility mode, and they all abort the same way.
I tested sqrt in B sources in three other simulators. PSPICE for TI and spice3f5 evaluate sqrt(abs(x)) when x in sqrt(x) is negative, while ltspice returns 0 for sqrt when the argument is negative.
I am using ngspice 45.2 running in Ubuntu on a 64-bit Intel processor.
Victor