I'd like to do some simple computation in my table and it looks like I'm seeing some round-off errors.
Does anybody know the precision that pgfplotstable uses internally? Is there any work around besides that following really ugly hack, that I actually don't know, why it's working at all?
Here's my concrete MWE:
\documentclass{article}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstableread[col sep = comma]{
a, b,
640000, 3200,
1920000, 3200,
3200000, 3200,
6400000, 3200,
12800000, 3200,
} \data
\begin{table}
\pgfplotstableset{create on use/c/.style={create col/expr={2*\thisrow{a}+5*\thisrow{b}}}}
\pgfplotstableset{create on use/d/.style={create col/expr={(2*(\thisrow{a}*256)+5*(\thisrow{b}*256))/256}}}
\pgfplotstabletypeset[columns={a,b,c,d},
columns/a/.style={column name={a}, fixed, precision=0, column type={r|}, },
columns/b/.style={column name={b}, fixed, precision=0, column type={r|}, },
columns/c/.style={column name={formular}, fixed, precision=0, column type={r|}, },
columns/d/.style={column name={Hack}, fixed, precision=0, column type={r|}, },
]{\data}
\end{table}
\end{document}
Thanks a lot, Juhui

