PR/44663: Corinna Vinschen: Fix misplaced parenthesis that produces the wrong
result.
This commit is contained in:
parent
67365afb80
commit
cf7b1c6bb2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cproj.c,v 1.3 2010/09/20 17:51:38 christos Exp $ */
|
||||
/* $NetBSD: cproj.c,v 1.4 2011/03/02 13:24:43 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
@ -26,7 +26,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: cproj.c,v 1.3 2010/09/20 17:51:38 christos Exp $");
|
||||
__RCSID("$NetBSD: cproj.c,v 1.4 2011/03/02 13:24:43 christos Exp $");
|
||||
|
||||
#include <complex.h>
|
||||
#include <math.h>
|
||||
@ -50,7 +50,7 @@ cproj(double complex z)
|
||||
{
|
||||
double_complex w = { .z = z };
|
||||
|
||||
if (isinf(creal(z) || isinf(cimag(z)))) {
|
||||
if (isinf(creal(z)) || isinf(cimag(z))) {
|
||||
#ifdef __INFINITY
|
||||
REAL_PART(w) = __INFINITY;
|
||||
#else
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cprojf.c,v 1.3 2010/09/20 17:51:38 christos Exp $ */
|
||||
/* $NetBSD: cprojf.c,v 1.4 2011/03/02 13:24:43 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
@ -26,7 +26,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: cprojf.c,v 1.3 2010/09/20 17:51:38 christos Exp $");
|
||||
__RCSID("$NetBSD: cprojf.c,v 1.4 2011/03/02 13:24:43 christos Exp $");
|
||||
|
||||
#include <complex.h>
|
||||
#include <math.h>
|
||||
@ -51,7 +51,7 @@ cprojf(float complex z)
|
||||
{
|
||||
float_complex w = { .z = z };
|
||||
|
||||
if (isinf(crealf(z) || isinf(cimagf(z)))) {
|
||||
if (isinf(crealf(z)) || isinf(cimagf(z))) {
|
||||
#ifdef __INFINITY
|
||||
REAL_PART(w) = __INFINITY;
|
||||
#else
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cprojl.c,v 1.4 2010/09/20 17:51:38 christos Exp $ */
|
||||
/* $NetBSD: cprojl.c,v 1.5 2011/03/02 13:24:43 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
@ -26,7 +26,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: cprojl.c,v 1.4 2010/09/20 17:51:38 christos Exp $");
|
||||
__RCSID("$NetBSD: cprojl.c,v 1.5 2011/03/02 13:24:43 christos Exp $");
|
||||
|
||||
#include <complex.h>
|
||||
#include <math.h>
|
||||
@ -50,7 +50,7 @@ cprojl(long double complex z)
|
||||
{
|
||||
long_double_complex w = { .z = z };
|
||||
|
||||
if (isinf(creall(z) || isinf(cimagl(z)))) {
|
||||
if (isinf(creall(z)) || isinf(cimagl(z))) {
|
||||
#ifdef __INFINITY
|
||||
REAL_PART(w) = __INFINITY;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user