From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ATCSQR.andestech.com (exmail.andestech.com [60.248.187.195]) by sourceware.org (Postfix) with ESMTPS id 9289A386101B for ; Thu, 3 Sep 2020 12:37:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9289A386101B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ruinland@andestech.com Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id 083CPEx1080572 for ; Thu, 3 Sep 2020 20:25:14 +0800 (GMT-8) (envelope-from ruinland@andestech.com) Received: from APC301.andestech.com (10.0.12.128) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Thu, 3 Sep 2020 20:37:15 +0800 Date: Thu, 3 Sep 2020 20:34:42 +0800 From: Ruinland ChuanTzu Tsai To: CC: Subject: In libm, sin(qNaN) doesn't expect FE_INVALID ? Message-ID: <20200903123442.GA5266@APC301.andestech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [10.0.12.128] X-DNSRBL: X-MAIL: ATCSQR.andestech.com 083CPEx1080572 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2020 12:37:29 -0000 Hi all, sorry for the bothering. Recently, as I'm testing some modification on libm, I happen to realize the fact that glibc's testsutie doesn't expect sin(+-qNaN) to trigger FE_INVALID, which is designed in `math/libm-test-sin.inc` : TEST_f_f (sin, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED) TEST_f_f (sin, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED) Yet I think that if the program issued sin(qNaN), it should be okay to be given an invalid operation excpetion. If that's the case, then appending `INVALID_EXCEPTION_OK` to the expected exception list of sin(qNaN) and sin(-qNaN) should be benign. Though I'm neither an expert on libm nor IEEE standards, I'm wondering will there be any concern of such behavior ( raising FE_INVALID on sin(+-qNaN) ) ? Sincerely, Ruinland