|
From: Tatsuro M. <tma...@ya...> - 2010-10-01 11:19:37
|
Hello
--- Tatsuro MATSUOKA wrote:
> Hello
>
> --- Ethan Merritt wrote:
>
> > On Thursday 30 September 2010 04:24:36 pm Tatsuro MATSUOKA wrote:
> > > Hello
> > >
> > > I have tried Ethan's modification to config.dj2.
> > > It seems to work fine on gnuplot 4.4.2 and 4.5.
> > >
> > > Before Patch
> > > gnuplot> print NaN
> > > undefined variable: NaN
> > > After patch
> > > gnuplot> print NaN
> > > 0.0
> >
> > Unfortunately, that shows isnan() is found but the initialization of
> > the user variable NaN is not working correctly.
> > NaN should print as "NaN" or "nan" rather than 0.0.
> >
> > Could you please try this patch to see if the initialization
> > method used for Microsoft C also works for DJGPP?
> >
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> > --- gnuplot-cvs/src/stdfn.c 2010-07-30 12:11:40.000000000 -0700
> > +++ gnuplot-djgpp/src/stdfn.c 2010-09-30 18:12:55.000000000 -0700
> > @@ -458,7 +458,7 @@
> > double
> > not_a_number(void)
> > {
> > -#ifdef __MSC__
> > +#if defined(__MSC__) || defined(DJGPP) || defined(__DJGPP__)
> > unsigned long lnan[2]={0xffffffff, 0x7fffffff};
> > return *( double* )lnan;
> > #else
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> Ooops!
>
> On windows version built by gcc on MinGW also gives
> gnuplot> pr NaN
> 0.0
>
> I will research NaN related topic using search engine for gcc on MinGW (and) DJGPP.
> After that I will consider application of the patch.
>
> Regards
>
> Tatsuro
Hello
I have searched the information of the DJGPP
For version 2.04
http://www.delorie.com/djgpp/doc/kb/kb_6.html
************************
The macro NAN was added.
The functions strtod, strtof, strtold and _strtold now understand "Inf", "Infinity", "NaN", "NaN()",
"NaN(hex-number)" and any variations of case in the input string.
New functions snprintf and vsnprintf added.
***********************
However, version 2.04 is the beta release.
(Last update is 30-Nov-2003 for 2.04).
Application is still updated on the 2.03.
(The gcc has been updated to 4.4.4! as Hans suggested.)
Thinking to the above, it is better to apply you patch for DJGPP.
Please wait for a while after I will carry out the test the patch
For the MinGW, the different way seem to be used for NaN. I need to search further.
Regards
Tatsuro
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
|