Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Floating-Point Constants"
2010 Jun 02
0
[LLVMdev] Generating Floating point constants
On Wed, Jun 2, 2010 at 2:59 AM, Stéphane Letz <letz at free.fr> wrote:
> Hi,
>
> We need to generate "Floating point constants" in our code. In http://llvm.org/docs/LangRef.html it is explained that FP has to follow special encoding rules to be handled by LLVM later one (hexadecimal coding...)
>
> Is there any code available in LLVM to handle this kind of
2010 Jun 02
3
[LLVMdev] Generating Floating point constants
Le 2 juin 2010 à 12:21, Eli Friedman a écrit :
> On Wed, Jun 2, 2010 at 2:59 AM, Stéphane Letz <letz at free.fr> wrote:
>> Hi,
>>
>> We need to generate "Floating point constants" in our code. In http://llvm.org/docs/LangRef.html it is explained that FP has to follow special encoding rules to be handled by LLVM later one (hexadecimal coding...)
>>
2007 Jul 15
3
[LLVMdev] Floating point constants (bug?)
>From the language guide:
"The one non-intuitive notation for constants is the optional
hexadecimal form of floating point constants. For example, the form
'double 0x432ff973cafa8000' is equivalent to (but harder to read than)
'double 4.5e+15'. The only time hexadecimal floating point constants
are required (and the only time that they are generated by the
disassembler) is
2010 Jun 02
0
[LLVMdev] Generating Floating point constants
On Jun 2, 2010, at 3:28 AMPDT, Stéphane Letz wrote:
>
> Le 2 juin 2010 à 12:21, Eli Friedman a écrit :
>
>> On Wed, Jun 2, 2010 at 2:59 AM, Stéphane Letz <letz at free.fr> wrote:
>>> Hi,
>>>
>>> We need to generate "Floating point constants" in our code. In http://llvm.org/docs/LangRef.html it is explained that FP has to follow special
2010 Jun 02
2
[LLVMdev] Generating Floating point constants
Hi,
We need to generate "Floating point constants" in our code. In http://llvm.org/docs/LangRef.html it is explained that FP has to follow special encoding rules to be handled by LLVM later one (hexadecimal coding...)
Is there any code available in LLVM to handle this kind of "standard float to LLVM float" conversion?
Thanks.
Stéphane Letz
2010 Jun 02
1
[LLVMdev] Generating Floating point constants
Le 2 juin 2010 à 19:48, Dale Johannesen a écrit :
>
> On Jun 2, 2010, at 3:28 AMPDT, Stéphane Letz wrote:
>
>>
>> Le 2 juin 2010 à 12:21, Eli Friedman a écrit :
>>
>>> On Wed, Jun 2, 2010 at 2:59 AM, Stéphane Letz <letz at free.fr> wrote:
>>>> Hi,
>>>>
>>>> We need to generate "Floating point constants"
2007 Jul 16
0
[LLVMdev] Floating point constants (bug?)
On Sun, 15 Jul 2007, Ben Chambers wrote:
> ...
> store float 0x4016A3D700000000, float* %f
> ...
>
> Which is correct, but is a pain to have to parse. Ideally, floating
> point would be printed like it says in the language guide, only using
> the hexadecimal representation when decimal representation is
> impossible. In this case, however, 5.66e+00 seems pretty
2013 Oct 09
0
[LLVMdev] Related constant folding of floating point values
Hi Arsen,
On Oct 9, 2013, at 4:53 AM, Arsen Hakobyan <artinetstudio at gmail.com> wrote:
> Hi all,
>
> I have the following test case:
> #define FLT_EPSILON 1.19209290E-7
>
> int err = -1;
> int main()
> {
> float a = 8.1;
> if (((a - 8.1) >= FLT_EPSILON) || ((a - 8.1) <= -FLT_EPSILON)) { //I am
> using FLT_EPSILON to check whether (a != 2.0).
2007 Oct 02
3
[LLVMdev] Floating point number format in .ll files changed?
Hi,
after upgrading to 2.1 I noticed that the format for floating point
numbers in .ll files apparently changed. I now get errors like
"llvm-as: var.ll:48,0: Floating point constant invalid for type"
for such code:
"@gmFloat = constant float 0.3".
I checked with llvm-gcc and it now generates code for the hexadecimal
floating point representation. The documentation at
2010 Jun 03
1
[LLVMdev] Generating Floating point constants
> ------------------------------
>
> Message: 4
> Date: Wed, 2 Jun 2010 11:07:39 -0700
> From: Dale Johannesen <dalej at apple.com>
> Subject: Re: [LLVMdev] Generating Floating point constants
> To: St?phane Letz <letz at free.fr>
> Cc: llvmdev at cs.uiuc.edu
> Message-ID: <AEC895CC-E887-4329-8743-FA606BD401F6 at apple.com>
> Content-Type:
2013 Oct 09
4
[LLVMdev] Related constant folding of floating point values
Hi all,
I have the following test case:
#define FLT_EPSILON 1.19209290E-7
int err = -1;
int main()
{
float a = 8.1;
if (((a - 8.1) >= FLT_EPSILON) || ((a - 8.1) <= -FLT_EPSILON)) { //I am
using FLT_EPSILON to check whether (a != 2.0).
err = 1;
} else {
err = 0;
}
return 0;
}
with -O3 optimization level clang generates already incorrect LLVM IR:
; Function Attrs:
2007 Oct 02
0
[LLVMdev] Floating point number format in .ll files changed?
On Oct 2, 2007, at 8:15 AM, Jan Rehders wrote:
> Hi,
>
> after upgrading to 2.1 I noticed that the format for floating point
> numbers in .ll files apparently changed. I now get errors like
>
> "llvm-as: var.ll:48,0: Floating point constant invalid for type"
>
> for such code:
>
> "@gmFloat = constant float 0.3".
>
> I checked with llvm-gcc
2009 Feb 11
1
[LLVMdev] Suggested change to docs re: double/float constant syntax.
It appears to me based on my experiments with llvm-as that literal
floating-point constants may be specified in the 64-bit IEEE
hexadecimal format, but not in the 32-bit format. For instance, this
file:
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-
i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-
f80:128:128"
target triple =
2010 Jun 03
3
[LLVMdev] Generating Floating point constants
Le 3 juin 2010 à 16:00, Martin Guy a écrit :
> [off list]
>
>> 0.8f get converted in 0x3FE99999A0000000 by LLVM
>
> single precision
>
>> http://babbage.cs.qc.edu/IEEE-754/Decimal.html gives:
>>
>> 0x3FE999999999999A instead and this value cannot be read back by "llc"...
>
> double precision
>
> M
Well
For float 0.8 :
2007 Aug 18
1
[LLVMdev] Soft floating point support
This patch supplies software IEEE floating point support.
The comment from the patch reproduced below says all there is
to say.
This patch contains the prior "cleanup" patch; please don't apply
that one.
Please let me know of any bugs. It is tested reasonably well,
but until I put together random tests it's hard to have 100%
confidence.
Neil.
/* A self-contained host- and
2010 Jun 03
0
[LLVMdev] Generating Floating point constants
On Jun 3, 2010, at 7:05 AMPDT, Stéphane Letz wrote:
> Le 3 juin 2010 à 16:00, Martin Guy a écrit :
>
>> [off list]
>>
>>> 0.8f get converted in 0x3FE99999A0000000 by LLVM
>>
>> single precision
>>
>>> http://babbage.cs.qc.edu/IEEE-754/Decimal.html gives:
>>>
>>> 0x3FE999999999999A instead and this value cannot be read back
2012 Mar 05
1
[LLVMdev] printing hex format for floating point number
Hi,
I am trying to print a hex value ( 4111999A for 9.1) for a corresponding
floating point number. The routine convertToHexString in APFFloat class
only prints in C99 Floating point hexagondecimal constant (eg 1.e00000p3).
Without writing my own routine, how do I get to print the hexadecimal
representation for a floating point value?
Sirish
--
Qualcomm Innovation Center, Inc is a member
2007 May 01
2
integer constants given by hexadecimal notation (PR#9648)
On 01/05/2007 7:21 AM, Stephan wrote:
> Hi,
>
>> 0x10L
> returns: int 0
>
> I would expect: int 16?
> This happens with all integer constants given by hexadecimal notation.
> It's a bug?
Certainly looks like one; I've cc'd this to the bug list (but won't be
able to look into fixing it).
Duncan Murdoch
>
>
>> sessionInfo()
> R
2007 May 22
2
R 2.5.0 refuses to print enough digits to recover exact floating point values
I have noticed that in R 2.5.0, no method of textual output will print
a "double" mode quantity with more than 15 digits after the decimal
point. From the help page (?print.default) it appears that this is
intentional, since digits after the fifteenth may be uncertain.
However, fifteen digits after the decimal point are not enough to
represent all the values that an IEEE-double can
2007 May 01
1
integer constants given by hexadecimal notation
Hi,
> 0x10L
returns: int 0
I would expect: int 16?
This happens with all integer constants given by hexadecimal notation.
It's a bug?
> sessionInfo()
R version 2.5.0 (2007-04-23)
i386-pc-mingw32
locale:
LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252
attached base packages:
[1] "stats"