1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
/*
-- MAGMA (version 2.9.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date January 2025
@author Mark Gates
*/
#include <complex>
#include "magma_operators.h"
extern "C"
magmaDoubleComplex magma_zsqrt( magmaDoubleComplex x )
{
std::complex<double> y = std::sqrt( std::complex<double>( real(x), imag(x) ));
return MAGMA_Z_MAKE( real(y), imag(y) );
}
extern "C"
magmaFloatComplex magma_csqrt( magmaFloatComplex x )
{
std::complex<float> y = std::sqrt( std::complex<float>( real(x), imag(x) ));
return MAGMA_C_MAKE( real(y), imag(y) );
}
|