Skip to content

Commit c610e31

Browse files
committed
lfortran_intrinsics.c: Fix random_number()
1 parent 30b5bfc commit c610e31

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/libasr/runtime/lfortran_intrinsics.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,12 +1884,10 @@ LFORTRAN_API double _lfortran_time()
18841884
}
18851885

18861886
LFORTRAN_API void _lfortran_sp_rand_num(float *x) {
1887-
srand(time(0));
18881887
*x = rand() / (float) RAND_MAX;
18891888
}
18901889

18911890
LFORTRAN_API void _lfortran_dp_rand_num(double *x) {
1892-
srand(time(0));
18931891
*x = rand() / (double) RAND_MAX;
18941892
}
18951893

0 commit comments

Comments
 (0)