From cb5087cd7403acf31ac24ac4be8e019a51904895 Mon Sep 17 00:00:00 2001 From: John Hauser Date: Fri, 22 Jul 2016 18:03:04 -0700 Subject: Release 3b. See "doc/SoftFloat-history.html". --- source/extF80_sqrt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/extF80_sqrt.c') 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 ); -- cgit v1.1