number_of_partitions returns wrong results under the Windows Subsystem for Linux

115 views
Skip to first unread message

Sebastian Oehms

unread,
Apr 20, 2020, 3:23:52 AM4/20/20
to sage-devel
The existenz of the problem already appeared in Friedrich Wiemer's status report on Sage under Windows 10 using the Windows Subsystem for Linux (WSL).

Now, that I have my office equipment (including a Windows 10 machine) at home, I took the occasion to install und play with WSL (using the Ubuntu App). I build Sage version 9.1.rc0 and run all doctests (like Friedrich did). The list of failing doctests (see the attached file) is not far from the corresponding list in Friedrich's log-file. Some issues disappeared while others remained and new ones have been added. But, the first issue in both lists is remarkable:

On WSL:

sage: number_of_partitions(241, algorithm='bober')
114540884553039
sage
: number_of_partitions(241)
114540884553038

whereas on proper Ubuntu (same Sage version) or Cygwin on the same machine (but stable 9.0):

sage: number_of_partitions(241, algorithm='bober')
114540884553038
sage
: number_of_partitions(241)
114540884553038

I think, that is an issue which can damage trust even thought it probably is not caused by Sage. Shouldn't we trace that back? To me it looks like a rounding problem via MPFR.

wsl_all_tests9.1.rc0.log

Sebastian Oehms

unread,
Apr 25, 2020, 4:03:30 PM4/25/20
to sage-devel
see also #28549.

Travis Scrimshaw

unread,
Apr 26, 2020, 11:04:28 PM4/26/20
to sage-devel
I also suspect it comes from some kind of rounding or precision issue, likely in MPFR since nearly all of the computations are done there. At least this is not super pressing since the Bober implementation is not the default implementation, but it is definitely something that should be fixed.

Best,
Travis

Sebastian Oehms

unread,
Apr 27, 2020, 2:36:02 AM4/27/20
to sage-devel
I've opened ticket #29600.

Best,
Sebastian
Reply all
Reply to author
Forward
0 new messages