Re: [Mesa-dev] [PATCH] util: Fix fallback iround handling of integral inputs

2014-07-23 Thread Richard Sandiford
Roland Scheidegger writes: > Am 22.07.2014 12:26, schrieb Richard Sandiford: >> Roland Scheidegger writes: >>> Am 21.07.2014 17:53, schrieb Richard Sandiford: lp_build_iround has a fallback case that tries to emulate a round-to-nearest float->int conversion by adding 0.5 and using

Re: [Mesa-dev] [PATCH] util: Fix fallback iround handling of integral inputs

2014-07-22 Thread Roland Scheidegger
Am 22.07.2014 12:26, schrieb Richard Sandiford: > Roland Scheidegger writes: >> Am 21.07.2014 17:53, schrieb Richard Sandiford: >>> lp_build_iround has a fallback case that tries to emulate a round-to-nearest >>> float->int conversion by adding 0.5 and using a truncating fptosi. For odd >>> numbe

Re: [Mesa-dev] [PATCH] util: Fix fallback iround handling of integral inputs

2014-07-22 Thread Richard Sandiford
Roland Scheidegger writes: > Am 21.07.2014 17:53, schrieb Richard Sandiford: >> lp_build_iround has a fallback case that tries to emulate a round-to-nearest >> float->int conversion by adding 0.5 and using a truncating fptosi. For odd >> numbers in the range [2^23, 2^24], which are already integr

Re: [Mesa-dev] [PATCH] util: Fix fallback iround handling of integral inputs

2014-07-21 Thread Roland Scheidegger
Am 21.07.2014 17:53, schrieb Richard Sandiford: > lp_build_iround has a fallback case that tries to emulate a round-to-nearest > float->int conversion by adding 0.5 and using a truncating fptosi. For odd > numbers in the range [2^23, 2^24], which are already integral, this has > the effect of addi

[Mesa-dev] [PATCH] util: Fix fallback iround handling of integral inputs

2014-07-21 Thread Richard Sandiford
lp_build_iround has a fallback case that tries to emulate a round-to-nearest float->int conversion by adding 0.5 and using a truncating fptosi. For odd numbers in the range [2^23, 2^24], which are already integral, this has the effect of adding 1 to the integer, since the result of adding 0.5 is e