Opened 13 years ago

Last modified 8 years ago

#1346 new enhancement support for IEEE fp nan, inf

Reported by: hamish Owned by: grass-dev@…
Priority: minor Milestone: 6.4.6
Component: Vector Version: svn-trunk
Keywords: Cc:
CPU: All Platform: All


Issue migrated here from the old RT bug system # 2763, and trac #198.

Fri, Dec 3 2004 Hamish wrote:

I want to input "nan" into a double precision column, it complains "column foo defined as double has string values"

'nan' and 'inf' are valid IEEE float/double values;

scanf "%f" reads them, etc.

Radim replied:

Added to my TODO > 6.0


please try 'NULL' instead of 'nan'.

doesn't work. turns the column into string even if defined as double with columns=


nan, inf are valid float/double values and should be scanned as such from incoming raw float data. AFAIK sscanf does read it as a valid %f.


My current work around is:

sed -e 's/nang'

Jul 8 2006 Markus suggested: if(column= type is specified as double prec)

G_str_replace(incoming line, "nan", "");

but it would be good to also catch "inf", "NaN", and perhaps "NULL".


Change History (1)

comment:1 by neteler, 8 years ago

Note: See TracTickets for help on using tickets.