From: Michael Neumann Date: 2003-05-28T07:39:27+09:00 Subject: Re: Help! I don't want a bignum... On Wed, May 28, 2003 at 07:14:04AM +0900, Andrew Walrond wrote: > Nobody has a solution?? Surely I haven't stumped you all ;) Write your own C extension that accepts Bignums. Of course there should be a better solution. > Andrew Walrond wrote: > >Ok, I'm sure there is an easy way round this, but I can't see it... > > > >I want to do this... > > > >syscall 88,-18751827,672274793,1126301404 > > > >Which is the kernel sys_reboot call to power-off. > > > >However, ruby kindly converts the last number, 1126301404 (0x4321fedc in > >hex which fits nicely in a long) to a Bignum, but syscall only accepts a > >Fixnum > > > >Any idea how to get around this??? > > > >Andrew Walrond Regards, Michael -- ruby -r complex -e 'c,m,w,h=Complex(-0.75,0.136),50,150,100;puts "P6\n#{w} #{h}\n255";(0...h).each{|j|(0...w).each{|i| n,z=0,Complex(.9*i/w,.9*j/h);while n<=m&&(z-c).abs<=2;z=z*z+c;n+=1 end;print [10+n*15,0,rand*99].pack("C*")}}'|display