Vincent Lefevre on Thu, 28 Nov 2013 19:26:09 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [MPFR] Interfacing gmp and mpfr/mpc

On 2013-11-28 17:42:24 +0100, Andreas Enge wrote:
> With the same participants, we found a bug in the macro version of
> mpfr_custom_init_set, which is corrected in the attached patch; the bug
> seems to turn all negative numbers into -0.

Actually it depends on the form of the second argument.

I've fixed the bug in the trunk and in the 3.1 branch.
I'll publish the patch on the MPFR 3.1.2 page tomorrow.

> As a temporary work-around, one may replace in code "mpfr_custom_init_set" by
> "(mpfr_custom_init_set)", which forces to call the function with the same name
> instead of the macro.

If the second argument doesn't have side effects, putting parentheses
around it should work too.

Vincent Lefèvre <> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)