[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cell2csv (io package): Higher precision of floating point numbers?
From: |
Philip Nienhuis |
Subject: |
Re: cell2csv (io package): Higher precision of floating point numbers? |
Date: |
Tue, 23 Aug 2016 14:39:54 -0700 (PDT) |
Martin Kunz wrote
> Hi,
>
> Is there a way to increase the precision of the floating point numbers
> that are written by cell2csv? It seems to be 6 significant digits at the
> moment which is probably fine in most cases. However, I would like to
> write geographic coordinates in decimal degrees and cannot achieve the
> desired sub-metre resolution with "only" six digits.
In the io package's src subdir there's csv2cell.cc.
>From what I understand, in line 291:
double val = strtod (word_str, &err);
you can experiment with invoking strtold rather than strtod.Maybe it should
look like:
long double val = strtold (word_str, &err);
(my C++ knowledge is quite lacking)
Then, just run :
clear -f ## (hopefully csv2cell gets unloaded from Octave's
symbol table)
mkoctfile csv2cell.cc
and cross your fingers.
Please report back,
Philip
--
View this message in context:
http://octave.1599824.n4.nabble.com/cell2csv-io-package-Higher-precision-of-floating-point-numbers-tp4679437p4679442.html
Sent from the Octave - General mailing list archive at Nabble.com.
- cell2csv (io package): Higher precision of floating point numbers?, Martin Kunz, 2016/08/23
- Re: cell2csv (io package): Higher precision of floating point numbers?,
Philip Nienhuis <=
- Re: cell2csv (io package): Higher precision of floating point numbers?, Martin Kunz, 2016/08/24
- Re: cell2csv (io package): Higher precision of floating point numbers?, PhilipNienhuis, 2016/08/24
- Re: cell2csv (io package): Higher precision of floating point numbers?, Martin Kunz, 2016/08/24
- Re: cell2csv (io package): Higher precision of floating point numbers?, Ozzy Lash, 2016/08/24
- Re: cell2csv (io package): Higher precision of floating point numbers?, Martin Kunz, 2016/08/24
- Re: cell2csv (io package): Higher precision of floating point numbers?, PhilipNienhuis, 2016/08/30
- Re: cell2csv (io package): Higher precision of floating point numbers?, Martin Kunz, 2016/08/30
- Re: cell2csv (io package): Higher precision of floating point numbers?, PhilipNienhuis, 2016/08/31