Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5832df5

Browse files
committed
avoid 128-bit random numbers
1 parent a05809e commit 5832df5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎test/linalg/test_linalg_lstsq.fypp‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,17 @@ module test_linalg_least_squares
7070

7171
type(linalg_state_type) :: state
7272
integer(ilp), parameter :: n = 12, m = 3
73+
real :: Arnd(n,m),xrnd(m)
7374
${rt}$ :: xsol(m),x(m),y(n),A(n,m)
7475

7576
! Random coefficient matrix and solution
76-
call random_number(A)
77-
call random_number(xsol)
77+
call random_number(Arnd)
78+
call random_number(xrnd)
7879

7980
! Compute rhs
80-
y = matmul(A,xsol)
81+
A = real(Arnd,${rk}$)
82+
xsol = real(xrnd,${rk}$)
83+
y = matmul(A,xsol)
8184

8285
! Find polynomial
8386
x = lstsq(A,y,err=state)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /