Re: x86-64 support

From: Doug Rabson (dfr_at_nlsystems.com)
Date: 05/27/03

  • Next message: Peter Jeremy: "Re: x86-64 support"
    To: freebsd-hackers@freebsd.org, Oliver Fromme <olli@secnetix.de>
    Date: Tue, 27 May 2003 09:56:58 +0100
    
    

    On Monday 28 April 2003 1:54 am, Oliver Fromme wrote:
    > Narvi <narvi@haldjas.folklore.ee> wrote:
    > > On Sat, 26 Apr 2003, M. Warner Losh wrote:
    > > > In message: <20030427064014.H40030-100000@haldjas.folklore.ee>
    > > >
    > > > Narvi <narvi@haldjas.folklore.ee> writes:
    > > > : option USE_PI_DIGITS 100
    > > >
    > > > Only if you could implement it with integer math :-)
    > >
    > > where's the problem in that ? most mp libs use integer arithmetic,
    > > and x86-64 gives you 64x64->128 bit widening multiplies 8-)
    >
    > You don't need that; the digits of pi can be calculated
    > quite easily with integer math. This snippet is from my
    > signature collection:
    >
    > int f[9800],b,c=9814,g,i;long
    > a=1e4,d,e,h;main(){for(;b=c,c-=14;i=printf(
    > "%04d",e+d/a),e=d%a)while(g=--b*2)d=h*b+a*(i?f[b]:a/5),h=d/--g,f[b]=d
    >%g;}
    >
    > Of course it doesn't comply with style(9), otherwise it
    > wouldn't fit into two lines. Prettifying (de-obfuscating)
    > it to make it style(9)-compliant is left as an exercise to
    > the reader. ;-)

    Doesn't appear to work. When I run this, it prints '1877' followed by
    lots of zeros...

    -- 
    Doug Rabson				Mail:  dfr@nlsystems.com
    					Phone: +44 20 8348 6160
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Peter Jeremy: "Re: x86-64 support"