Kalles Fraktaler
|
|
« Reply #15 on: March 23, 2017, 01:25:06 PM » |
|
claude, sorry for asking I have probably already asked this before, but... Where can I get the GMP source code, so that I can complile the code you made? Thanks
|
|
|
Logged
|
|
|
|
claude
Fractal Bachius
Posts: 563
|
|
« Reply #16 on: March 23, 2017, 04:10:34 PM » |
|
|
|
|
Logged
|
|
|
|
jwm-art
Iterator
Posts: 171
|
|
« Reply #17 on: March 24, 2017, 01:14:32 AM » |
|
GMP uses precisions which are multiples of 128 IIRC, whereas MPFR really is arbitrary. Now here comes the anecdotal information: When I was developing MDZ I didn't know if there would be any difference between images calculated using GMP or MPFR so I made it possible for the user to choose. As a quick test I ran md5sum on two PNG images, 480x360 of the same location produced by GMP and MPFR respectively. At a coordinate beyond long-double precision (specifying 128bit precision), with fairly low detail, the checksums were identical, but at a coordinate with higher detail, there was a difference. Grain-extracting the two images shows 2 pixels differ. cx -7.629452986011225709144911246318899918113e-1 cy 9.530800448400036754444994756219512453153e-2 size 2.508901897545227208260204484065216906272e-19
When I used to use MDZ, I alwasy used GMP as it was faster and given enough precision there was no perceptible difference.
|
|
|
Logged
|
|
|
|
Kalles Fraktaler
|
|
« Reply #18 on: March 27, 2017, 11:29:34 AM » |
|
Thanks But it seems you are using "boost" since this include #include <boost/multiprecision/mpfr.hpp> So I downloaded boost, and in the file gmp.hpp the following line caused problems #include <gmp.h> The file gmp.h is not included in the boost download zip. I found one on the internet, https://members.loria.fr/FSur/enseignement/coursCalea/gmp.hThis made me able to compile the project, however there are link error of unresolved externals: __gmp_get_memory_functions __gmpf_abs __gmpf_add I don't know where these functions are implemented, I cannot find them neither in boost or in the gmp download packages, I only find references to these functions... Please help
|
|
|
Logged
|
|
|
|
claude
Fractal Bachius
Posts: 563
|
|
« Reply #19 on: March 27, 2017, 06:36:32 PM » |
|
sorry for not mentioning the boost dep, but your issues are lower-level I think
afaik gmp.h is created when you compile gmp properly (I don't know how to do this on windows, cross-compiling from linux I just pass the right cross-compiler options to ./configure)
|
|
|
Logged
|
|
|
|
Kalles Fraktaler
|
|
« Reply #20 on: March 29, 2017, 09:40:24 AM » |
|
sorry for not mentioning the boost dep, but your issues are lower-level I think
afaik gmp.h is created when you compile gmp properly (I don't know how to do this on windows, cross-compiling from linux I just pass the right cross-compiler options to ./configure)
Thanks. GMP is neither supporting Windows nor Visual Studio, by purpose. I found a pre-compiled library MPIR and I succeeded compiling the program. However the speed is much slower with MPIR, a little slower than CFixedFloat at e1000, while your gcc-program is twice as fast. Are you making updates on your KF version? There are some small bugs that I think you are aware of... May I wish for unlimited precision, I think the only restriction currently is the ToText functions...?
|
|
|
Logged
|
|
|
|
claude
Fractal Bachius
Posts: 563
|
|
« Reply #21 on: March 29, 2017, 05:13:20 PM » |
|
Thanks. GMP is neither supporting Windows nor Visual Studio, by purpose. I found a pre-compiled library MPIR and I succeeded compiling the program. However the speed is much slower with MPIR, a little slower than CFixedFloat at e1000, while your gcc-program is twice as fast.
Are you making updates on your KF version? There are some small bugs that I think you are aware of... May I wish for unlimited precision, I think the only restriction currently is the ToText functions...?
Maybe you can use MINGW/MSYS or similar to compile, instead of Visual Studio? Afaik MPIR is for interval arithmetic, and will do at least twice the work as MPFR. Yes I think precision is now only limited by the ToText static buffer - maybe would be a good time to switch to using std::string where appropriate, instead of raw char * pointers. I'm not sure which other bugs you are referring to - I am making small changes from time to time but I have a lot of different projects to work on, haven't touched it for a few weeks I think.
|
|
|
Logged
|
|
|
|
Kalles Fraktaler
|
|
« Reply #22 on: March 29, 2017, 08:02:49 PM » |
|
Maybe you can use MINGW/MSYS or similar to compile, instead of Visual Studio? Afaik MPIR is for interval arithmetic, and will do at least twice the work as MPFR.
Yes I think precision is now only limited by the ToText static buffer - maybe would be a good time to switch to using std::string where appropriate, instead of raw char * pointers.
I'm not sure which other bugs you are referring to - I am making small changes from time to time but I have a lot of different projects to work on, haven't touched it for a few weeks I think.
No bugs other than what you mentioned, about precision lost on manual zooming, which is not that critical anyway. I think GMP wants to be installed by some Linux specific methods so I am not sure mingw on Windows would help. Anyway, whenever you have the time
|
|
|
Logged
|
|
|
|
claude
Fractal Bachius
Posts: 563
|
|
« Reply #23 on: March 30, 2017, 03:24:59 AM » |
|
New version, without limits on precision - note GMP has a high limit for precision (2^31-1 64bit limbs) and system RAM required to store precise numbers will also limit the reachable depth. Downloads: https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.zip (64bit Windows binary) https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.zip.sig (signature) Other changes: - fixed the scientific notation bug that Dinkydau reported - separate compilation (so make -j8 can use multiple cores, and small changes can recompile only the affected parts) - deleted an operator new() that couldn't be made static and was causing strange issues - reordered some nested loops for improved cache coherency - fixed some "narrowing" warnings
|
|
|
Logged
|
|
|
|
Kalles Fraktaler
|
|
« Reply #24 on: March 30, 2017, 09:20:32 AM » |
|
New version, without limits on precision - note GMP has a high limit for precision (2^31-1 64bit limbs) and system RAM required to store precise numbers will also limit the reachable depth. Downloads: https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.zip (64bit Windows binary) https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170330.zip.sig (signature) Other changes: - fixed the scientific notation bug that Dinkydau reported - separate compilation (so make -j8 can use multiple cores, and small changes can recompile only the affected parts) - deleted an operator new() that couldn't be made static and was causing strange issues - reordered some nested loops for improved cache coherency - fixed some "narrowing" warnings Thanks for this. I'm sorry but it crash when I try to open some kfr files, example attached
|
|
|
Logged
|
|
|
|
claude
Fractal Bachius
Posts: 563
|
|
« Reply #25 on: March 30, 2017, 09:38:14 AM » |
|
Thanks for this. I'm sorry but it crash when I try to open some kfr files, example attached
Arrgh, you're right. And worse, it doesn't crash 100% of the time (at least in my tests), so it's probably some race condition that will be hard to debug. I have a hunch about what it might be, though, so will work on it today...
|
|
|
Logged
|
|
|
|
Kalles Fraktaler
|
|
« Reply #26 on: March 30, 2017, 10:26:21 AM » |
|
Arrgh, you're right. And worse, it doesn't crash 100% of the time (at least in my tests), so it's probably some race condition that will be hard to debug. I have a hunch about what it might be, though, so will work on it today...
It also crash when I pass the e300 limit, where the scaling kicks in, it may be related. I hope you find it worth solving, because the speed improvement you have achieved is really great
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #27 on: March 30, 2017, 01:20:55 PM » |
|
Great project! I think GMP wants to be installed by some Linux specific methods so I am not sure mingw on Windows would help.
MSYS2 comes with prebuilt GMP and mpfr libraries (among lots of other libraries) so no need to compile them from sources.
|
|
|
Logged
|
|
|
|
|
Kalles Fraktaler
|
|
« Reply #29 on: March 30, 2017, 02:50:37 PM » |
|
Crash-bug solved I have also found that there are some issues entering location parameters manually in the location dialog (Ctrl+L) In particular the "easy deep zoom test", e.g. Re:-1.97, Im:0, Zoom:1e100 Great project! MSYS2 comes with prebuilt GMP and mpfr libraries (among lots of other libraries) so no need to compile them from sources. I downloaded and installed MSYS2, but then what? There is a file called msys-gmp-10.dll but no gmp.h or any .lib files...
|
|
|
Logged
|
|
|
|
|