argument is a float. Eliminate a cast rendered superfluous as a result.
ok kettenis@, millert@
-/* $OpenBSD: s_casinf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_casinf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
static cmplxf sum;
*/
- x = creal(z);
- y = cimag(z);
+ x = crealf(z);
+ y = cimagf(z);
if(y == 0.0f) {
if(fabsf(x) > 1.0f) {
/* cmul( &ca, &ca, &zz ) */
/*x * x - y * y */
zz = (x - y) * (x + y) + (2.0f * x * y) * I;
- zz = 1.0f - creal(zz) - cimag(zz) * I;
+ zz = 1.0f - crealf(zz) - cimagf(zz) * I;
z2 = csqrtf (zz);
zz = ct + z2;
-/* $OpenBSD: s_catanf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_catanf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float a, t, x, x2, y;
- x = creal (z);
- y = cimag (z);
+ x = crealf(z);
+ y = cimagf(z);
if((x == 0.0f) && (y > 1.0f))
goto ovrf;
-/* $OpenBSD: s_ccosf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_ccosf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float ch, sh;
- _cchshf( cimag(z), &ch, &sh );
- w = cosf( creal(z) ) * ch + ( -sinf( creal(z) ) * sh) * I;
+ _cchshf( cimagf(z), &ch, &sh );
+ w = cosf( crealf(z) ) * ch + ( -sinf( crealf(z) ) * sh) * I;
return (w);
}
-/* $OpenBSD: s_ccoshf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_ccoshf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float x, y;
- x = creal(z);
- y = cimag(z);
+ x = crealf(z);
+ y = cimagf(z);
w = coshf (x) * cosf (y) + (sinhf (x) * sinf (y)) * I;
return (w);
}
-/* $OpenBSD: s_cexpf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_cexpf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float r;
- r = expf( creal(z) );
- w = r * cosf( cimag(z) ) + r * sinf( cimag(z) ) * I;
+ r = expf( crealf(z) );
+ w = r * cosf( cimagf(z) ) + r * sinf( cimagf(z) ) * I;
return (w);
}
-/* $OpenBSD: s_clogf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_clogf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float p, rr, x, y;
- x = creal(z);
- y = cimag(z);
+ x = crealf(z);
+ y = cimagf(z);
rr = atan2f(y, x);
p = cabsf(z);
p = logf(p);
-/* $OpenBSD: s_cpowf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_cpowf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float x, y, r, theta, absa, arga;
- x = creal (z);
- y = cimag (z);
+ x = crealf(z);
+ y = cimagf(z);
absa = cabsf (a);
if (absa == 0.0f) {
return (0.0f + 0.0f * I);
-/* $OpenBSD: s_csinf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_csinf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float ch, sh;
- cchshf((float) cimag(z), &ch, &sh);
- w = sinf(creal(z)) * ch + (cosf(creal(z)) * sh) * I;
+ cchshf(cimagf(z), &ch, &sh);
+ w = sinf(crealf(z)) * ch + (cosf(crealf(z)) * sh) * I;
return (w);
}
-/* $OpenBSD: s_csinhf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_csinhf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float x, y;
- x = creal(z);
- y = cimag(z);
+ x = crealf(z);
+ y = cimagf(z);
w = sinhf (x) * cosf (y) + (coshf (x) * sinf (y)) * I;
return (w);
}
-/* $OpenBSD: s_csqrtf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_csqrtf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float x, y, r, t, scale;
- x = creal(z);
- y = cimag(z);
+ x = crealf(z);
+ y = cimagf(z);
if(y == 0.0f) {
if (x < 0.0f) {
-/* $OpenBSD: s_ctanhf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */
+/* $OpenBSD: s_ctanhf.c,v 1.2 2010/07/18 18:42:26 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
*
float complex w;
float x, y, d;
- x = creal(z);
- y = cimag(z);
+ x = crealf(z);
+ y = cimagf(z);
d = coshf (2.0f * x) + cosf (2.0f * y);
w = sinhf (2.0f * x) / d + (sinf (2.0f * y) / d) * I;
return (w);