Displaying 3 results from an estimated 3 matches for "0x3feeb39556255de2ull".
2019 Apr 16
2
[FP] Constant folding math library functions
...g of math library functions can lead to minor differences in results. A colleague sent me the following test case which demonstrates the issue:
#include <stdio.h>
#include <math.h>
typedef union {
double d;
unsigned long long i;
} my_dbl;
int main(void) {
my_dbl res, x;
x.i = 0x3feeb39556255de2ull;
res.d = tanh(x.d);
printf("tanh(%f) = %f = %016LX\n", x.d, res.d, res.i);
return 0;
}
Compiling with "clang -O2 -g0 -emit-llvm" I get this:
define dso_local i32 @main() local_unnamed_addr #0 {
%1 = tail call double @tanh(double 0x3FEEB39556255DE2) #2
%2 = tail call...
2019 Apr 16
2
[FP] Constant folding math library functions
...brary functions can lead to minor differences in results. A colleague sent me the following test case which demonstrates the issue:
#include <stdio.h>
#include <math.h>
typedef union {
double d;
unsigned long long i;
} my_dbl;
int main(void) {
my_dbl res, x;
x.i = 0x3feeb39556255de2ull;
res.d = tanh(x.d);
printf("tanh(%f) = %f = %016LX\n", x.d, res.d, res.i);
return 0;
}
Compiling with "clang -O2 -g0 -emit-llvm" I get this:
define dso_local i32 @main() local_unnamed_addr #0 {
%1 = tail call double @tanh(double 0x3FEEB39556255DE2) #2
%2 =...
2019 Apr 17
3
[FP] Constant folding math library functions
...g of math library functions can lead to minor differences in results. A colleague sent me the following test case which demonstrates the issue:
#include <stdio.h>
#include <math.h>
typedef union {
double d;
unsigned long long i;
} my_dbl;
int main(void) {
my_dbl res, x;
x.i = 0x3feeb39556255de2ull;
res.d = tanh(x.d);
printf("tanh(%f) = %f = %016LX\n", x.d, res.d, res.i);
return 0;
}
Compiling with “clang -O2 -g0 -emit-llvm” I get this:
define dso_local i32 @main() local_unnamed_addr #0 {
%1 = tail call double @tanh(double 0x3FEEB39556255DE2) #2
%2 = tail call i32 (i8*,...