pub fn is_valid_f32_imm(val: f32) -> bool {
    use std::mem;

    // returns true if val has the format:
    //       aBbbbbbc defgh000 00000000 00000000 (where B = !b)
    //index: FEDCBA98 76543210 FEDCBA98 76543210
    //                       1                 0

    let uval = unsafe { mem::transmute::<f32, u32>(val) };

    let b = get_bit(uval as u64, 0x19);

    get_bit(uval as u64, 0x1E) == !b &&
        ((uval & (0b11111 << 0x19)) == if b { 0b11111 << 0x19 } else { 0 }) &&
        ((uval & !(0b1111111111111 << 0x13)) == 0)
}
// Check that the given floating point fits in 8 bits
Check that the given floating point fits in 8 bits
Check that the given floating point fits in 8 bits
pub fn is_valid_f32_imm(val: f32) -> bool {
    use std::mem;
    // returns true if val has the format:
    //       aBbbbbbc defgh000 00000000 00000000 (where B = !b)
    //index: FEDCBA98 76543210 FEDCBA98 76543210
    //                       1                 0
    let uval = unsafe { mem::transmute::<f32, u32>(val) };
    let b = get_bit(uval as u64, 0x19);
    get_bit(uval as u64, 0x1E) == !b &&
        ((uval & (0b11111 << 0x19)) == if b { 0b11111 << 0x19 } else { 0 }) &&
        ((uval & !(0b1111111111111 << 0x13)) == 0)
}
pub fn is_valid_f32_imm ( val : f32 ) -> bool { use std :: mem ; // returns true if val has the format: //       aBbbbbbc defgh000 00000000 00000000 (where B = !b) //index: FEDCBA98 76543210 FEDCBA98 76543210 //                       1                 0 let uval = unsafe { mem :: transmute :: < f32 , u32 > ( val ) } ; let b = get_bit ( uval as u64 , 0x19 ) ; get_bit ( uval as u64 , 0x1E ) == ! b && ( ( uval & ( 0b11111 << 0x19 ) ) == if b { 0b11111 << 0x19 } else { 0 } ) && ( ( uval & ! ( 0b1111111111111 << 0x13 ) ) == 0 ) }
Check that the given floating point fits in 8 bits
Check that the given floating point fits in 8 bits
val
f32
val
f32