This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] improve cexp performance for imaginary inputs


On Sat, 7 Mar 2015, Julian Taylor wrote:

> diff --git a/math/s_cexp.c b/math/s_cexp.c
> index 9116e2b..ddafe6f 100644
> --- a/math/s_cexp.c
> +++ b/math/s_cexp.c
> @@ -70,7 +70,9 @@ __cexp (__complex__ double x)
>  	    }
>  	  else
>  	    {
> -	      double exp_val = __ieee754_exp (__real__ x);
> +	      double exp_val = 1.;
> +	      if (__real__ x != 0.)
> +	          exp_val = __ieee754_exp (__real__ x);

The indentation seems to be off now the braces have been removed.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]