search for: fe_tonearest

Displaying 2 results from an estimated 2 matches for "fe_tonearest".

2015 Aug 21
2
The semantics of the fptrunc instruction with an example of incorrect optimisation
...ch would be equivalent to rounding towards zero) but this seems to be very misleading because on the target I'm using (x86_64) that **is not** what happens. Consider the following example in C ``` #include <stdio.h> #include <fenv.h> int main() { double x = 0.3; fesetround(FE_TONEAREST); float y = (float) x; printf("y (nearest):%a\n", y); fesetround(FE_UPWARD); y = (float) x; printf("y (upward):%a\n", y); fesetround(FE_DOWNWARD); y = (float) x; printf("y (downward):%a\n", y); return (int) y; } ``` If I get the uno...
2017 Apr 19
3
[cfe-dev] FE_INEXACT being set for an exact conversion from float to unsigned long long
Changing the list from cfe-dev to llvm-dev > On 20 Apr 2017, at 4:52 AM, Michael Clark <michaeljclark at mac.com> wrote: > > I’m getting close. I think it may be an issue with an individual intrinsic. I’m looking for the X86 lowering of Instruction::FPToUI. > > I found a comment around the rationale for using a conditional move versus a branch. I believe the predicate logic