?? zc030x_fp.h
字號:
#ifndef h_Zc030x_FPU_h#define h_Zc030x_FPU_h/* Include kernel types */#include <linux/types.h>/* This code is greatly inspired from Author: William A. Rossi 175 Burnt Hill Rd Hope, RI 02831 http://www.rossi.com/sqr2.htm bill@rossi.com It was in public domain, in C++ and using BIGINT libraryI removed BIGINT library, make it C based, and used 64 bits integers to emulate floats (with 2^-18 precision, not so bad) *//* The maximum number of valid digit is 19 */#define MaxDigits 19/* The half number of valid digits is 9 */#define HalfDigits 9/* Define the FPNum structure */typedef struct { uint64_t Mant; /* Easy to guess, this is the mantissa */ int16_t Exp; /* This is the exponent */ int8_t Sign; /* Sign 1 or -1 (0 make this number invalid) */} FPNum;/* Initialize a FPNum from a char (very easy) */void InitFPNum(FPNum * this, const char * Number);/* Get a FPNum output as string */void GetFPNumAsString(FPNum * this, char * output);/* Get a number as an Int64 */int64_t GetFPNumAsInt(FPNum * this);/* Add 2 FPNum numbers */FPNum Add(const FPNum a, const FPNum b);/* Multiply 2 FPNum numbers */FPNum Mul(const FPNum a, const FPNum b);/* Create a FPNum from an int */const FPNum CreateFPNumFromInt(int32_t Number);#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -