why we should not apply bitwise operators on float values?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ani507
    New Member
    • Jun 2010
    • 1

    why we should not apply bitwise operators on float values?

    if we did program using using bitwise opertors for float values it i showing error
  • newb16
    Contributor
    • Jul 2008
    • 687

    #2
    Because it makes little sense because of undefined internal representation - what would you like 1.75 & 2.5 to be?

    Comment

    • Banfa
      Recognized Expert Expert
      • Feb 2006
      • 9067

      #3
      Because the standard defines bitwise operations as only valid on integer types. No conforming compiler is likely to compile it.

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        What are you trying to accomplish?
        Perhaps we can suggest a workable alternative if we understand the goal.

        Comment

        Working...