38 double d1 =
i, d2 =
i/100.0;
40 for (
int j = 0; j < 1000; j++)
51 for (
int j = 0; j < 1000; j++)
56int main(
int argc,
char **argv){
61 int bench = argc > 1 && !strcmp(argv[1],
"-t");
68 printf(
"test1 double=%d\n", (
int)(d1 * (1<<24)));
78 for(
i= 0;
i<100;
i++){
85 printf(
"test2 double=%d\n", (
int)(d1 * (1<<24)));
88 for(
i= 0;
i<100;
i++){
102 printf(
"test3 double: %.10lf\n", d3);
133 for(
i= -50;
i<50;
i++) {
135 for(j= -50; j<50; j++) {
140 printf(
"av_cmp_sf failed at %d %d as %X\n",
i, j,
c);
144 printf(
"av_gt_sf failed at %d %d as %X\n",
i, j,
c);
148 for(j = -50; j < 50; j++) {
153 printf(
"av_cmp_sf failed2 at %d %d as %X\n",
i, j,
c);
157 printf(
"av_gt_sf failed2 at %d %d as %X\n",
i, j,
c);
163 for(
i= 0;
i<4*36;
i++){
170 if (
fabs(errs) > 0.000000004 ||
fabs(errc) >0.000000004) {
171 printf(
"sincos FAIL %d %f %f %f %f\n",
i, (
float)
s/ (1<<30), (
float)
c/ (1<<30), sin(
i*
M_PI/36), cos(
i*
M_PI/36));
#define i(width, name, range_min, range_max)
common internal and external API header
__device__ int printf(const char *,...)
static __device__ float fabs(float a)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
void av_log_set_level(int level)
Set the log level.
#define FFDIFFSIGN(x, y)
Comparator.
static double add_mul(int i)
static const SoftFloat FLOAT_0_1249694824218
static const SoftFloat FLOAT_0_017776489257
static const SoftFloat FLOAT_1374_40625
static SoftFloat add_mul_sf(int i)
static av_const SoftFloat av_add_sf(SoftFloat a, SoftFloat b)
static av_const int av_cmp_sf(SoftFloat a, SoftFloat b)
Compares two SoftFloats.
static av_const int av_sf2int(SoftFloat v, int frac_bits)
Converts a SoftFloat to an integer.
static av_const SoftFloat av_div_sf(SoftFloat a, SoftFloat b)
b has to be normalized and not zero.
static av_unused void av_sincos_sf(int a, int *s, int *c)
Rounding-to-nearest used.
static av_const SoftFloat av_mul_sf(SoftFloat a, SoftFloat b)
static av_const double av_sf2double(SoftFloat v)
Convert a SoftFloat to a double precision float.
static av_const SoftFloat av_int2sf(int v, int frac_bits)
Converts a mantisse and exponent to a SoftFloat.
static av_const SoftFloat av_normalize_sf(SoftFloat a)
static av_const int av_gt_sf(SoftFloat a, SoftFloat b)
Compares two SoftFloats.
high precision timer, useful to profile code