Floating point error in LambdaFn exp
Hi, It seems there has been a bug in LambdaexponentFractal() for a long time. This shows up in cet16109 (the example params for LambdaFn from the Fractal Creations book) This works in integer, but when you select floating point, it goes bizzaro, and hence doesn't work in 20.3. From my observations, FLOATEXPBAILOUT() doesn't work - it should be FLOATHTRIGBAILOUT I tried to compile the changes using a freshly downloaded JBuilderX, but all I got was a lot of obscure error messages., which reminds me of why I work in java nowadays. If someone feels like checking it out...... I have included the params below, so you don't have to go looking for it. I will get around to figuring out how to compile fractint sometime, but as it doesn't run with my parhelia card, it's low on the list. David cet16109 { reset=2000 type=lambdafn function=exp corners=-5.711838/-0.009338379/0.1610565/4.436798 params=2/4 inside=0 potential=255/511/0 cyclerange=2/255 colors=0006OL3LI0IE<9>UfhXik_kn<3>kuz<9>IMaFI_CFX<3>00N<9>bWVfZVjaW<3>zn\ Z<9>`KFZHDWEB<3>M13<2>S8BVBEXEGZHJ`JM<3>iUYkX_n_bpaerdhtgk<8>mUTlSRkRP<3\
gKGfIDdHD<7>N76L65J54<3>A00<9>TY_VacXdg<3>cru<9>FL`DHZAEX<3>00P<3>KSePY\ iUdmZkqcru<9>FbdDabA_`<3>0UU<3>OeZUh`Zja<3>vvf<15>xaRx`Qx_P<2>xWMyUKxXM<\ 3>phUnkWlnY<3>dze<6>N`OLXLIUI<3>8F8<9>UheWkiYnl<3>fzz<12>9RO }
On Monday 26 January 2004 7:45 pm, David Burnett wrote:
It seems there has been a bug in LambdaexponentFractal() for a long time. This shows up in cet16109 (the example params for LambdaFn from the Fractal Creations book) This works in integer, but when you select floating point, it goes bizzaro, and hence doesn't work in 20.3.
From my observations, FLOATEXPBAILOUT() doesn't work - it should be FLOATHTRIGBAILOUT
Hmm, that's interesting. I'll have a look. I'm in the process of getting the integer/float version up to version 20.3 so we can use it as the basis for an official release. Jonathan
On Monday 26 January 2004 7:45 pm, David Burnett wrote:
It seems there has been a bug in LambdaexponentFractal() for a long time. This shows up in cet16109 (the example params for LambdaFn from the Fractal Creations book) This works in integer, but when you select floating point, it goes bizzaro, and hence doesn't work in 20.3.
From my observations, FLOATEXPBAILOUT() doesn't work - it should be FLOATHTRIGBAILOUT
The code looks correct to me. But, you're right, it sure doesn't draw the same image. I'll have to play with it more. BTW, the DOS integer/float version of 20.3 is available at the developer's web site. Jonathan
David,
From my observations, FLOATEXPBAILOUT() doesn't work - it should be FLOATHTRIGBAILOUT
The code looks correct to me. But, you're right, it sure doesn't draw the same image. I'll have to play with it more.
Ah, here is the problem in fractals.c: #define FLOATEXPBAILOUT() \ if (fabs(old.y) >= 1.0e8) return(1);\ if (fabs(old.x) >= 6.4e2) return(1); #define LONGEXPBAILOUT() \ if (labs(lold.y) >= (1000L<<bitshift)) return(1);\ if (labs(lold.x) >= (8L<<bitshift)) return(1); If the float bailout is changed to match the integer bailout: #define FLOATEXPBAILOUT() \ if (fabs(old.y) >= 1.0e3) return(1);\ if (fabs(old.x) >= 8) return(1); The images are the same. Now, the problem becomes how do we fix this and include backwards compatibility. Jonathan
Jonathon, backward compatibility - always loved the way you guys converts fractint's old mistakes to new features with this change there is an interesting interaction between *Math.abs(calc.real) >= 0 *in the bailout calcs and *Math.cos(calc.imaginary) >= 0.0 *in the LambdaexponentFractal function (please excuse the java notation). I have wondered why the extra bailout calc in LambdaexponentFractal ( if (old.x >= rqlim && cosy >= 0.0) return(1); ) it's not echoed in any of the LambdaTrigfpFractal functions. However FloatTrigPlusExponentFractal has if (fabs(old.x) >= 6.4e2) return(1); /* DOMAIN errors */ which may go a way to explaining where it came from DOMAIN errors ??? - is this some fpu error David. Jonathan Osuch wrote:
David,
From my observations, FLOATEXPBAILOUT() doesn't work - it should be FLOATHTRIGBAILOUT
The code looks correct to me. But, you're right, it sure doesn't draw the same image. I'll have to play with it more.
Ah, here is the problem in fractals.c:
#define FLOATEXPBAILOUT() \ if (fabs(old.y) >= 1.0e8) return(1);\ if (fabs(old.x) >= 6.4e2) return(1);
#define LONGEXPBAILOUT() \ if (labs(lold.y) >= (1000L<<bitshift)) return(1);\ if (labs(lold.x) >= (8L<<bitshift)) return(1);
If the float bailout is changed to match the integer bailout:
#define FLOATEXPBAILOUT() \ if (fabs(old.y) >= 1.0e3) return(1);\ if (fabs(old.x) >= 8) return(1);
The images are the same.
Now, the problem becomes how do we fix this and include backwards compatibility.
Jonathan
_______________________________________________ Fractdev mailing list Fractdev@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/fractdev
-- regards David
participants (2)
-
David Burnett -
Jonathan Osuch