File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -104,9 +104,11 @@ namespace sw {
104
104
for (dd from = start, to, delta;
105
105
(delta = (to = nextafter (from, +INFINITY)) - from) < 10.0 ;
106
106
from *= 10.0 ) {
107
+ dd u = ulp (from);
107
108
std::cout << " ulp(" << std::scientific << std::setprecision (0 ) << from
108
- << " ) gives " << to_binary (ulp (from)) << " : "
109
- << std::fixed << std::setprecision (6 ) << ulp (from) << ' \n ' ;
109
+ << " ) gives " << to_binary (u) << " : "
110
+ << /* std::fixed <<*/ std::setprecision (6 ) << u
111
+ << ' \n ' ;
110
112
}
111
113
}
112
114
}
@@ -361,13 +363,7 @@ try {
361
363
362
364
std::cout << " ---------- Unit in the Last Place --------+\n " ;
363
365
{
364
- dd a{ 1.0 };
365
-
366
366
ulp_progression (" \n ULP progression for dd:\n " , dd (10.0 ));
367
-
368
- using float_type = ::std::enable_if< ::std::is_floating_point<float >::value, float >::type;
369
- using double_type = ::std::enable_if< ::std::is_floating_point<double >::value, double >::type;
370
- // using bla = ::std::enable_if< ::std::is_floating_point<int>::value, int >::type
371
367
}
372
368
373
369
std::cout << " +--------- numeric_limits of double-double vs IEEE-754 --------+\n " ;
You can’t perform that action at this time.
0 commit comments