1. Big Fixed Math - v0.66.01 submitted
- Posted by Lucius L. Hilley III <euphoria at u?kmar.co?> Jun 03, 2008
- 710 views
Arbitrary precision math library with power, root, and logarithm functions. bigfixed.e is the only include file needed. math.e is some of my prototype code. Proof of Concept. Be sure to run the demo. The demo code is a little hard to read. The demo was written as more of a sanity test and to help write the documentation. The documentation is far from completely, yet supplies all the critical functions that are availalbe. plain_power() has not yet been documented and is a very powerful function. It is useful for calculating any base by a integer exponent. 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
2. Re: Big Fixed Math - v0.66.01 submitted
- Posted by Michael J. Sabal <m_sabal at yahoo.?om> Jun 03, 2008
- 698 views
Lucius L. Hilley III wrote: > > Arbitrary precision math library with power, root, and logarithm functions. > > bigfixed.e is the only include file needed. > math.e is some of my prototype code. Proof of Concept. > > Be sure to run the demo. The demo code is a little hard to read. > The demo was written as more of a sanity test and to help write the > documentation. > > The documentation is far from completely, yet supplies all the > critical functions that are availalbe. plain_power() has not yet > been documented and is a very powerful function. It is useful > for calculating any base by a integer exponent. > > 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?
3. Re: Big Fixed Math - v0.66.01 submitted
- Posted by Lucius L. Hilley III <euphoria at unkma?.c?m> Jun 03, 2008
- 696 views
Michael J. Sabal wrote: > > Lucius L. Hilley III wrote: > > > > Arbitrary precision math library with power, root, and logarithm functions. > > > > bigfixed.e is the only include file needed. > > math.e is some of my prototype code. Proof of Concept. > > > > Be sure to run the demo. The demo code is a little hard to read. > > The demo was written as more of a sanity test and to help write the > > documentation. > > > > The documentation is far from completely, yet supplies all the > > critical functions that are availalbe. plain_power() has not yet > > been documented and is a very powerful function. It is useful > > for calculating any base by a integer exponent. > > > > 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)
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} 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. Display: {32623, 201, 3.35} 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
4. Re: Big Fixed Math - v0.66.01 submitted
- Posted by Lucius L. Hilley III <euphoria at unkmar.?om> Jun 03, 2008
- 702 views
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