On May 14, 2012, at 12:49 AM, Igor Stasenko wrote: > On 14 May 2012 00:03, Lawson English <lengli...@cox.net> wrote: >> [pharo-project list added back in] >> >> >> On 5/13/12 1:34 PM, Nicolas Cellier wrote: >>> >>> [100000 primeSwingFactorial] timeToRun 3411 [100000 factorial] timeToRun >>> 61219 So gmp is still 40x faster than a reasonably optimized Smalltalk >>> factorial... I think that's fair, because gmp is highly optimized. Since >>> cost is dominated by LargeInteger arithmetic, and since Smalltalk >>> LargeInteger arithmetic in primitives still operates on bytes, I'm not so >>> surprised of the gap... I'd like to see a 64bit image operating on 32 bits >>> positive integers digits, that would already be a progress... Nicolas >> >> >> For me, the most interesting thing would be to figure out how to integrate >> such external libraries more tightly into the language syntax. >> >> Right now, x := 3.14159... always creates a Float, which is stored as a >> double. >> >> x class ===> Float. >> >> What if I wanted to generate a gmplib floating point number (or rational or >> large integer) automatically when the gmplib binding is available? For Floats, there is a GNU project maintained by some groups at Inria: http://www.mpfr.org/
The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both efficient and has a well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 standard for double-precision floating-point arithmetic (53-bit significand). -- Marcus Denker -- http://marcusdenker.de