The reference BLAS sources are part of the netlib LAPACK distribution. They goes way back in R and were moved to this directory in 2006. The netlib sources had been commented and extensively re-formatted since. Various double and complex routines were patched in 2006 in c53001. Routine ZHER2K was patched in 2013 in c62981. In all cases to avoid optimizations which set x*0 = 0 even if x was Inf or NaN. This patching was redone in 2022. complex*16 was changed to double complex, as that is what is used in R. File blas.f contains dasum daxpy dcopy ddot dgbmv dgemm dgemv dger drot drotm drotmg dsbmv dscal dsdot dspmv dspr2 dspr dswap dsymm dsymv dsyr2 dsyr2k dsyr dsyrk dtbmv dtbsv dtpmv dtpsv dtrmm dtrmv dtrsm dtrsv idamax lsame In LAPACK 3.10.0 dnrm2 and drotg were re-written in F90 using min/maxexponent, so blas2.f90 contains those routines. File cmplxblas.f contains dcabs1 dzasum izamax zaxpy zcopy zdotc zdotu zdrot zdscal zgbmv zgemm zgemv zgerc zgeru zhbmv zhemm zhemv zher2 zher2k zher zherk zhpmv zhpr2 zhpr zscal zswap zsymm zsyr2k zsyrk ztbmv ztbsv ztpmv ztpsv ztrmm ztrmv ztrsm ztrsv cmplxblas2.f90 contains dznrm2 and zrotg ---------------------------------------- cd lapack-3.12.0/BLAS/SRC cat dasum.f daxpy.f dcopy.f ddot.f dgbmv.f dgemm.f dgemv.f dger.f drot.f drotm.f drotmg.f dsbmv.f dscal.f dsdot.f dspmv.f dspr2.f dspr.f dswap.f dsymm.f dsymv.f dsyr2.f dsyr2k.f dsyr.f dsyrk.f dtbmv.f dtbsv.f dtpmv.f dtpsv.f dtrmm.f dtrmv.f dtrsm.f dtrsv.f idamax.f lsame.f > ../../blas.f cat dnrm2.f90 drotg.f90 > ../..//blas2.f90 cat dcabs1.f dzasum.f izamax.f zaxpy.f zcopy.f zdotc.f zdotu.f zdrot.f zdscal.f zgbmv.f zgemm.f zgemv.f zgerc.f zgeru.f zhbmv.f zhemm.f zhemv.f zher2.f zher2k.f zher.f zherk.f zhpmv.f zhpr2.f zhpr.f zscal.f zswap.f zsymm.f zsyr2k.f zsyrk.f ztbmv.f ztbsv.f ztpmv.f ztpsv.f ztrmm.f ztrmv.f ztrsm.f ztrsv.f > ../../cmplxblas.f cat dznrm2.f90 zrotg.f90 > ../../cmplxblas2.f90