File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -409,6 +409,23 @@ func test_FloatingPointPrinting() {
409
409
printedIs ( asFloat80 ( 0.0000000000000000125 ) , " 1.25e-17 " )
410
410
#endif
411
411
412
+ debugPrintedIs ( asFloat32 ( 1.1 ) , " 1.10000002 " )
413
+ debugPrintedIs ( asFloat32 ( 125000000000000000.0 ) , " 1.24999998e+17 " )
414
+ debugPrintedIs ( asFloat32 ( 1.25 ) , " 1.25 " )
415
+ debugPrintedIs ( asFloat32 ( 0.0000125 ) , " 1.24999997e-05 " )
416
+
417
+ debugPrintedIs ( asFloat64 ( 1.1 ) , " 1.1000000000000001 " )
418
+ debugPrintedIs ( asFloat64 ( 125000000000000000.0 ) , " 1.25e+17 " )
419
+ debugPrintedIs ( asFloat64 ( 1.25 ) , " 1.25 " )
420
+ debugPrintedIs ( asFloat64 ( 0.0000125 ) , " 1.2500000000000001e-05 " )
421
+
422
+ #if arch(i386) || arch(x86_64)
423
+ debugPrintedIs ( asFloat80 ( 1.1 ) , " 1.10000000000000000002 " )
424
+ debugPrintedIs ( asFloat80 ( 125000000000000000.0 ) , " 125000000000000000.0 " )
425
+ debugPrintedIs ( asFloat80 ( 1.25 ) , " 1.25 " )
426
+ debugPrintedIs ( asFloat80 ( 0.0000125 ) , " 1.25000000000000000001e-05 " )
427
+ #endif
428
+
412
429
print ( " test_FloatingPointPrinting done " )
413
430
}
414
431
test_FloatingPointPrinting ( )
You can’t perform that action at this time.
0 commit comments