diff options
author | John Hauser <jhauser@eecs.berkeley.edu> | 2017-02-10 12:35:21 -0800 |
---|---|---|
committer | John Hauser <jhauser@eecs.berkeley.edu> | 2017-02-10 12:35:21 -0800 |
commit | 9d731d45e86ae28cf13b0094979577061e0e811c (patch) | |
tree | 0fb71733a01f5b8975ae1bf77b09a1c9edaac407 /source/f128M_roundToInt.c | |
parent | cb5087cd7403acf31ac24ac4be8e019a51904895 (diff) | |
download | berkeley-softfloat-3-9d731d45e86ae28cf13b0094979577061e0e811c.zip berkeley-softfloat-3-9d731d45e86ae28cf13b0094979577061e0e811c.tar.gz berkeley-softfloat-3-9d731d45e86ae28cf13b0094979577061e0e811c.tar.bz2 |
Release 3c. See "doc/SoftFloat-history.html".
Diffstat (limited to 'source/f128M_roundToInt.c')
-rw-r--r-- | source/f128M_roundToInt.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/f128M_roundToInt.c b/source/f128M_roundToInt.c index 8cdb8b1..de1a27a 100644 --- a/source/f128M_roundToInt.c +++ b/source/f128M_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: @@ -180,8 +180,9 @@ void wordZ = wordA; carry = 0; if ( - (roundingMode != softfloat_round_minMag) - && (signF128UI96( ui96 ) ^ (roundingMode == softfloat_round_max)) + roundingMode + == (signF128UI96( ui96 ) ? softfloat_round_min + : softfloat_round_max) ) { if ( extra || (wordA & extrasMask) ) { wordZ += bit; |