added ZERO check to zscal.c because bug in lapack-testing
This commit is contained in:
parent
650ed34336
commit
777cebc8c7
|
@ -43,19 +43,39 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r,FLOAT da_i, F
|
|||
BLASLONG ip = 0;
|
||||
FLOAT temp;
|
||||
|
||||
if ( n < 0 || inc_x < 1 ) return(0);
|
||||
|
||||
inc_x2 = 2 * inc_x;
|
||||
for ( i=0; i<n; i++ )
|
||||
{
|
||||
|
||||
temp = da_r * x[ip] - da_i * x[ip+1] ;
|
||||
x[ip+1] = da_r * x[ip+1] + da_i * x[ip] ;
|
||||
if ( da_r == 0.0 )
|
||||
{
|
||||
if ( da_i == 0.0 )
|
||||
{
|
||||
temp = 0.0;
|
||||
x[ip+1] = 0.0 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
temp = - da_i * x[ip+1] ;
|
||||
x[ip+1] = da_i * x[ip] ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( da_i == 0.0 )
|
||||
{
|
||||
temp = da_r * x[ip] ;
|
||||
x[ip+1] = da_r * x[ip+1];
|
||||
}
|
||||
else
|
||||
{
|
||||
temp = da_r * x[ip] - da_i * x[ip+1] ;
|
||||
x[ip+1] = da_r * x[ip+1] + da_i * x[ip] ;
|
||||
}
|
||||
}
|
||||
x[ip] = temp;
|
||||
|
||||
ip += inc_x2;
|
||||
}
|
||||
|
||||
|
||||
return(0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue