thanks Michaël, what ranges were your numbers in for those operations? We need large precisions over the box bounded by (-2, -2i) and (2, 2i) with most of the interesting features deep inside many decimal points of precision.
I wrote a quick and dirty benchmarker for BigDecimal vs ApFloat the other day, and it looks like for small ranges (<64 sf decimal) and low iterations (<100 iters) BD outperforms ApFloat, but once you get a lot iterations in and deeper than that then ApFloat really pulls ahead. It basically creates a complex number wrapper for BD (why do you have to specify a MathContext on *every* operation argh!! it should just obey the initial precision you give it without going aribitrary!!), starts with c = (0.5, 0.5i) and iterates over n^2 + c at the specified precision for the specified iters. the code for this should be attached, if google chops it off then it's here: http://pastebin.com/cGEkbE1m format: {ApFloat_runtime, BigDecimal_runtime} 10 100 500 1000 64 : {147ms, 11ms}{34ms, 29ms} {65ms, 85ms} {78ms, 203ms} 128 : {1ms, 1ms} {12ms, 33ms} {64ms, 175ms} {119ms, 319ms} 256 : {2ms, 3ms} {35ms, 101ms}{195ms, 507ms}{357ms, 1s} 512 : {11ms, 9ms} {75ms, 343ms}{365ms, 1s} {649ms, 3s} 1024: {6ms, 23ms} {119ms, 1s} {637ms, 7s} {1s, 16s} (nb colouring added by me for emphasis, also there's a bug in the printing that causes prec's greater than 128 to print twice, if you can find the bug please let me know) On 5 April 2010 19:53, michaelm <[email protected]> wrote: > Hi, > I made some benchmarking on a few OS java libraries a few months ago. > The test consists of running two geometric computation methods > involving additions, substraction and multiplications > - isCounterClockWise > - isInCircle > For 1 000 000 operations I get > double 104 ms > DoubleDouble 4334 ms > BigDecimal 29975 ms > Real 36058 ms > Dfp10 61128 ms > Apfloat 98966 ms > > This is a very partial test which does not take into account what each > library can really do (floating point vs arbitrary precision, > including/not including transcendantal functions...) > > http://tsusiatsoftware.net/ > http://real-java.sourceforge.net/Real.html > http://dfp.sourceforge.net/ > http://www.apfloat.org/apfloat_java/ > > Michaël > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<javaposse%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > > -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
FloatTester.java
Description: Binary data
