Stop using floats - eviltoast
  • computerscientistI@lemm.ee
    link
    fedilink
    arrow-up
    2
    ·
    9 months ago

    For integers it really doesn’t exist. An algorithm for multiplying an integer with -1 is: Invert all bits and add 1 to the right-most bit. You can do that for 0 of course, it won’t hurt.