Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Branch cut for sqrt
Posted 10.12.2017, 09:23 GMT-5 Low-Frequency Electromagnetics, Parameters, Variables, & Functions Version 5.3 0 Replies
Please login with a confirmed email address before reporting spam
Hi,
For EM modelling, I need result of sqrt to always have positive imaginary part.
My version of Comsol sqrt appears to take a branch cut on -ve axis (e.g. sqrt(-2+0.001i) = 3.e-4+1.4i whereas sqrt(-2-0.001i) = 3.e-4 -1.4i, can I assume that will always be the case in future versions?
Assuming so, then it should be safe to define csqrt( z ) = i * sqrt( - z)
Is such a function already defined and/or are there simpler ways to do this?
Thanks, John
Hello John
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.