diff options
| author | Tim Rogers <[email protected]> | 2019-09-03 12:00:47 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-09-03 12:00:47 -0400 |
| commit | beeea4ae9ca4da8362e2020b965d78e359b68ceb (patch) | |
| tree | 609220dbb901dc83ab5172205c06580fb035d56b /src/cuda-sim/half.h | |
| parent | 6f2be094e18a705b320889c7e196609dcccef884 (diff) | |
| parent | ddab5e0282e6004c6674338f2b35b86c627219e1 (diff) | |
Merge pull request #29 from rgreen/fix_warnings
Fix warnings
Diffstat (limited to 'src/cuda-sim/half.h')
| -rw-r--r-- | src/cuda-sim/half.h | 6 |
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);
|
