nrm21_x1.c

来自「基于Blas CLapck的.用过的人知道是干啥的」· C语言 代码 · 共 21 行

C
21
字号
#include "atlas_misc.h"#include <math.h>TYPE ATL_UNRM2(const int N, const TYPE *X, const int incX)/* * Only machines like x86 with extended precision (both arithmetic and sqrt) * will be able to use this kernel.  On machines with standard 64/32 bit * precision, this will fail the overflow/underflow tests. */{   int i;   #if defined(SREAL) || defined(SCPLX) || defined(ATL_OS_WinNT)      double t0=ATL_rzero;   #else      #define sqrt sqrtl      long double t0=ATL_rzero;   #endif   for (i=0; i < N; i++) t0 += X[i]*X[i];   t0 = sqrt(t0);   return(t0);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?