From: Ulrich Mutze Date: 2009-02-06T04:20:08+09:00 Subject: Re: Proposing an arbitrary precision class building on BigDe Roger Pack wrote: >> Hi Roger, >> thanks for your respond. >> I glanced at gmp again, and found no sin, cos, exp, ... implemented >> there. >> Did I miss something? > R definitely looks like a cool library. > > MPFR? I actually really know nothing about it, I just ran into their > page one day and thought it looked interesting :) MPFR offers all I looked for (in the wrong places as it is clear now). Thank you for this hint! I did a computation of the graph of cos(x)*cos(x) +sin(x)*sin(x) - 1 using 1. Ruby and my class R 2. C++ and class mpfr::mpreal of Pavel Holoborodko. As a matter of fact, the C++ version was 70 times faster. > >> You hold a strong oppinion concerning name R and so do I. >> In short, >> classes express concepts (Stroustrup), >> deep concepts are expressed by classes with short names (Ulrich). >> For a mathematically inclined programmer there is nothing more >> fundamental than the basic number types. >> This is only to explain that the material on my website >> www.ulrichmutze.de >> still uses the name R. >> If the matter should finds its way into a broader discussion, I would be >> open >> for accepting majority wishes. > > You might be able to get away with creating a gem first then suggesting The gem is available as appmath-0.0.1.gem , the name of the real number class is still R. It presents also complex numbers, vectors and matrices of multiple precision components. I also implement singular value decomposition (in pure Ruby) and multiple precision. It works, and was surprised how fast it is. However, also here, C++ turned out to be even much faster. > it be merged into core. Or you could ping ruby-core and see if they > have feedback on incorporating it already. > > Other naming convention possibilities that come to mind: > "Real" > "BigFloat" > "BigDecimal2" > Good luck! > -=R Thanks again and Good luck too! -- Posted via http://www.ruby-forum.com/.