search for: converttodouble

Displaying 9 results from an estimated 9 matches for "converttodouble".

2010 Jul 09
2
[LLVMdev] APFloat::convertToDouble asserts
Hi! I wonder why APFloat::convertToDouble asserts if it is not an APFloat::IEEEdouble while the name "convertToDouble" suggests that it converts when it is not a double. -Jochen
2010 Jul 09
0
[LLVMdev] APFloat::convertToDouble asserts
On Jul 9, 2010, at 7:59 AMPDT, Jochen Wilhelmy wrote: > Hi! > > I wonder why APFloat::convertToDouble asserts if it is not an > APFloat::IEEEdouble while the name "convertToDouble" suggests that it > converts when it is not a double. The conversion is to (host) double, as the name implies. Among APFloat types, that is only implemented for APFloat::IEEEdouble.
2010 Jul 09
2
[LLVMdev] APFloat::convertToDouble asserts
>> >> I wonder why APFloat::convertToDouble asserts if it is not an >> APFloat::IEEEdouble while the name "convertToDouble" suggests that it >> converts when it is not a double. > > The conversion is to (host) double, as the name implies. Among > APFloat types, that is only implemented for APFloat::IEEEdouble...
2010 Jul 09
0
[LLVMdev] APFloat::convertToDouble asserts
On Jul 9, 2010, at 12:59 PMPDT, Jochen Wilhelmy wrote: >>> I wonder why APFloat::convertToDouble asserts if it is not an >>> APFloat::IEEEdouble while the name "convertToDouble" suggests that >>> it >>> converts when it is not a double. >> >> The conversion is to (host) double, as the name implies. Among >> APFloat types, that is only...
2010 Jul 09
2
[LLVMdev] APFloat::convertToDouble asserts
> I'd rather not. The functionality you want is there, feed another > APFloat type through APFloat::convert first. > > Using host FP is not something that should be encouraged; the main > point of APFloat is so people don't have to do that. Why do you want > to, btw? > Yes, i got it working using APFloat::convert. I need host float to output to my backend which
2010 Jul 09
0
[LLVMdev] APFloat::convertToDouble asserts
On Jul 9, 2010, at 1:20 PMPDT, Jochen Wilhelmy wrote: >> I'd rather not. The functionality you want is there, feed another >> APFloat type through APFloat::convert first. >> >> Using host FP is not something that should be encouraged; the main >> point of APFloat is so people don't have to do that. Why do you >> want to, btw? > > Yes, i got
2008 Jun 06
3
[LLVMdev] StmtPrinter long double support.
...file defined the x86 (and x86_64) long double type as APFloat::x87DoubleExtended. Then, when the AST printer try to write a long double literal value (using VisitFloatingLiteral()), it call FloatingLiteral- >getValueAsDouble() and the later does not support long double, so it try to call convertToDouble() as a fallback and crash due to an invalid assertion. APFloat.cpp:2631: failed assertion `semantics == (const llvm::fltSemantics*)&IEEEdouble' This is a know issue as some there is some comments like "// FIXME: We need something for long double here." in FloatingLiteral-...
2008 Jun 06
0
[LLVMdev] StmtPrinter long double support.
...d x86_64) long double > type as APFloat::x87DoubleExtended. > Then, when the AST printer try to write a long double literal value > (using VisitFloatingLiteral()), it call FloatingLiteral- > >getValueAsDouble() and the later does not support long double, so > it try to call convertToDouble() as a fallback and crash due to an > invalid assertion. APFloat.cpp:2631: failed assertion `semantics == > (const llvm::fltSemantics*)&IEEEdouble' > > This is a know issue as some there is some comments like "// FIXME: > We need something for long double here.&quo...
2010 Oct 25
1
[LLVMdev] sprintf -> snprintf conversion
...end/CBackend.cpp (revision 117247) +++ lib/Target/CBackend/CBackend.cpp (working copy) @@ -746,7 +746,7 @@ APF.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &ignored); #if HAVE_PRINTF_A && ENABLE_CBE_PRINTF_A char Buffer[100]; - sprintf(Buffer, "%a", APF.convertToDouble()); + snprintf(Buffer, sizeof(Buffer), "%a", APF.convertToDouble()); if (!strncmp(Buffer, "0x", 2) || !strncmp(Buffer, "-0x", 3) || !strncmp(Buffer, "+0x", 3)) @@ -1072,7 +1072,7 @@ char Buffer[100]; uint64_t ll = DoubleT...