search for: constantfm

Displaying 1 result from an estimated 1 matches for "constantfm".

Did you mean: constantfp
2010 Apr 20
0
[LLVMdev] Fwd: Re: NaNs and Infinities
...mber functions (see below). For non immediates you can use bitcasting to convert the float to an integer. If bits 0-22 are 0 and bits 23-30 are 1 it's infinity; if bits 0-22 are not 0 and bits 23-30 are 1 it's NaN. Others can probably give you a answer and if not at least you have mine. ConstantFM *CFP = dyn_cast<ConstantFP>(myValue); if (CFP != NULL) { CFP->getValueAPF().isNaN(); CFP->getValueAPF().isInfinity(); } else { // Bitcast to an integer at test bits } Thanks, Javier On 4/19/2010 3:19 AM, lost wrote: > Hello! > > How can I test if floating-point value...