Skip to content

Commit 8e6f719

Browse files
authored
use huge_val not huge_valf for portability
1 parent af88494 commit 8e6f719

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

utest/test_dnrm2.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,32 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3535
#if defined(BUILD_DOUBLE)
3636

3737
#ifndef INFINITY
38-
#define INFINITY HUGE_VALF
38+
#define INFINITY HUGE_VAL
3939
#endif
4040

4141
CTEST(dnrm2,dnrm2_inf)
4242
{
43+
int i;
4344
double x[29];
4445
blasint incx=1;
4546
blasint n=28;
4647
double res1=0.0f, res2=INFINITY;
4748

48-
for (int i=0;i<n;i++)x[i]=0.0f;
49+
for (i=0;i<n;i++)x[i]=0.0f;
4950
x[10]=-INFINITY;
5051
res1=BLASFUNC(dnrm2)(&n, x, &incx);
5152
ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
5253

5354
}
5455
CTEST(dnrm2,dnrm2_tiny)
5556
{
57+
int i;
5658
double x[29];
5759
blasint incx=1;
5860
blasint n=28;
5961
double res1=0.0f, res2=0.0f;
6062

61-
for (int i=0;i<n;i++)x[i]=7.457008414e-310;
63+
for (i=0;i<n;i++)x[i]=7.457008414e-310;
6264
res1=BLASFUNC(dnrm2)(&n, x, &incx);
6365
ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
6466
}

0 commit comments

Comments
 (0)