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

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


0 Replies Last Post Dec 10, 2017, 9:23 a.m. EST
COMSOL Moderator

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.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.