Re: Float output formatting options - Mailing list pgsql-hackers

From Pedro M. Ferreira
Subject Re: Float output formatting options
Date
Msg-id 3DC6BC4C.2020600@ualg.pt
Whole thread Raw
In response to Float output formatting options  ("Pedro M. Ferreira" <pfrazao@ualg.pt>)
Responses Re: Float output formatting options  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> 
> Yeah.  In fact I'd be inclined to remove the static variable and make
> the code match float8out exactly (do "DBL_DIG + extra_float_digits").

P_MAXDIG is only used in the lines below:

#define P_MAXDIG DBL_DIG
#define P_MAXLEN (2*(P_MAXDIG+7)+1)
static int      digits8 = P_MAXDIG;

Is it ok to remove #define P_MAXDIG DBL_DIG,
change P_MAXLEN to 2*(DBL_DIG+7)+1) and
remove the line 'static int      digits8 = P_MAXDIG;' ?

Would then change the two geo output functions and replace digits8 by 
DBL_DIG in the #ifdef GEODEBUG / #enfif output stuff.

>>There a bunch of other places where output is produced. They are all 
>>within #ifdef GEODEBUG / #enfif blocks. Should these be corrected the 
>>same way ?



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Float output formatting options
Next
From: Tom Lane
Date:
Subject: Re: v7.3Beta4 Tag'd and Packaged ...