Click here to Skip to main content
15,886,724 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Running out of Memory - Maths Check Pin
Member 91314965-Sep-12 2:00
Member 91314965-Sep-12 2:00 
SuggestionRe: Running out of Memory - Maths Check Pin
Jeremy David Thomson5-Sep-12 1:36
Jeremy David Thomson5-Sep-12 1:36 
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger5-Sep-12 5:54
M-Badger5-Sep-12 5:54 
AnswerRe: Running out of Memory - Maths Check Pin
Member 31409626-Sep-12 20:36
Member 31409626-Sep-12 20:36 
GeneralRe: Running out of Memory - Maths Check Pin
Stefan_Lang7-Sep-12 4:29
Stefan_Lang7-Sep-12 4:29 
AnswerRe: Running out of Memory - Maths Check Pin
Stefan_Lang7-Sep-12 4:49
Stefan_Lang7-Sep-12 4:49 
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger7-Sep-12 21:23
M-Badger7-Sep-12 21:23 
GeneralRe: Running out of Memory - Maths Check Pin
Stefan_Lang10-Sep-12 0:53
Stefan_Lang10-Sep-12 0:53 
I had some time to get an estimate for the accumulation of the precision-based error, and found that it's upper limit is about machine_precision*4^iterations, and the average error would be around machine_precision*2^iterations. That means the maximum error approaches 1 after about 28 iterations for double values (55-56 bit mantisse), and the average error approaches 1 after about 56 iterations.

If you intend to store intermediate results, you might consider approaching this problem from the other side:
1. partition your intervals according to your machine precision, e. g. 2^16x2^16 points
2. for each point, store 1 if after one iteration the divergence criterium is met, or 0 if not. This is the iteration counter.
3. repeat for each point with a value of 0:
3.1 convert the result after one iteration to the resolution of your point array (i. e. check which pixel is closest)
3.2 check the iteration counter for the point corresponding to that value: if it is not 0, store this value+1. Else your counter is still 0.
3.3 when you're done with all points that still have a counter of 0, start all over again, for at most as many times as appropriate to your initial resolution (e. g. no more than 16 times if you started at 2^16x2^16)

This is a reversion of the actual algorithm, deliberately adding in the error (in step 3.1) that you would otherwise get when calculating at a given resolution (in this case 16 bit).
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger10-Sep-12 20:50
M-Badger10-Sep-12 20:50 
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger11-Sep-12 21:29
M-Badger11-Sep-12 21:29 
GeneralRe: Running out of Memory - Maths Check Pin
Stefan_Lang11-Sep-12 22:46
Stefan_Lang11-Sep-12 22:46 
AnswerRe: Running out of Memory - Maths Check Pin
Edward Giles26-Jun-13 19:35
Edward Giles26-Jun-13 19:35 
QuestionPDF417 generator and reader supports Arabic Pin
dinadido28-Aug-12 8:19
dinadido28-Aug-12 8:19 
AnswerCross post. Pin
SoMad28-Aug-12 11:10
professionalSoMad28-Aug-12 11:10 
QuestionA Modelling Question Pin
Roger Wright21-Aug-12 13:01
professionalRoger Wright21-Aug-12 13:01 
AnswerRe: A Modelling Question Pin
Peter_in_278021-Aug-12 13:25
professionalPeter_in_278021-Aug-12 13:25 
GeneralRe: A Modelling Question Pin
Roger Wright21-Aug-12 15:38
professionalRoger Wright21-Aug-12 15:38 
GeneralRe: A Modelling Question Pin
Peter_in_278021-Aug-12 16:08
professionalPeter_in_278021-Aug-12 16:08 
GeneralRe: A Modelling Question Pin
Roger Wright21-Aug-12 16:51
professionalRoger Wright21-Aug-12 16:51 
QuestionC# XNA 4 AI for path Pin
C.CoderCreator19-Aug-12 18:39
C.CoderCreator19-Aug-12 18:39 
AnswerRe: C# XNA 4 AI for path Pin
jk chan19-Aug-12 21:44
jk chan19-Aug-12 21:44 
GeneralRe: C# XNA 4 AI for path Pin
C.CoderCreator19-Aug-12 22:05
C.CoderCreator19-Aug-12 22:05 
GeneralRe: C# XNA 4 AI for path Pin
jk chan19-Aug-12 22:08
jk chan19-Aug-12 22:08 
GeneralRe: C# XNA 4 AI for path Pin
Arthur F Souza4-Sep-12 8:59
Arthur F Souza4-Sep-12 8:59 
QuestionExtract Circle Features From Image Pin
Karl Sanford19-Jul-12 9:42
professionalKarl Sanford19-Jul-12 9:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.