[LLVMdev] APFloat: assertion for convertFromString(toString(infty))

Johan Engelen jbc.engelen at swissonline.ch
Sat Mar 7 05:58:47 PST 2015

Hello all,
   I've stumbled across a problem where a string generated by 
APFloat::toString() results in an assertion when passed to 
The problem is simple:
   toString() generates "-Inf" and "+Inf" (line 3550 in 
   convertFromString only recognizes "-inf" and "inf" (line 2617 in 

How would you like me to fix this? Expand the set of accepted strings 
for convertFromString, or modify toString to output "inf" and "-inf"?

(In LDC we started using APFloat's convertFromString() and hit upon this 


More information about the llvm-dev mailing list