go-lang.c (go_langhook_init): Set MPFR precision to 256.
authorIan Lance Taylor <iant@google.com>
Mon, 23 Apr 2012 21:39:12 +0000 (21:39 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 23 Apr 2012 21:39:12 +0000 (21:39 +0000)
* go-lang.c (go_langhook_init): Set MPFR precision to 256.

time: Adjust float expression so that it first integer context.

From-SVN: r186727

gcc/go/ChangeLog
gcc/go/go-lang.c
libgo/go/time/time_test.go

index efbb8b11ac486a87ad7d530b2e611eb6835fd35c..652a36d638367d303036e5c8d59886c2aa2cd25b 100644 (file)
@@ -1,3 +1,7 @@
+2012-04-23  Ian Lance Taylor  <iant@google.com>
+
+       * go-lang.c (go_langhook_init): Set MPFR precision to 256.
+
 2012-04-20  Ian Lance Taylor  <iant@google.com>
 
        * lang.opt: Add -fgo-check-divide-zero and
index 1d4c18bac46b63fab4e419e81964a8f4dbc9a1ad..895e39d12e31269f6bcf2f5a427715a95d2d74c5 100644 (file)
@@ -103,7 +103,7 @@ go_langhook_init (void)
   /* The default precision for floating point numbers.  This is used
      for floating point constants with abstract type.  This may
      eventually be controllable by a command line option.  */
-  mpfr_set_default_prec (128);
+  mpfr_set_default_prec (256);
 
   /* Go uses exceptions.  */
   using_eh_for_cleanups ();
index 3430526b8bff2d6e3b43c3ee424078dee655fd56..e1a75e46d8ec15de7fdf7630fa04441777847674 100644 (file)
@@ -804,7 +804,7 @@ var jsonTests = []struct {
        time Time
        json string
 }{
-       {Date(9999, 4, 12, 23, 20, 50, .52*1e9, UTC), `"9999-04-12T23:20:50.52Z"`},
+       {Date(9999, 4, 12, 23, 20, 50, 520*1e6, UTC), `"9999-04-12T23:20:50.52Z"`},
        {Date(1996, 12, 19, 16, 39, 57, 0, Local), `"1996-12-19T16:39:57-08:00"`},
        {Date(0, 1, 1, 0, 0, 0, 1, FixedZone("", 1*60)), `"0000-01-01T00:00:00.000000001+00:01"`},
 }