From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 097AAC433B4 for ; Wed, 12 May 2021 23:21:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4B1B613D3 for ; Wed, 12 May 2021 23:21:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235013AbhELXWj convert rfc822-to-8bit (ORCPT ); Wed, 12 May 2021 19:22:39 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58388 "EHLO zimbra.cs.ucla.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237188AbhELWkg (ORCPT ); Wed, 12 May 2021 18:40:36 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 70AA11600EB; Wed, 12 May 2021 15:39:25 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id O8HXpF1ogtcs; Wed, 12 May 2021 15:39:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C42D6160102; Wed, 12 May 2021 15:39:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id HcM1tCIVmqc6; Wed, 12 May 2021 15:39:24 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9B79D1600EB; Wed, 12 May 2021 15:39:24 -0700 (PDT) To: "Alejandro Colomar (man-pages)" , mtk.manpages@gmail.com Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org References: <20210512204311.19399-1-alx.manpages@gmail.com> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: [PATCH] MAX.3, MIN.3: New page (and link page) to document MAX() and MIN() Message-ID: <688adf87-e108-b4dd-66dd-ae9c4d7afdf8@cs.ucla.edu> Date: Wed, 12 May 2021 15:39:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org On 5/12/21 3:32 PM, Alejandro Colomar (man-pages) wrote: > In which case they might not be evaluated at all? I'm curious. > Maybe if one of the arguments is literal NAN and the implementation > raises an exception for it? Or, one argument of MIN might be negative and the other might be unsigned short. In that case, the unsigned short argument need not be evaluated at all. Admittedly not something we'd be likely to optimize for, but the documentation shouldn't preclude such optimization.