GNOME Bugzilla – Bug 794515
Rounding issue on WSL
Last modified: 2018-03-23 15:17:48 UTC
Created attachment 369901 [details] The .gnumeric file to reproduce the problem There is an issue with rounding when using gnumeric on ubuntu 16.04 on WSL (Windows 10). I attach gnumeric file, look at the Y-axes of the graph. I tested on a pure debian 9 and the issue does not show up, so apparently this is WSL-only. I am wondering if WSL is a platform the gnumeric developers want to support.
What am I looking for?
Created attachment 369905 [details] .png screenshot to illustrate the problem This is how the graph looks like on my ubuntu on WSL.
Yes, that's not pretty. I have a vague memory of having fixed something like that at some point. What versions of Gnumeric and Goffice are in play?
This is goffice 0.10.28 and gnumeric 1.12.28. Again, this is a WSL-only bug.
Created attachment 369909 [details] .png screenshot to illustrate the problem There is another issue. If I try to modify the format of the ticks labels to have only two decimals, I get the following. Note how it jumps from 0 to 0.02 and then 0.03.
So I checked with a git version, and the problem is still there.
I can't reproduce, quite weird.
Hi Jean, are you on WSL as well?
Debian sid, no Windows of any kind around.
FYI, I opened an issue on WSL: https://github.com/Microsoft/WSL/issues/830
Sorry, this is the right link to the issue reported against WSL: https://github.com/Microsoft/WSL/issues/3044 In issue 830, they propose to use: _FPU_SETCW() as a workaround and to recompile. Do you know where to put this code? Thanks.
Ugh. "Where" is easy: very early in main() in src/main-application.c The question is whether parts of the C library depends on the old setting. You can try, I guess. Some info: we use a printf derived from musl. 830 has comments from the musl people that it requires the long-double floating point semantics.
So I tried the FPU_SETCW fix and the issue with rounding is gone. I will keep you informed if I see other issues appearing. Thanks.
I added code for checking and fixing this. This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.
Thanks.