diff options
author | John Hauser <jhauser@eecs.berkeley.edu> | 2016-07-22 18:03:04 -0700 |
---|---|---|
committer | John Hauser <jhauser@eecs.berkeley.edu> | 2016-07-22 18:03:04 -0700 |
commit | cb5087cd7403acf31ac24ac4be8e019a51904895 (patch) | |
tree | 3eeb55d6ad63e33dc8e3be33614e94bbe8a8cac5 /source/extF80_sqrt.c | |
parent | 45fdcf1c6583e4af380b147ac568f5aa721b7ba8 (diff) | |
download | berkeley-softfloat-3-cb5087cd7403acf31ac24ac4be8e019a51904895.zip berkeley-softfloat-3-cb5087cd7403acf31ac24ac4be8e019a51904895.tar.gz berkeley-softfloat-3-cb5087cd7403acf31ac24ac4be8e019a51904895.tar.bz2 |
Release 3b. See "doc/SoftFloat-history.html".
Diffstat (limited to 'source/extF80_sqrt.c')
-rw-r--r-- | source/extF80_sqrt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/extF80_sqrt.c b/source/extF80_sqrt.c index 9f16d66..901c86f 100644 --- a/source/extF80_sqrt.c +++ b/source/extF80_sqrt.c @@ -2,9 +2,9 @@ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3a, by John R. Hauser. +Package, Release 3b, by John R. Hauser. -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -115,7 +115,7 @@ extFloat80_t extF80_sqrt( extFloat80_t a ) rem.v64 -= (uint_fast64_t) sig32Z * sig32Z; /*------------------------------------------------------------------------ *------------------------------------------------------------------------*/ - q = ((uint_fast64_t) (uint32_t) (rem.v64>>2) * recipSqrt32)>>32; + q = ((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32; sigZ = ((uint_fast64_t) sig32Z<<32) + (q<<3); x64 = ((uint_fast64_t) sig32Z<<32) + sigZ; term = softfloat_mul64ByShifted32To128( x64, q ); @@ -123,7 +123,7 @@ extFloat80_t extF80_sqrt( extFloat80_t a ) rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); /*------------------------------------------------------------------------ *------------------------------------------------------------------------*/ - q = (((uint_fast64_t) (uint32_t) (rem.v64>>2) * recipSqrt32)>>32) + 2; + q = (((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32) + 2; x64 = sigZ; sigZ = (sigZ<<1) + (q>>25); sigZExtra = (uint64_t) (q<<39); @@ -133,7 +133,7 @@ extFloat80_t extF80_sqrt( extFloat80_t a ) q &= ~(uint_fast64_t) 0xFFFF; sigZExtra = (uint64_t) (q<<39); term = softfloat_mul64ByShifted32To128( x64 + (q>>27), q ); - x64 = (uint_fast64_t) (uint32_t) (q<<5) * (uint32_t) q; + x64 = (uint32_t) (q<<5) * (uint_fast64_t) (uint32_t) q; term = softfloat_add128( term.v64, term.v0, 0, x64 ); rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 28 ); rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); |