Dan Sugalski <[EMAIL PROTECTED]> writes: > At 07:43 PM 9/8/2001 -0700, Wizard wrote: > >Questions regarding Bitwise operators: > > > > > =item rol tx, ty, tz * > >... > > > =item ror tx, ty, tz * > > > >Are these with or without carry? > > That's a good question. Now that we have a list of bitwise ops, we can > decide how they work. What happens when you rotate/shift/bit-or a float? Or > a bitint/bigfloat? Or a string? Important questions, and we can hammer > something out now that we know what they are. I'd like to suggest that the shift- and roll/rotate- ops take a 4th parameter, that being the "word"-size in bits. For Bigints and arbitrary-length bit-vectors, the size of a "word" to rotate or shift could be infinite, probably isn't what is wanted. It would also make simpler such operations that might come up in some cryptographic routines, like "rotate the upper 64 bits left 3 bits", which would be encoded as (assuming "rotate_l dest, source, roll-amount, wordsize") rotate_l P1, P1, 64, 128 rotate_l P1, P1, 3, 64 rotate_r P1, P1, 64, 128 Just my 2 centums.
- Re: Math functions? (Particularly transcendental ones) Jeremy Howard
- Re: Math functions? (Particularly transcendental ones) Michael G Schwern
- Re: Math functions? (Particularly transcendental ones) Bryan C . Warnock
- Re: Math functions? (Particularly transcendental ones) Dan Sugalski
- Re: Math functions? (Particularly transcendental ones) Dan Sugalski
- RE: Math functions? (Particularly transcendental ones) Dan Sugalski
- RE: Math functions? (Particularly transcendental ones) Dan Sugalski
- Re: Math functions? (Particularly transcendental ones) Dan Sugalski
- Re: Math functions? (Particularly transcendental ones) John Siracusa
- Re: Math functions? (Particularly transcendental ones) Dan Sugalski
- RE: Math functions? (Particularly transcendental ones) Buddha Buck
- RE: Math functions? (Particularly transcendental ones) Wizard
- RE: Math functions? (Particularly transcendental ones) Dan Sugalski
- RE: Math functions? (Particularly transcendental ones) Brent Dax
- Re: Math functions? (Particularly transcendental ones) Bart Lateur
- Re: Math functions? (Particularly transcendental ones) Uri Guttman
- Re: Math functions? (Particularly transcendental ones) Uri Guttman
- Re: Math functions? (Particularly transcendental ones) Uri Guttman
- Re: Math functions? (Particularly transcendental ones) Uri Guttman
- Re: Math functions? (Particularly transcendental ones) Uri Guttman
- Re: Math functions? (Particularly transcendental ones) Dan Sugalski