Logo by Dinkydau - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. March 29, 2024, 06:16:09 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 ... 3 4 [5] 6   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: The Mandelbrot Polynomial Roots Challenge  (Read 25697 times)
0 Members and 1 Guest are viewing this topic.
quaz0r
Fractal Molossus
**
Posts: 652



« Reply #60 on: December 01, 2015, 11:08:54 PM »

yes i know the word argument has more meanings than "a heated confrontation."  jeez, you just cant stop talking down to me can you  grin
and yes, i am also familiar with the idea of a circular argument.  an example on the wikipedia page for circular reasoning is "Whatever is less dense than water will float, because whatever is less dense than water will float."  my statement was not really intended (nor written?) as "writing to C arrays is thread safe because writing to C arrays is thread safe," the point was simply "writing to C arrays is thread safe whereas writing to std containers in the same manner is not thread safe."  to use the stuff that floats analogy, i said "boats float, whereas rocks sink," not "boats float because boats float."  if you wanted to respond to my statement in a weird, unprovoked, passive aggressive way, it would have made more sense to just say "that is obvious. i already knew that."  calling it a circular argument is neither accurate nor...called for?  as again, i thought this was a discussion board, not a debate club or...whatever...
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #61 on: December 01, 2015, 11:21:50 PM »

head batting
cheesy

Logged
quaz0r
Fractal Molossus
**
Posts: 652



« Reply #62 on: December 01, 2015, 11:27:06 PM »

lol  smiley
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #63 on: December 02, 2015, 02:19:54 PM »

Ok!
Yesterday, it was late, I was tired...

Returning back and reading more carefully:
A simple way around this is to make N vectors (for N threads) and then just write into the vector indexed by omp_get_thread_num(). Combine after processing is done.
And:
(...) the idea is to not have mutex locking, atomics, etc.
It was these ideas That I found genius.

my own preference is to just use a normal C array and write into that.  it is thread safe as long as your threads stick to their own designated ranges of the array.
I also found this idea awesome.

I did a fast test with <array> and found that the overhead of not using reserve() is not terrible. Therefore and because using c arrays raises the problem of correct amount of memory to allocate. I will use lycium's idea.

Finally, big apologies to both of you and thank you very much for your awesome ideas.  smiley
Logged
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #64 on: December 02, 2015, 02:49:02 PM »

You're too kind, and please don't apologise on my behalf  A Beer Cup
Logged

knighty
Fractal Iambus
***
Posts: 819


« Reply #65 on: December 02, 2015, 03:57:16 PM »

I didn't. I was talking for myself.
Logged
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #66 on: December 02, 2015, 04:04:38 PM »

Oh, ehm, I meant, not need to apologise to me / because of anything I said etc. Anyhow, glad we're cool  A Beer Cup (I don't actually drink beer either, but the symbolism is there)

Edit: one last thing about the std::vector, on Windows/MSVC you'll want to build with _SECURE_SCL=0 defined in the preprocessor settings. This is what I was referring to earlier about making them same perf to access as arrays; afaik GCC etc doesn't do range checking.
« Last Edit: December 02, 2015, 04:40:58 PM by lycium » Logged

quaz0r
Fractal Molossus
**
Posts: 652



« Reply #67 on: December 02, 2015, 04:57:18 PM »

at   access specified element with bounds checking
(public member function)

operator[]   access specified element
(public member function)

is micros~1 really so nonstandard that you have to turn off bounds checking for operator[] ?  i guess it wouldnt surprise me  sad
Logged
hgjf2
Fractal Phenom
******
Posts: 456


« Reply #68 on: December 05, 2015, 09:23:49 AM »

is micros~1 really so nonstandard that you have to turn off bounds checking for operator[] ?  i guess it wouldnt surprise me  sad
Wow! This topic have many replies. COOL!
 A peacock A Star

Reminder: This chapter isn't competition. The real competition will begin on 1 may at chapter "Competitions and contests" when we will say: "Go faster else will beating our the horses!" or "Fly like the wind Artax!"
Logged
cyseal
Explorer
****
Posts: 48


« Reply #69 on: December 05, 2015, 12:21:34 PM »

What tools and algortihms are you using ?
Can it be done in Mathematica ?
Logged
Adam Majewski
Fractal Lover
**
Posts: 221


WWW
« Reply #70 on: December 05, 2015, 04:17:24 PM »

IMHO results are more important that tools.
Questions about algorithms, precision of computations are very important.

BTW :
http://arxiv.org/pdf/1508.02935.pdf

HTH
« Last Edit: December 07, 2015, 09:29:57 PM by Adam Majewski, Reason: link » Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #71 on: December 11, 2015, 05:19:23 PM »

Finally got multithreading to work using c++11, so not with pthreads. I'll try to post the code next sunday after some cleaning.

What tools and algortihms are you using ?
Can it be done in Mathematica ?
It should be possible.

Interesting.
Quote
The total number of iterations required to find all roots was 3 056 825 939 654 ≈ 2.78d² (...) The total number of Newton iterations required, while theoretically bounded above by O(d2log4d)
Lawrence's method is probably O(d log d). Mine is maybe between O(d log d) and O(d log2d).
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #72 on: December 13, 2015, 12:07:58 PM »

Here it is.
Computes one million roots in 22.5 seconds on a i7.  afro

* mandelroots.zip (5.65 KB - downloaded 130 times.)
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #73 on: December 13, 2015, 02:01:04 PM »

hey people, regarding a database, if you still think it is useful, i prepared a project able to store roots for various formulas, it is not finished yet
and user accounts need to be created, but here you have a swagger2 api definition from the live backend:
http://qa.feuerware.com:8100/ufp-api/v2/api-docs

the idea is:
- create formulas
- store polynomal roots with formula reference, rootindex, iteration depth
- numbers are submitted as arbitrary long strings, and get stored as 18 digits of long for searching through the results

as soon as i am happy with the setup i will provide a tutorial on how to use the api, in general every user would need an account,
but perhaps we can keep the reading of results in a public manner as long as server says "yes" wink
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Adam Majewski
Fractal Lover
**
Posts: 221


WWW
« Reply #74 on: December 13, 2015, 03:30:42 PM »


BTW
There is also MPFR program by Claude :
https://en.wikibooks.org/wiki/Fractals/Mathematics/Newton_method#center
Logged
Pages: 1 ... 3 4 [5] 6   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Rhyming challenge Fractal Humor Zedsquared 4 2812 Last post February 10, 2008, 02:42:08 PM
by David Makin
Roots of real polynomial x²+x Mandelbrot & Julia Set stigomaster 13 3724 Last post February 09, 2010, 12:43:58 AM
by Timeroot
Polynomial Roots, degree 7, coeff {-10, -9, ..., 10} \ {0}, centered at 1i Images Showcase (Rate My Fractal) johandebock 3 2081 Last post June 23, 2010, 09:01:17 PM
by kram1032
Mandelbrot Challenge General Discussion decayer 2 4407 Last post August 17, 2011, 01:54:49 PM
by decayer
Fractal Fun: Tweet-a-Program Mandelbrot Code Challenge Competitions and Contests Geonat 0 3797 Last post November 18, 2014, 12:06:17 PM
by Geonat

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.184 seconds with 29 queries. (Pretty URLs adds 0.011s, 2q)