From patchwork Thu May 26 20:55:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 626873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rG1dr6nmBz9t5X for ; Fri, 27 May 2016 06:56:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=gzuhJdPb; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=ZdtdDTMQqp8z2o5n8PMSuWjU61eW5 vo9DUZGm/O8VZdqzZ3tGnYS1YyNOmcZQ7Tl37Ihe5nX1zFFAVTO2IDe+xEe0XeYC xYw8uvGf2KyZnc/YKbkCgkre+RCusnivHmUPWZdEP+aaB2T8wnyp+PLzwEGd8XaL MI4hn9t1o6qry4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=XFHn8HStZv19CFF7XGYHI3ZGgbg=; b=gzu hJdPbuPUTyELzvm53mn4juxI3h7YvHQohlJOvBVBUO2kP94n8VeSj/tLZsgZgLmM f+W5xHYCVKhYizYR0oKo/0UgbPWwQM+TUlUZrCnv3MXCRumaYjq/OIhuluCXhrwp UQYyBw5nNVsEeDk06w6jLRGgOeN2WI6dlYUoGH3U= Received: (qmail 106676 invoked by alias); 26 May 2016 20:56:10 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 106666 invoked by uid 89); 26 May 2016 20:56:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1509, H*MI:6600, UD:c208916..ddc8214, 690, 7 X-HELO: relay1.mentorg.com Date: Thu, 26 May 2016 20:55:55 +0000 From: Joseph Myers To: Subject: Fix ldbl-128 j0l, j1l, y0l, y1l for sNaN argument (bug 20151) [committed] Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 The ldbl-128 implementations of j0l, j1l, y0l, y1l (also used for ldbl-128ibm) return an sNaN argument unchanged. This patch fixes them to add a NaN argument to itself to quiet it before return. Tested for mips64. Committed. 2016-05-26 Joseph Myers [BZ #20151] * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_j0l): Add NaN argument to itself before returning result. (__ieee754_y0l): Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): Likewise. (__ieee754_y1l). diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c index c208916..ddc8214 100644 --- a/sysdeps/ieee754/ldbl-128/e_j0l.c +++ b/sysdeps/ieee754/ldbl-128/e_j0l.c @@ -683,7 +683,7 @@ __ieee754_j0l (long double x) if (! isfinite (x)) { if (x != x) - return x; + return x + x; else return 0.0L; } @@ -831,7 +831,7 @@ long double if (! isfinite (x)) { if (x != x) - return x; + return x + x; else return 0.0L; } diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c index f5b04c0..3265204 100644 --- a/sysdeps/ieee754/ldbl-128/e_j1l.c +++ b/sysdeps/ieee754/ldbl-128/e_j1l.c @@ -690,7 +690,7 @@ __ieee754_j1l (long double x) if (! isfinite (x)) { if (x != x) - return x; + return x + x; else return 0.0L; } @@ -849,7 +849,7 @@ __ieee754_y1l (long double x) if (! isfinite (x)) { if (x != x) - return x; + return x + x; else return 0.0L; }