Numerical stability of cmap files
Posted: 2005-12-09, 17:49
Hi all,
as we now have the TechDemo.cmap file in the Subversion repository, this is a good time to revise the numerical stability of the cmap file format.
That means that when I load a cmap into CaWE and then save it again, I want to obtain exactly the same file (which is an ascii text file as you know) as before.
This is not a strictly necessary requirement, but still very useful. It helps to keep the repository size small, because Subversion always only saves the differences between a revision and the next. Also, as you all know, I'm a hell of a mean guy who sometimes even runs
svn diff -r someXY:head TechDemo.cmap
and examines the output. That means I look at the text contents of the file to see what has changed. This is great for debugging many things.
However, achieving this goal is pretty difficult, because high-precision output (many digits) and even the tiniest computations with the numbers between loading and saving them triggers e.g. a difference after e.g. the 10-th digit after the decimal.
And as I recently increased the precision of cmap files a lot, I was in severe trouble yesterday and today.
However, the problem is 90% solved, but I still keep the TechDemo.cmap file locked until I'm finished with the fixed code for overwriting it with a new version.
I've no time to finish this tonight (Friday), but will do so over the weekend.
Just wanted to let you know the latest status!
Have a nice WE!
as we now have the TechDemo.cmap file in the Subversion repository, this is a good time to revise the numerical stability of the cmap file format.
That means that when I load a cmap into CaWE and then save it again, I want to obtain exactly the same file (which is an ascii text file as you know) as before.
This is not a strictly necessary requirement, but still very useful. It helps to keep the repository size small, because Subversion always only saves the differences between a revision and the next. Also, as you all know, I'm a hell of a mean guy who sometimes even runs
svn diff -r someXY:head TechDemo.cmap
and examines the output. That means I look at the text contents of the file to see what has changed. This is great for debugging many things.
However, achieving this goal is pretty difficult, because high-precision output (many digits) and even the tiniest computations with the numbers between loading and saving them triggers e.g. a difference after e.g. the 10-th digit after the decimal.
And as I recently increased the precision of cmap files a lot, I was in severe trouble yesterday and today.
However, the problem is 90% solved, but I still keep the TechDemo.cmap file locked until I'm finished with the fixed code for overwriting it with a new version.
I've no time to finish this tonight (Friday), but will do so over the weekend.
Just wanted to let you know the latest status!
Have a nice WE!