Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.forth    |    Forth programmers eat a lot of Bratwurst    |    117,927 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 116,361 of 117,927    |
|    Krishna Myneni to dxf    |
|    Re: DLSHIFT and DRSHIFT    |
|    27 Mar 24 10:44:10    |
      From: krishna.myneni@ccreweb.org              On 3/27/24 08:57, dxf wrote:       > On 27/03/2024 10:26 pm, Ruvim wrote:       >> On 2024-03-27 04:57, Krishna Myneni wrote:       >> [...]       >>> We shouldn't have an ambiguous condition here because of some       idiosyncratic behavior of the SHL instruction!       >>>       >>> u 64 LSHIFT should be zero on all systems with cell sizes up to 64 bits.       >>       >> Ideally — yes.       >>       >> My rationale (see [1]) is that for any `x` and `u`, the result of a single       shift of `x` by `u` bits should always be equivalent to `u` sequential shifts       by 1 bit.       >>       >> But neither the standard nor implementations follow this idea.       >       > The same occurred with 2/ and 2 / . Those who saw Forth as a language wanted       > consistent results; whereas those who saw Forth as a toolkit said give us       what       > the hardware provides.       >              If one needs the machine shift instructions, they should be using the       Forth assembler to write the word in which it is needed. The language       specification has no justification (that I can see) for undefined       behavior for the LSHIFT and RSHIFT instructions.              --       Krishna              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca