⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d1mach.c

📁 DTMK软件开发包,此为开源软件,是一款很好的医学图像开发资源.
💻 C
字号:
/** d1mach - determine machine precision.  Instead of using the
 * original fortran version (or f2c'd version), use this C code
 * instead. This is code is actually in a comment in the original
 * fortran code.
 *
 * Note, that by using this C code, d1mach is now thread safe,
 * whereas, the f2c code was not.
 *
 */
 

/* Standard C source for D1MACH */
#include <stdio.h>
#include <float.h> 
#include <math.h> 
#include "v3p_f2c_original.h"
double d1mach_(integer *i) 
{ 
  switch(*i)
    { 
    case 1: return DBL_MIN; 
    case 2: return DBL_MAX; 
    case 3: return DBL_EPSILON/FLT_RADIX; 
    case 4: return DBL_EPSILON;
    case 5: return log10((double)FLT_RADIX); 
    } 
  fprintf(stderr, "invalid argument: d1mach(%ld)\n", (long) *i);
  return 0; /* some compilers demand return values */
} 

⌨️ 快捷键说明

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