search for: __builtin_tanf

Displaying 4 results from an estimated 4 matches for "__builtin_tanf".

Did you mean: __builtin_nanf
2007 Jun 16
2
[LLVMdev] Wrong tan
...; > This may be due to bug 1505. It fails on x86 using x87 floating point, with the inliner not run, because of 1505, yes. Gonsolo, is that your situation? (What happens is, there is a wrapper in the header file for std::tan (float), like this: inline float tan(float __x) { return __builtin_tanf(__x); } This wrapper is miscompiled due to 1505; when the inliner is run, no problem.) (But, when opt -std-compile-opts is run, the 'tan' call is evaluated at compile time, while 'tanf' resolves to a libc call. This is undesirable, since the whole reason tanf exists is that...
2007 Jun 16
2
[LLVMdev] Wrong tan
Hi! <tangens_bug.cc> #include <iostream> #include <cmath> int main() { float a = 0.3; double b = 0.3; float result_a = std::tan( a ); float result_b = std::tan( b ); std::cout << "tan float: " << result_a << std::endl; std::cout << "tan double: " << result_b << std::endl; }
2007 Jun 16
0
[LLVMdev] Wrong tan
> Result compiled with llvm-g++ 2.0: > tan float: -2.18504 > tan double: 0.309336 This may be due to bug 1505. Ciao, Duncan.
2007 Jun 16
0
[LLVMdev] Wrong tan
...s that your situation? > I tried a simple "llvm-g++ -o simple tan.bug.cc" Output: tan float: -2.18504 tan double: 0.309336 > (What happens is, there is a wrapper in the header file for std::tan(float), > like this: > > inline float > tan(float __x) > { return __builtin_tanf(__x); } > > This wrapper is miscompiled due to 1505; when the inliner is run, no problem.) > > (But, when opt -std-compile-opts is run, the 'tan' call is evaluated at compile > time, while 'tanf' resolves to a libc call. This is undesirable, since the whole > reas...