[petsc-users] csqrt

Hui Zhang mike.hui.zhang at hotmail.com
Thu Feb 28 16:08:56 CST 2013


On Feb 28, 2013, at 9:04 PM, Satish Balay wrote:

> On Thu, 28 Feb 2013, Barry Smith wrote:
> 
>> 
>> On Feb 28, 2013, at 5:33 AM, Hui Zhang <mike.hui.zhang at hotmail.com> wrote:
>> 
>>> My cluster has an old version of glibc 2.3.3, which can not give usual principal value of square root.  For example, it gives square root of -i as the value with negative real part.
>>> 
>>> I 'grep' in the source tree of petsc and found csqrt in many places.  Is this dangerous? Thank you!
>> 
>>   If you are using the default PETSc builds where it works with real numbers then it will have no effect on.
>> 
>>   If you are using PETSc with complex numbers you might consider changing the cluster software.
> 
> presumably csqrt() is c99 - so c++ std:sqrt() is perhaps ok ok? [so one could use --with-clanguage=cxx]

Unfortunately, this does not work. Thanks any way!

> 
> Satish
> 





More information about the petsc-users mailing list