What standard naming conventions and or math libraries do you use? I currently use
#include <stdint.h>
typedef float float32_t;
typedef double float64_t;
/*! ISO C99: 7.18 Integer types 8, 16, 32, or 64 bits
intN_t = two’s complement signed integer type with width N, no padding bits.
uintN_t = an unsigned integer type with width N.
floatN_t = N bit IEE 754 float.
uintN_t intN_t floatN_t
bits unsigned-integer signed-integer IEE754 float
8
16 unsigned short short ??"half"
32 unsigned int float
64 unsigned long long double
128 ?? "Long double" "quad" ??*/
but as you can see I am yet to decide upon a math library.
Original Question: Recommendation for a small math library with Straight forward naming convention.
Does anyone know of any small C libraries with straightforward naming conventions? This is what im using right now:
typedef unsigned short UInt16; typedef short Int16;
typedef 开发者_开发技巧unsigned UInt32; typedef int Int32; typedef float Float32;
typedef unsigned long UInt64; typedef long int Int64; typedef double Float64;
What do you use??
Well, since your question is tagged C++ as well, I am going to suggest Boost.Integer. If you are not interested in C++ solutions, please remove that tag from you question.
Which aspects is the library expected to cover? "Straightforward" naming of Data types only? Then just go with your own definitions. If not restricted to data types, you could use nearly any math library as typedefs are just "individualized" names for well known data types ;)
精彩评论