On 2015-05-11 16:23-0400 Hazen Babcock wrote: > On 04/15/2014 07:44 AM, Hazen Babcock wrote: >> On 4/7/2014 11:08 PM, Alan W. Irwin wrote: >>> I have just had a further idea. For comprehensive testing situations >>> it might be good to have the option to call feenableexcept (the C >>> library function that you used to help debug x29c.c that should be >>> available for c99 according to its Linux man page) from within the >>> PLplot library (say as the result of plinit). If you agree (a) that >>> idea would work and (b) it would be useful, would you be willing to >>> implement it in C for the case when the PLPLOT_ENABLE_FLOAT_EXCEPT C >>> macro is #defined? If so, I would be willing to do the rest on the >>> CMake side (create a CMake option for this and propagate it to the >>> corresponding C macro for the compilation of the source file where you >>> have implemented the feenableexcept call). >> >> I have tested the idea and it works. I'm not sure about the utility >> though. Based on my tests it already caught the only error in the >> examples that it is going to catch. After the git transition I can >> create a branch that will catch floating point exceptions and you can >> merge it (or not) into the master branch based on your feeling about >> it's utility. > > Much time passes during which I never implement this branch as promised, and > it looks like some more floating point exceptions have crept in. More > specifically I'm seeing floating point exceptions in x25, x30 and x33. The > problem seems to be with plgradient() when it uses a software fallback > gradient (I was testing with the xwin driver). > > You can pull a branch with floating point exception trapping enabled for > these examples here: > https://github.com/HazenBabcock/PLplot/tree/fpe_x25_x30_x33 > > The problem is occurring in notcrossed() in plfill.c at line 2040 when > converting from a PLFLT to a PLINT. It looks like fxintersect and fyintersect > can take on values that are too large to be converted to integers. Checking > for this fixes the problem, but maybe this is indicating some problem > upstream?
Hi Hazen: I am glad to hear you have created a topic branch that catches floating point exceptions. However, I am not keen on pulling a PLplot topic branch from github for the reasons discussed in README.developers. So could you either share your topic branch using "git format-patch" or else just push it to our official repo yourself? The former is preferred if the work is incomplete (i.e., does not include a cmake option to control when the PLPLOT_ENABLE_FLOAT_EXCEPT macro is #defined). Furthermore, if the work is incomplete, I can finish the cmake aspects of it as promised above and amend your commit accordingly. Once we have implemented an option to check for floating-point exceptions, then that means any of us should be able to confirm the ones you have found and find others in the future due to the continued evolution of our examples. And, of course, this option should allow us to fix those floating-point exceptions as time permits. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel