Re: Big Fixed Math - v0.66.01 submitted

new topic     » goto parent     » topic index » view thread      » older message » newer message

Lucius L. Hilley III wrote:
> 
> Michael J. Sabal wrote:
> > 
> > Lucius L. Hilley III wrote:
> > > 
> > > Example:  puts(1, plain_power("3.141 592 654","65,536"))
> > > Note, commas and spaces are ignored in the number format.
> > > 
> > >   Enjoy
> > >     Lucius L. Hilley III - Unkmar
> > 
> > Just out of curiosity, how long does it take to execute the above statement,
> > and on what kind of hardware?
> 
> AMD Athlon XP 2500+ (1.83Ghz)
> }}}
<eucode>
> include bigfixed.e -- Named bigfixedmath.e in the next release.
> 
> atom elapsed
> sequence result
> 
> elapsed = time()
> result =  plain_power("3.141 592 654","65,536"))
> elapsed = time() - elapsed
> 
> -- {length(result), seconds, minutes}
> ?  {length(result), elapsed, elapsed/60}
>
> Display: {32623, 156, 2.6}
> </eucode>
{{{

> 
> I would have displayed the result, but it is a 32K file.
> I then changed the exponent from 65,536 to 65,535 and
> got these results.
> }}}
<eucode>
> Display: {32623, 201, 3.35}
> </eucode>
{{{

> 
> 65536 = power(2, 16) -- hence a nice binary number.
> 65535 is a worst case value.
> 
> PS: 3.14... will grow quickly.  Using 65,535 takes longer.
> A number much closer to 1 will generate nearly instant results.
>
>     Lucius L. Hilley III - Unkmar

result =  plain_power("1.141 592 654","65,536"))
Display: {3809, 3.3, 0.055}


    Lucius L. Hilley III - Unkmar

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu