From owner-freebsd-numerics@FreeBSD.ORG Thu Sep 18 23:15:53 2014 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6A4434E for ; Thu, 18 Sep 2014 23:15:53 +0000 (UTC) Received: from mail-yk0-x22c.google.com (mail-yk0-x22c.google.com [IPv6:2607:f8b0:4002:c07::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 730D1343 for ; Thu, 18 Sep 2014 23:15:53 +0000 (UTC) Received: by mail-yk0-f172.google.com with SMTP id q9so409869ykb.17 for ; Thu, 18 Sep 2014 16:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=+6mgek4ZFbJ+SUmbo7hMurl6YieMLoh3DRZBD9hoX6c=; b=govKzOkOcIKl6yc0QFT5Kskd6B4QFaFAX9tdQCYmZ/18lFWKmZGAoRZwHIRp42mWbw Jy9cF3CRsFfJGSV1wlFESBf2qNIJ0pURwmWWfzI+DQehm++0plgNGmIJ60wMHBPUPSvk 2pGU4xKNBIwyMb6ymHmy3ijmnGLNOWTPbDV45hSPaguEmWnGwkKsmyP79mVnf/5PFcZv DdBAbtQrVI8jCIRWKI3vEDC0/Cti2cmYZz0eaFMSa5Or+LRAQxmTHJNhPIj8Nc2C9euI e4N3+M7JN/3RPo/V1zFsPgDArag3LB7TwzieOaiC+wE1qUo8fbTZqNzJ+dE7t5hRE+uW 1ejA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=+6mgek4ZFbJ+SUmbo7hMurl6YieMLoh3DRZBD9hoX6c=; b=g+3rHKCWKvryAEoiUOWJIF5mshwU/4im7t/jzbg8+jp+oQ+CF639jRAEe0VmYo68QA Zdu/kv9j5pwWOzSlZB3cRbQCYnecy7HwhZSVqaiuhHCynKnwkBJDj6zmeqvtsXnvP3SJ udv45U+/LrBwSgV5mE9uoiYParNSmrrO3efzzrcYINitLmcrK48IeBQEw3oLpvv3vdUt daY/lumW/9VF1C3g2YqlbITaS5amRQj7Yn5hKkhWbDF1nlAUBUF8DrDsEZwRtoFZZQq3 FBME9ZUwfo1zRnvEQVd7bst1BZxr0mIr1Vf9RF9k7R50SaeDV/dBS58n1yCVDSMmXE7b yA6Q== X-Gm-Message-State: ALoCoQn6dbkABjxPMw1RFIZQfV0ZFMVUtoXRYLoftNEQSvrDozTcMYvOJuXbPYIhuNf7dtsMQd4R X-Received: by 10.236.63.68 with SMTP id z44mr8369415yhc.49.1411082152351; Thu, 18 Sep 2014 16:15:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.170.147.69 with HTTP; Thu, 18 Sep 2014 16:15:31 -0700 (PDT) In-Reply-To: <20140917190312.GA73699@troutmask.apl.washington.edu> References: <20140917190312.GA73699@troutmask.apl.washington.edu> From: enh Date: Thu, 18 Sep 2014 16:15:31 -0700 Message-ID: Subject: Re: lgamma_r and lgammaf_r return the wrong sign for -0.f To: Steve Kargl Content-Type: text/plain; charset=UTF-8 Cc: freebsd-numerics@freebsd.org X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 23:15:53 -0000 thanks. i've moved Android over to your current implementations (and the ld128 lgammal). On Wed, Sep 17, 2014 at 12:03 PM, Steve Kargl wrote: > On Fri, Sep 12, 2014 at 02:15:37PM -0700, enh via freebsd-numerics wrote: >> if I pass -0.f to lgammaf_r, the sign returned in *signgamp is 1. this >> is incorrect --- it should be -1. >> >> both lgamma_r and lgammaf_r are affected, but the other special cases >> in those functions look fine to me. >> >> this is fixed in OpenBSD and glibc, but FreeBSD and NetBSD both have >> the same bug. >> >> patch below (whitespace mangled courtesy of gmail). i'd prefer to wait >> for this to be fixed in FreeBSD and pull down the fix rather than just >> fix it locally. >> >> btw, it looks like you're missing coshl/sinhl/tanhl for ld128 now? >> (they've been removed from imprecise.c without having ld128 >> implementations added afaics.) >> >> --elliott (Android libc maintainer) > > I committed your patch along with the necessary changes to the > ld80/e_lgamma_r.c and ld128/e_lgamma_r.c. > > Thanks for bug report. > > -- > Steve