• Home
  • PDF2GIS
  • Urbo3D
  • Rax
  • Journeylytics
  • Blog

Search

Contact

info@codersco.com

020-7799944

Skip to content
Coders Co.
  • Home
  • PDF2GIS
  • Urbo3D
  • Rax
  • Journeylytics
  • Blog

Category: Cool Bugs

Clock Arithmetic Still Hard

by Jan-MarkCool BugsPosted on 2010-03-163 Comments

Clock or modular arithmetic is hard. Take a look at the two code snippets below. Both seem reasonable integer comparison functions modeled after strcmp(). However, the left one contains an overflow bug. I have thirty odd years of programming experience, yet I had to be pointed out the bug. The left snippet looks obviously wrong …

Read more “Clock Arithmetic Still Hard”

Contact

info@codersco.com

020-7799944

Search

Copyright © 2025 Coders Co. Inspiro Theme by WPZOOM