From 5832df5f51b010b984299d28264b3af5216cc7b9 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Thu, 9 May 2024 11:21:28 +0200 Subject: [PATCH] avoid 128-bit random numbers --- test/linalg/test_linalg_lstsq.fypp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/linalg/test_linalg_lstsq.fypp b/test/linalg/test_linalg_lstsq.fypp index 29cd07519..9aba94871 100644 --- a/test/linalg/test_linalg_lstsq.fypp +++ b/test/linalg/test_linalg_lstsq.fypp @@ -70,14 +70,17 @@ module test_linalg_least_squares type(linalg_state_type) :: state integer(ilp), parameter :: n = 12, m = 3 + real :: Arnd(n,m),xrnd(m) ${rt}$ :: xsol(m),x(m),y(n),A(n,m) ! Random coefficient matrix and solution - call random_number(A) - call random_number(xsol) + call random_number(Arnd) + call random_number(xrnd) ! Compute rhs - y = matmul(A,xsol) + A = real(Arnd,${rk}$) + xsol = real(xrnd,${rk}$) + y = matmul(A,xsol) ! Find polynomial x = lstsq(A,y,err=state)