search for: iee754

Displaying 12 results from an estimated 12 matches for "iee754".

Did you mean: ieee754
2020 Sep 04
4
Misleading documentation on FP to integer conversion instructions?
If fptosi takes 0.9 -> 0, then that is not 'rounding' in any sense I'm aware of (IEEE754 or otherwise). Rounding (in the IEE754 sense) determines how a number is converted when it is halfway between two candidate results. (see round(), ceil(), floor()). fptosi seems to model the behavior of a C cast from float to int, which truncates the fractional bits (as in trunc()). Steve On Fri, Sep 4, 2020 at 10:51 AM Owen Anders...
2013 Mar 20
0
[LLVMdev] ARM NEON VMUL.f32 issue
...far_ too "aggressive" an option to control this whether multiplies should be allowed produce denormals. I can imagine plenty of cases where I wouldn't care about denormals, but wouldn't want some of the other fast-math semantics applied. Does llvm/clang have any option like strict-iee754 that users can toggle to control things like this? Cheers, Dave -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any othe...
2020 Sep 04
3
Misleading documentation on FP to integer conversion instructions?
> On Sep 4, 2020, at 2:40 PM, Neil Nelson via llvm-dev <llvm-dev at lists.llvm.org> wrote: > >> If fptosi takes 0.9 -> 0, then that is not 'rounding' in any sense I'm aware of (IEEE754 or otherwise). >> Rounding (in the IEE754 sense) determines how a number is converted when it is halfway between two >> candidate results. (see round(), ceil(), floor()). Rounding in the IEEE 754 sense is simply an algorithm to choose one of the two closest values from some set. It does not only concern how halfway cases are handle...
2013 Mar 19
4
[LLVMdev] ARM NEON VMUL.f32 issue
Hi folks, I just "fixed" a bug on ARM LNT regarding lowering of a VMUL.f32 as NEON and not VFP. The former is not IEEE 754 compliant, while the latter is, and that was failing TSVC. The question is: * is this a problem with the test, that shouldn't be expecting values below FLT_MIN, or * is it a bug in the lowering, that should only be lowering to NEON's VMUL when unsafe-math
2008 Jun 08
1
Issue with NA value and Octave compatibility
...issue with the exchange of data files between Octave and R. However, now that I'm in the process of implementing the single precision type I have a problem with this choice for the NA value as the above when cast to a float results in the loss of the 0x7A2 value creating a positive Infinity in IEE754, and so conversion of the NA values between double and float with the above value does not work. I have several possible choices of how to treat this, but as the reason for the choice of Octave's NA value was made for compatibility with R, the choice I'll make might very well be determined...
2002 Nov 18
1
i386 floating point tweaking
...d code. * the author of the triangle package has put this in the code that manipulates the FPU control word: /* Don't change this routine unless you fully understand it. */ - I dont understand it, I changed it, the code broke. Anyone with deeper understanding of floating point, iee754, and assorted other Recipes For Chaos (RFCs) care to comment before we go back to using a file or a pipe to communicate between R and the code? Baz
2011 Sep 22
2
[LLVMdev] Need help in converting int to double
...as an integer. For example (actual values are made >> up): >> >> double a = 42.0; >> void *v = (void*)&a; >> int b = *(int*)v; >> >> "b" will not contain 42. It will contain what looks like random garbage >> (although it is the IEE754 floating point representation of "42.0"). >> >> You need to perform an actual cast: >> >> double a = 42.0; >> void *v = (void*)&a; >> double b = *(double*)v; >> int c = (int)b; >> >> "c" will contain 42. >...
2020 Sep 04
2
Misleading documentation on FP to integer conversion instructions?
The LLVM IR reference manual states, for fptosi: "The ‘fptosi’ instruction converts its floating-point <http://llvm.org/docs/LangRef.html#t-floating> operand into the nearest (rounding towards zero) signed integer value." I interpreted this to mean that it rounds: The nearest integer to 0.3 is 0. The nearest integer to 0.9 is 1. The nearest integer to 0.5 is either 0 or 1. And
2011 Sep 22
0
[LLVMdev] FW: Need help in converting int to double
...ger value. It will get you the double's internal representation as an integer. For example (actual values are made up): double a = 42.0; void *v = (void*)&a; int b = *(int*)v; "b" will not contain 42. It will contain what looks like random garbage (although it is the IEE754 floating point representation of "42.0"). You need to perform an actual cast: double a = 42.0; void *v = (void*)&a; double b = *(double*)v; int c = (int)b; "c" will contain 42. In LLVM speak, you need to LOAD as a double*, perform a fptosi to create an i...
2011 Sep 22
0
[LLVMdev] Need help in converting int to double
...nteger value. It will get you the double's internal representation as an integer. For example (actual values are made up): double a = 42.0; void *v = (void*)&a; int b = *(int*)v; "b" will not contain 42. It will contain what looks like random garbage (although it is the IEE754 floating point representation of "42.0"). You need to perform an actual cast: double a = 42.0; void *v = (void*)&a; double b = *(double*)v; int c = (int)b; "c" will contain 42. In LLVM speak, you need to LOAD as a double*, perform a fptosi to create an int64...
2011 Sep 22
3
[LLVMdev] Need help in converting int to double
Hi, I'm pursuing M.Tech course. As a part of the project work i'm using LLVM as back-end. My project area is "Enhancing the performance of V8 javascript engine using LLVM as a back-end". Now i'm writing code for shift left(SHL) operator. I had my own Value Structure .. it's like this Struct Value { void *val ; char type; } The "char type" holds
2011 Sep 22
1
[LLVMdev] Need help in converting int to double
...9;s > internal representation as an integer. For example (actual values are made > up): > > double a = 42.0; > void *v = (void*)&a; > int b = *(int*)v; > > "b" will not contain 42. It will contain what looks like random garbage > (although it is the IEE754 floating point representation of "42.0"). > > You need to perform an actual cast: > > double a = 42.0; > void *v = (void*)&a; > double b = *(double*)v; > int c = (int)b; > > "c" will contain 42. > > In LLVM speak, you need to LOA...