Go to the documentation of this file.
47 printf(
"test1 double=%d\n", (
int)(d1 * (1<<24)));
56 for(
i= 0;
i<100;
i++){
60 for(j= 0; j<1000; j++){
65 printf(
"test2 double=%d\n", (
int)(d1 * (1<<24)));
67 for(
i= 0;
i<100;
i++){
71 for(j= 0; j<1000; j++){
83 printf(
"test3 double: %.10lf\n", d3);
114 for(
i= -50;
i<50;
i++) {
116 for(j= -50; j<50; j++) {
121 printf(
"av_cmp_sf failed at %d %d as %X\n",
i, j,
c);
125 printf(
"av_gt_sf failed at %d %d as %X\n",
i, j,
c);
129 for(j = -50; j < 50; j++) {
134 printf(
"av_cmp_sf failed2 at %d %d as %X\n",
i, j,
c);
138 printf(
"av_gt_sf failed2 at %d %d as %X\n",
i, j,
c);
144 for(
i= 0;
i<4*36;
i++){
151 if (
fabs(errs) > 0.000000004 ||
fabs(errc) >0.000000004) {
152 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));
static const SoftFloat FLOAT_1374_40625
static const SoftFloat FLOAT_0_017776489257
static av_const int av_gt_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.
#define FFDIFFSIGN(x, y)
Comparator.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static av_const double av_sf2double(SoftFloat v)
Convert a SoftFloat to a double precision float.
static __device__ float fabs(float a)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static av_const int av_cmp_sf(SoftFloat a, SoftFloat b)
Compares two SoftFloats.
printf("static const uint8_t my_array[100] = {\n")
static av_const SoftFloat av_normalize_sf(SoftFloat a)
void av_log_set_level(int level)
Set the log level.
#define i(width, name, range_min, range_max)
static av_const SoftFloat av_int2sf(int v, int frac_bits)
Converts a mantisse and exponent to a SoftFloat.
static av_unused void av_sincos_sf(int a, int *s, int *c)
Rounding-to-nearest used.
static av_const SoftFloat av_add_sf(SoftFloat a, SoftFloat b)
static const SoftFloat FLOAT_0_1249694824218
static av_const SoftFloat av_mul_sf(SoftFloat a, SoftFloat b)