From 0fe434598b177fd2d4563b873d5cdd8eb05731a6 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 10 Apr 2018 23:30:59 +0200 Subject: [PATCH] Fix precision of mips dsdot --- kernel/mips/dot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/mips/dot.c b/kernel/mips/dot.c index de7f7167f..cbd3efc64 100644 --- a/kernel/mips/dot.c +++ b/kernel/mips/dot.c @@ -41,8 +41,11 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) while(i < n) { - - dot += y[iy] * x[ix] ; +#if defined(DSDOT) + dot += (double)(y[iy] * (double)x[ix] ; +#else + dot += y[iy] * x[ix]; +#endif ix += inc_x ; iy += inc_y ; i++ ;