Note: x^n power function returns real values only!

It is not made clear in the CL Documentation for expressions:

https://www.circuitlab.com/docs/expressions/

but the ^ or POW(x,n) function only returns the real part of x^y.

This means that it returns 0 with non-integer exponents and negative inputs.

Two alternative functions are shown which return a non-zero result for negative inputs with any exponent.

However, care must be exercised when using them to ensure that they represent realistic behaviour.

It is also not clear that the x^n or POW(x,n) function does not work with n replaced by arbitrary expression such as a node voltage.

Simulate > DC Sweep > Run DC Sweep

by signality
December 14, 2012

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.