Browse Source

added ZERO check to zscal.c because bug in lapack-testing

tags/v0.2.9^2
wernsaar 11 years ago
parent
commit
777cebc8c7
1 changed files with 26 additions and 6 deletions
  1. +26
    -6
      kernel/arm/zscal.c

+ 26
- 6
kernel/arm/zscal.c View File

@@ -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…
Cancel
Save