aboutsummaryrefslogtreecommitdiff
path: root/source/extF80_roundToInt.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/extF80_roundToInt.c')
-rw-r--r--source/extF80_roundToInt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/extF80_roundToInt.c b/source/extF80_roundToInt.c
index 8bc1561..4959e7c 100644
--- a/source/extF80_roundToInt.c
+++ b/source/extF80_roundToInt.c
@@ -2,10 +2,10 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3b, by John R. Hauser.
+Package, Release 3c, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -125,10 +125,10 @@ extFloat80_t
} else if ( roundingMode == softfloat_round_near_even ) {
sigZ += lastBitMask>>1;
if ( ! (sigZ & roundBitsMask) ) sigZ &= ~lastBitMask;
- } else if ( roundingMode != softfloat_round_minMag ) {
- if ( (signUI64 != 0) ^ (roundingMode == softfloat_round_max) ) {
- sigZ += roundBitsMask;
- }
+ } else if (
+ roundingMode == (signUI64 ? softfloat_round_min : softfloat_round_max)
+ ) {
+ sigZ += roundBitsMask;
}
sigZ &= ~roundBitsMask;
if ( ! sigZ ) {