roperFractionFloatInteger :: Float -> (Integer, Float)
properFractionFloatInteger v@(F# x) =
    case decodeFloat_Int# x of
      (# m, e #)
        | isTrue# (e <# 0#) ->
          case negateInt# e of
            s | isTrue# (s ># 23#) -> (0, v)
              | isTrue# (m <#  0#) ->
                case negateInt# (negateInt# m `uncheckedIShiftRA#` s) of
                  k -> (smallInteger k,
                            case m -# (k `uncheckedIShiftL#` s) of
                              r -> F# (encodeFloatInteger (smallInteger r) e))
              | otherwise           ->
                case m `uncheckedIShiftRL#` s of
                  k -> (smallInteger k,
                            case m -# (k `uncheckedIShiftL#` s) of
                              r -> F# (encodeFloatInteger (smallInteger r) e))
        | otherwise -> (shiftLInteger (smallInteger m) e, F# 0.0#)

{
properFractionFloatInteger :: Float -> (Integer, Float)
properFractionFloatInteger v@(F# x) =
    case decodeFloat_Int# x of
      (# m, e #)
        | isTrue# (e <# 0#) ->
          case negateInt# e of
            s | isTrue# (s ># 23#) -> (0, v)
              | isTrue# (m <#  0#) ->
                case negateInt# (negateInt# m `uncheckedIShiftRA#` s) of
                  k -> (smallInteger k,
                            case m -# (k `uncheckedIShiftL#` s) of
                              r -> F# (encodeFloatInteger (smallInteger r) e))
              | otherwise           ->
                case m `uncheckedIShiftRL#` s of
                  k -> (smallInteger k,
                            case m -# (k `uncheckedIShiftL#` s) of
                              r -> F# (encodeFloatInteger (smallInteger r) e))
        | otherwise -> (shiftLInteger (smallInteger m) e, F# 0.0#)


properFractionFloatInteger v@(F# x) =
    case decodeFloat_Int# x of
      (# m, e #)
        | isTrue# (e <# 0#) ->
          case negateInt# e of
            s | isTrue# (s ># 23#) -> (0, v)
              | isTrue# (m <#  0#) ->
                case negateInt# (negateInt# m `uncheckedIShiftRA#` s) of
                  k -> (smallInteger k,
                            case m -# (k `uncheckedIShiftL#` s) of
                              r -> F# (encodeFloatInteger (smallInteger r) e))
              | otherwise           ->
                case m `uncheckedIShiftRL#` s of
                  k -> (smallInteger k,
                            case m -# (k `uncheckedIShiftL#` s) of
                              r -> F# (encodeFloatInteger (smallInteger r) e))
        | otherwise -> (shiftLInteger (smallInteger m) e, F# 0.0#)

