[LLVMdev] APFloat::convertToDouble asserts

Jochen Wilhelmy j.wilhelmy at arcor.de
Fri Jul 9 12:59:41 PDT 2010

>> 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.

yes, it's to host double ("convert this APFloat to double"), therefore I 
hoped that it works for any APFloat type (otherwise I would suggest a 
name such as getIfIEEEdouble() ).
Is there a reason against it or would it be accepted if it would work 
for any type?

More information about the llvm-dev mailing list