2024-05-30 16:15:40 Hello. Is this a bug? SwiftForth: > -3 2/ . -3 2 / . => -2 -1 ok 2024-05-30 16:18:36 2/ ? 2024-05-30 16:18:50 Or 2 / ? 2024-05-30 16:19:17 I mean the discrepancy between the 2/ word and the / word with the top element 2. 2024-05-30 16:19:39 gforth and pforth give the same answer in both variants. 2024-05-30 16:19:51 -2 2024-05-30 16:20:12 IMO a bit unintuitive, but at least consistent. 2024-05-30 16:29:13 2/ is usually a right shift by 1 2024-05-30 16:30:43 2/ rounds toward negative infinity, yes 2024-05-30 16:31:18 That’s alright. But why does 2 / then round in the opposite direction? Is this a bug or allowed behaviour? 2024-05-30 16:31:34 because / rounds toward zero 2024-05-30 16:31:49 Not with gforth and pforth. 2024-05-30 16:32:28 that's weird 2024-05-30 16:32:44 not all forths are the same 2024-05-30 16:32:46 Oh. Wait. pforth does. I looked wrong at it. 2024-05-30 16:32:56 gforth doesn’t though. 2024-05-30 16:33:24 On gforth: -3 2/ . -3 2 / . => -2 -2 ok 2024-05-30 16:33:47 Alright. I’ll assume gforth is the odd one out then. 2024-05-30 16:33:54 what does gforth produce when you do this? -15 10 / . 2024-05-30 16:34:16 -2 2024-05-30 16:34:55 weird 2024-05-30 17:02:47 yakubin: Shift doesn't round 2024-05-30 17:02:50 2/ isn't 2 / 2024-05-30 17:02:56 Confusingly 2024-05-30 17:03:12 2/ is really a signed shift of 1 bit, that's all it is 2024-05-30 20:03:20 shift right? 2024-05-30 20:03:23 :) 2024-05-30 20:03:51 3 2/ 1 . 1 ok 2024-05-30 20:04:11 not confusing to me at all, 2\ should be obvious :) 2024-05-30 20:04:33 sorry, meant 3 2/ . 1 ok 2024-05-30 20:04:36 :) 2024-05-30 20:04:52 love the left shift doesn't work. 2024-05-30 20:04:58 on gforth 2024-05-30 20:31:21 It works. Division doesn’t work. 2024-05-30 20:33:18 (Also, when the dividend is positive, integer division by 2 is indistinguishable from right shift.)