nifty@lemmy.world to Programmer Humor · 1 year agoStop using floatslemmy.worldimagemessage-square92linkfedilinkarrow-up1797arrow-down135
arrow-up1762arrow-down1imageStop using floatslemmy.worldnifty@lemmy.world to Programmer Humor · 1 year agomessage-square92linkfedilink
minus-squarecomputerscientistI@lemm.eeBannedlinkfedilinkarrow-up2·1 year agoFor 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.
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.