From: "Mike T. Miller" Date: 2001-05-08T03:07:37+09:00 Subject: [ruby-talk:14792] Integer division oddness My father pointed out this oddity. Using integer math, try this on various languages: -10 / 9 For ruby, python and tcl you get: -2! For java, c and gforth you get: -1 Getting -2 seems really wrong to me. I looked at the code for ruby and found this: (numeric.c: line 1056) if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) { mod += y; div -= 1; } So, bascially, one is subtracted on purpose in this case. Is this an accepted way to do integer division tha I'm not familiar with? thanks, Mike