David, I agree this is a potential problem, particularly if you are using float rather than double precision. It should be fixed to stop plplot getting stuck in an infinite loop, but to be honest if you are really trying to plot such a small range then rounding errors are likely to occur with all the rest of the plotting code too. I'll add it to my list unless anyone else can provide a patch first.
Andrew On Tue, Mar 02, 2010 at 01:22:49PM -0800, David MacMahon wrote: > I think I've found a problem with tick marks and tight ranges. > > The tick marks seem to be drawn by starting at an initial "tick > position" and then repeatedly incrementing the tick position by a > delta value until the tick position advances out of range. If the > window is setup for a tight y (or x) range, the magnitude of the non- > zero delta value can be so small that tp+delta == tp (due to limited > bits in the floating point mantissa) and so the incremental process > never finishes and plenv (or plbox or, really, plaxes) never returns > and CPU usage goes to 100%. > > It would be safer to calculate the number ticks to be drawn and then > use an explicitly bounded for loop to draw exactly that many ticks at > positions (initial_pos + i*delta). > > This problem should be repeatable by using one of these... > > plenv(0, 1, 1-1e-16, 1+1e-16, 0, 0); > > plenv(0, 1, 1e16, 1e16+10, 0, 0); > > Dave > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Plplot-devel mailing list > Plplot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/plplot-devel > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel