From 2e81e348d5fec4a57fbec212ae3c4c63c4dd5147 Mon Sep 17 00:00:00 2001 From: crc <> Date: Wed, 20 Sep 2023 12:00:49 +0000 Subject: [PATCH] double cell example: fix shift directions FossilOrigin-Name: 09fc476ef1e3c4169d6bb43adb5e4a061f363a692ed2bbed75ad318eaa8e374e --- example/double.retro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/double.retro b/example/double.retro index fec6215..4192d92 100644 --- a/example/double.retro +++ b/example/double.retro @@ -49,8 +49,8 @@ small changes (see the `dn:div` in particular). dn:new !~res dup-pair dn:lows n:div @~res dn:l! dup-pair - [ dn:h@ ] [ dn:l@ ] bi* n:div #1 shift-left - [ [ dn:l@ ] [ dn:h@ ] bi* n:mod #31 shift-right ] dip n:add + [ dn:h@ ] [ dn:l@ ] bi* n:div #-1 shift + [ [ dn:l@ ] [ dn:h@ ] bi* n:mod #31 shift ] dip n:add @~res dn:h! @~res ; ~~~