00:00:00 --- log: started forth/20.12.15 02:21:16 --- join: hosewiejacke joined #forth 02:24:31 Does anybody know why gforth says this is Division by zero? 02:24:32 gforth --evaluate "9223372036854775807 2 1 */" -e bye 02:36:36 What version? 02:37:05 gforth 0.7.3 02:37:28 I haven't tried it, but I suspect a range error. 02:49:48 0x3fffffffffffffff works, 0x4ffffffffffffff0 doesn't... 04:05:00 --- join: Gromboli joined #forth 04:08:59 --- quit: hosewiejacke (Ping timeout: 265 seconds) 04:57:59 you're right, idiv is raising the error in this case assuming he's using gforth on x86 - looks like it's doing signed division on arm as well 05:52:47 --- quit: dave0 (Quit: dave's not here) 06:48:20 --- join: krjst joined #forth 06:49:25 --- quit: boru (Quit: brb) 07:09:02 --- join: boru joined #forth 08:18:20 --- join: Zarutian_HTC joined #forth 08:49:16 --- quit: neuro_sys (Quit: -) 08:49:26 --- join: neuro_sys joined #forth 08:49:26 --- quit: neuro_sys (Changing host) 08:49:26 --- join: neuro_sys joined #forth 09:21:11 --- quit: X-Scale (Ping timeout: 260 seconds) 09:21:19 --- join: X-Scale` joined #forth 09:22:05 --- nick: X-Scale` -> X-Scale 10:14:38 --- quit: gravicappa (Ping timeout: 246 seconds) 10:17:21 --- join: gravicappa joined #forth 10:39:32 --- join: WickedShell joined #forth 11:40:20 --- join: X-Scale` joined #forth 11:41:04 --- quit: X-Scale (Ping timeout: 272 seconds) 11:41:05 --- nick: X-Scale` -> X-Scale 12:35:02 --- join: actuallybatman joined #forth 13:05:36 --- quit: Zarutian_HTC (Remote host closed the connection) 13:27:14 --- quit: gravicappa (Ping timeout: 258 seconds) 13:28:49 --- quit: proteusguy (Ping timeout: 260 seconds) 14:34:02 --- quit: cantstanya (Remote host closed the connection) 14:36:22 --- join: cantstanya joined #forth 14:51:43 --- quit: MrMobius (Read error: Connection reset by peer) 14:52:46 --- join: MrMobius joined #forth 15:05:10 --- quit: WickedShell (Remote host closed the connection) 17:47:17 --- quit: spoofer (Quit: Lost terminal) 17:50:51 --- join: spoofer joined #forth 18:02:09 --- join: boru` joined #forth 18:02:12 --- quit: boru (Disconnected by services) 18:02:14 --- nick: boru` -> boru 18:02:45 --- join: jsoft joined #forth 18:12:17 --- join: Zarutian_HTC joined #forth 18:37:15 --- quit: Gromboli (Quit: Leaving) 19:00:23 --- join: boru` joined #forth 19:00:26 --- quit: boru (Disconnected by services) 19:00:28 --- nick: boru` -> boru 19:31:07 --- join: hosewiejacke joined #forth 20:02:35 --- join: dave0 joined #forth 20:36:07 --- quit: sts-q (Ping timeout: 256 seconds) 20:39:48 --- join: sts-q joined #forth 21:08:59 --- quit: dave0 (Quit: dave's not here) 21:16:21 --- quit: hosewiejacke (Ping timeout: 268 seconds) 21:18:11 --- join: gravicappa joined #forth 22:15:58 --- join: hosewiejacke joined #forth 23:10:47 --- quit: hosewiejacke (Ping timeout: 240 seconds) 23:23:36 --- join: hosewiejacke joined #forth 23:24:14 --- join: dave0 joined #forth 23:29:22 hosewiejacke: are you using gforth compiled for x86-64? 23:31:02 Yes, it's from the OpenBSD packages. 23:34:12 ok, i found that the Division by Zero message seems to occur not only for division by zero, but for the error raised by the idiv instruction when the result overflows as boru suggested 23:35:11 I'm just discovered there are snapshots on https://www.complang.tuwien.ac.at/forth/gforth/Snapshots/ 23:50:57 Compiling the gforth snapshot from 2020-12-03 seems to require a swig version that has a -forth option. swig 4.0.2 doesn't seem to have this option... 23:53:18 inode: the x86 unsigned divide only overflows if the high word of the dividend is greater or equal to the divisor 23:54:32 inode: you can check for overflow in advance (rdx:rax / rcx) cmp rdx,rcx ; jae overflow ; div rcx 23:55:10 that also catches divide by zero (because if rcx=0, rdx is always >= rcx) 23:56:05 don't know about signed divide :-( 23:59:59 --- log: ended forth/20.12.15