|
From: Tatsuro M. <tma...@ya...> - 2010-10-01 01:40:42
|
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
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
|