develooper Front page | perl.perl6.internals | Postings from September 2001

Re: Math functions? (Particularly transcendental ones)

Thread Previous | Thread Next
From:
Bryan C . Warnock
Date:
September 9, 2001 07:03
Subject:
Re: Math functions? (Particularly transcendental ones)
Message ID:
0109090958511A.32512@wakko.idiocity.nut

> >   BW> Roll y left z bits and store the result in x.
> >   BW> [what are the valid values for z?]
> >
> > isn't that rotate left? rotate should require z to be the word size or
> > less. or we can define it to work modulo the word size. which reminds
> > me, is there going to be a simple language way to get the word size
> > (other than %Config)?
>
> Yep, rotate.  I really need to wake up before I post email.  Well, what
> if a PMC or Numeric registers are passed to rol, rol, shr, shl?  What
> would be the size then?  We could disallow them since they really don't
> make sense...or do they?  Is the VM going go have a fixed size register
> set regardless of platform?  If not, then the shift will behave
> differently on each platform the bytecode is run...and that's bad,
> especially if someone (cleverly) decides that a "SHL I0,I0,32" clears
> the register.

Previous discussions on bit operators on arbitrarily-sized integers:

http://www.mail-archive.com/perl5-porters@perl.org/msg33402.html
http://www.mail-archive.com/perl5-porters@perl.org/msg29166.html

Executive summary: are you fixing the width of the number or not?

-- 
Bryan C. Warnock
bwarnock@capita.com

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About