Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EEC9CD6B8 for ; Sat, 4 Aug 2012 23:34:01 +0000 (UTC) Received: (qmail 26883 invoked by uid 500); 4 Aug 2012 23:34:01 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 26801 invoked by uid 500); 4 Aug 2012 23:34:01 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 26793 invoked by uid 99); 4 Aug 2012 23:34:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Aug 2012 23:34:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.74.71.26] (HELO hel.is.scarlet.be) (193.74.71.26) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Aug 2012 23:33:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1344123213; bh=XY/5D8zkG6NykbWFe3lVg4pRsz90EXj9ADH7qOIlQmU=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=u/EKysTOkA+S6I4iMT4Mrlrh1fFxRvhhoZzJQr1X+W9wWrcINkUjDTGU9F62e74Op fbPmJMgGv5mBpBKMzJ9KSi5n1oRJz4rqfI1PGuNEeQDarGiRUCpaVypf6+g/kQEip9 qCjP6QG6roG+agH1a4oLSPcgbk9yCga8a3MAIaCM= Received: from mail.harfang.homelinux.org (ip-62-235-219-247.dsl.scarlet.be [62.235.219.247]) by hel.is.scarlet.be (8.14.5/8.14.5) with ESMTP id q74NXWak023290 for ; Sun, 5 Aug 2012 01:33:33 +0200 X-Scarlet: d=1344123213 c=62.235.219.247 Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 69B6D618C4 for ; Sun, 5 Aug 2012 01:33:32 +0200 (CEST) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id wzcYP6araEmI for ; Sun, 5 Aug 2012 01:33:30 +0200 (CEST) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 5272061831 for ; Sun, 5 Aug 2012 01:33:30 +0200 (CEST) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.77) (envelope-from ) id 1Sxnqc-0004es-4H for dev@commons.apache.org; Sun, 05 Aug 2012 01:33:30 +0200 Date: Sun, 5 Aug 2012 01:33:29 +0200 From: Gilles Sadowski To: dev@commons.apache.org Subject: [Math] MATH-740 (FastMath's slow methods) Message-ID: <20120804233329.GB25337@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.21 (2010-09-15) X-DCC-scarlet.be-Metrics: hel 20002; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: clamav-milter 0.97.1-exp at hel X-Virus-Status: Clean Hi. I notice this code at the top of "FastMath.log1p": ---CUT--- if (x == -1) { return x/0.0; // -Infinity } if (x > 0 && 1/x == 0) { // x = Infinity return x; } ---CUT--- which I'm tempted to rewrite as: ---CUT--- if (x == -1) { return Double.NEGATIVE_INFINITY; } if (x == Double.POSITIVE_INFINITY) { return Double.POSITIVE_INFINITY; } ---CUT--- Any objection? Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org