From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6373 invoked from network); 5 Jul 2022 16:29:52 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 5 Jul 2022 16:29:52 -0000 Received: (qmail 19516 invoked by uid 550); 5 Jul 2022 16:29:50 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 9754 invoked from network); 5 Jul 2022 16:14:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=87jJJCQzIozSgRnLCZnAodJFBu5k7QKXpqneHXWyeOc=; b=atkVaqs4+R2tgqjHmwJ4K9pzFvihuopGMIDdyb3t8GoHqJUcrYmXI5W4cYwKsgpysf a1EA7yIRgdg6lr8KL9L414DVB2M+25ii8yFqzGSEHNhMi6ypICk8e6es7IAapEBxsDnD 5Ygg5Xin4t2sJvQmplWm+MmPjNTC9jvwXEcrta1WhCM43a5mP9t865sbmFQv+DbxyiLF DjOFPfxRL8Lu3ant9+JeLexVeiZT2DyOLLbWcBYlcAsiY3ju3cnjZsdf/OqOTERDr/O8 b0ykccY9W1WidBZ5s4ysxWgvZizGMat0McY1/Na5Qzs4Z/tcCKHnRuMu4ZExNjdAMM9m UCyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=87jJJCQzIozSgRnLCZnAodJFBu5k7QKXpqneHXWyeOc=; b=UTgABOxVIFSwEH7IqTy/YxNezxqipZCzH7Q0mU6VYekBjhE4YwLJvJnk3uY0DzejsI WfOea4X5f3IS9hs0DeaNk9FvqBg6BM5+NhTsEMJWkEaMC9qLuUNcuSQ0zGVe2AzdwBhY 7m4YUIZDmNMsidlCOSVGFRtt10CwgZFFusUo2bWkjgauJri01TqLZ6hRKmF6DgaIO/UB oMhNDo7LJ2hcMGmIiKpV800jUxCZWlEadSVVat4m/IWae6DjkuqUVMc/isT8WYpFbJYe XWvanwz1WxrgR4BV5VCDI3ZFzSGMt5A5s5QljDi/ADE5AD77MNsEggeU2jcb1nANj0jN RsXQ== X-Gm-Message-State: AJIora/uTRZ2ZHS3JXVCLpSoHcwhCdERwnK4+jYbwDwWGkMScr06kcO8 3A1x44kug8tvyHoPQpPEAbewYL1v5u1dvW8dUz4= X-Google-Smtp-Source: AGRyM1uEqckU9+2erh/6G8kLUB6o9KDg5bCHSbn1/rQCfIC2NP5lXhFNVlmwHg+OUbMI8AB8mOYzjt0vCnxNWSgLyFA= X-Received: by 2002:a05:6a00:2306:b0:528:3d9f:80e7 with SMTP id h6-20020a056a00230600b005283d9f80e7mr22013901pfh.77.1657037665237; Tue, 05 Jul 2022 09:14:25 -0700 (PDT) MIME-Version: 1.0 References: <20220705093704.GY1320090@port70.net> <20220705153515.GA2522@voyager> In-Reply-To: <20220705153515.GA2522@voyager> From: Nikolaos Chatzikonstantinou Date: Tue, 5 Jul 2022 16:14:13 +0000 Message-ID: To: Markus Wichmann Cc: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] Re: Implementing csqrtl() On Tue, Jul 5, 2022 at 3:35 PM Markus Wichmann wrote: > > On Tue, Jul 05, 2022 at 02:28:32PM +0000, Nikolaos Chatzikonstantinou wrote: > > On Tue, Jul 5, 2022 at 9:37 AM Szabolcs Nagy wrote: > > > > > > * Nikolaos Chatzikonstantinou [2022-07-04 11:09:44 +0000]: > > > > > > > + if ((isinf(x) || isinf(y)) && (isnan(r) || isinf(r))) { > > > > > > why do you need the && ? > > > can r be other than inf or nan? > > > > It's the case that x^2 + y^2 is inf for x,y finite. > > > > Yeah, but if x or y is infinite then so is r. So the entire part in > front of the && is redundant, because it is contained in the second > part. > > Unless I completely misunderstood how IEEE infinity works... Yes you are right, it should be if(isinf(x) || isinf(y)). Regards, Nikolaos Chatzikonstantinou