Merge pull request #980 from ntrost57/master

fixed loss of accuracy in hipCfma()

[ROCm/clr commit: f3966c6cb1]
Этот коммит содержится в:
Maneesh Gupta
2019-03-22 09:14:09 +00:00
коммит произвёл GitHub
родитель 0cf8b184a5 0b3f8dce2b
Коммит 4224de0edc
+2 -2
Просмотреть файл
@@ -328,8 +328,8 @@ __device__ __host__ static inline hipComplex hipCfmaf(hipComplex p, hipComplex q
__device__ __host__ static inline hipDoubleComplex hipCfma(hipDoubleComplex p, hipDoubleComplex q,
hipDoubleComplex r) {
float real = (p.x * q.x) + r.x;
float imag = (q.x * p.y) + r.y;
double real = (p.x * q.x) + r.x;
double imag = (q.x * p.y) + r.y;
real = -(p.y * q.y) + real;
imag = (p.x * q.y) + imag;