Ticket #12862 (closed defect: fixed)

Opened 13 months ago

Last modified 11 months ago

The partition function under FreeBSD

Reported by: stephen Owned by: pjeremy
Priority: major Milestone: sage-5.1
Component: porting: BSD Keywords: partition FreeBSD sd40.5
Cc: Work issues:
Report Upstream: N/A Reviewers: Mike Hansen
Authors: Stephen Montgomery-Smith Merged in: sage-5.1.beta5
Dependencies: Stopgaps:

Description

sage built on a FreeBSD 64 bit machine fails the test

sage -t  -force_lib "devel/sage/sage/combinat/partition.py"

After some googling, I get the impression that long double is at best flaky on FreeBSD.

I am going to suggest the following patch, although it is perhaps not necessary for the i386 version of FreeBSD.

--- sage-5.0.beta13/sage/combinat/partitions_c.cc-orig  2012-04-20 01:01:41.000000000 +0000
+++ sage-5.0.beta13/sage/combinat/partitions_c.cc       2012-04-20 01:02:47.000000000 +0000
@@ -152,7 +152,7 @@
 const unsigned int double_precision = DBL_MANT_DIG;                         // The assumed precision of a double.


-#if defined(__sparc) || defined(__CYGWIN__)
+#if defined(__sparc) || defined(__CYGWIN__) || defined(__FreeBSD__)
 // On sparc solaris long double is bad/broken/different, etc.  E.g.,
 // LDBL_MANT_DIG is 113 rather than 106, which causes all kinds of trouble.
 // So we only use double_precision.

Attachments

trac_12862.patch Download (816 bytes) - added by mhansen 12 months ago.

Change History

comment:1 Changed 13 months ago by mhansen

Seems like a reasonable change.

Changed 12 months ago by mhansen

comment:2 Changed 12 months ago by mhansen

  • Keywords sd40.5 added
  • Reviewers set to Mike Hansen
  • Status changed from new to needs_review
  • Authors set to Stephen Montgomery-Smith

comment:3 Changed 12 months ago by mhansen

  • Status changed from needs_review to positive_review

comment:4 Changed 11 months ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-5.1.beta5
Note: See TracTickets for help on using tickets.