- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dear all,
I usually use NORM2 to compute the error in a while cycle.
However, I have complex vector now and NORM2 does not work.
Is there any norm2 function for complex vectors?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a routine NRM2 in MKL, of which the flavors SCNRM2 and DZNRM2 pertain to complex vectors. There is an overloaded routine NRM2 available through the F95 interface.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not in the Fortran standard - NORM2 is defined for REAL only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all, Dear Steve,
Ok. Do you have some suggestion to overcome this?
this is my code, I use norm2 to compute the error:
DO WHILE(NORM(R1)>=eps*NORM(BBg)) ! P1 = R1 + beta0*P0 ! ........ ........ ......... ENDDO
where R1 and BBg are complex vectors
Thanks for any help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'd have to specify explicitly how you want NORM calculated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a routine NRM2 in MKL, of which the flavors SCNRM2 and DZNRM2 pertain to complex vectors. There is an overloaded routine NRM2 available through the F95 interface.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't understand at all why NORM2 for complex input isn't in the standard. Stuff like NORM2(transfer(x,[real(kind(x))::])) or NORM2([NORM2(real(x)),NORM2(aimag(x))]) is possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
thanks a lot.
NRM2 and NORM2([NORM2(real(x)),NORM2(aimag(x))]) work for me.
I have only to compute the difference between two complex vectors
thanks again

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page