rrwoods wrote:I've just had Excel's 15ish-digit precision bite me on a spreadsheet I'm using to analyze a card game. Does anyone know of a free arbitrary-precision spreadsheet application or plugin?
The sheet has around 2650 rows, and is working with integers around 70 digits long in each of those rows. Calculation speed is not an issue, within reason (i.e., taking a few minutes to update the sheet after changing a cell is acceptable, taking a few hours is not).
I poked at open office, and it too is built for speed.
The only advice I found was "store your numbers as strings, and use custom-written functions to do mathematics on strings" when I googled at it.
If I had to solve this problem, I'd find a bignum library for a random language, then build a dependency-graph on-disk system (on-disk, so it persists between executations) for named variables and formulas. Maybe use make to do the calculations, where the dependency of a formula is its inputs. Add in the ability to have n-dimensional arrays of variables (not just the 2-dimensions of a spreadsheet), and positional relative formulas. Ie, write a "programmers spreadsheet".
Then add in an undo stack (ie, snapshot-deltas), and an output formatter of some sort, and go to town.
Naturally doing this would take far longer than solving the actual problem. And I probably wouldn't finish.