summaryrefslogtreecommitdiff
path: root/src/cuda-sim/half.h
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-09-06 20:57:26 -0400
committerGitHub <[email protected]>2019-09-06 20:57:26 -0400
commitbffc964722e4e6275c6cf78484791528986ceecd (patch)
tree609220dbb901dc83ab5172205c06580fb035d56b /src/cuda-sim/half.h
parent07f7494e588301d898122837cb73b34380a2e041 (diff)
parentbeeea4ae9ca4da8362e2020b965d78e359b68ceb (diff)
Merge pull request #4 from purdue-aalp/dev
Merge aalp dev into Mengchi
Diffstat (limited to 'src/cuda-sim/half.h')
-rw-r--r--src/cuda-sim/half.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cuda-sim/half.h b/src/cuda-sim/half.h
index 8f1a8eb..9f74bb7 100644
--- a/src/cuda-sim/half.h
+++ b/src/cuda-sim/half.h
@@ -642,10 +642,10 @@ namespace half_float
if(exp > 16)
{
if(R == std::round_toward_infinity)
- return hbits | 0x7C00 - (hbits>>15);
+ return hbits | (0x7C00 - (hbits>>15));
else if(R == std::round_toward_neg_infinity)
- return hbits | 0x7BFF + (hbits>>15);
- return hbits | 0x7BFF + (R!=std::round_toward_zero);
+ return hbits | (0x7BFF + (hbits>>15));
+ return hbits | (0x7BFF + (R!=std::round_toward_zero));
}
if(exp < -13)
value = std::ldexp(value, 24);