Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFBAE185D6 for ; Mon, 1 Jun 2015 15:30:21 +0000 (UTC) Received: (qmail 18181 invoked by uid 500); 1 Jun 2015 15:30:21 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 18132 invoked by uid 500); 1 Jun 2015 15:30:21 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 18121 invoked by uid 99); 1 Jun 2015 15:30:21 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 15:30:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D3DCDC0B58 for ; Mon, 1 Jun 2015 15:30:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.97 X-Spam-Level: X-Spam-Status: No, score=0.97 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ECHNFPpG28f5 for ; Mon, 1 Jun 2015 15:30:20 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 30F6A47C02 for ; Mon, 1 Jun 2015 15:30:20 +0000 (UTC) Received: (qmail 17869 invoked by uid 99); 1 Jun 2015 15:30:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 15:30:19 +0000 Date: Mon, 1 Jun 2015 15:30:19 +0000 (UTC) From: "Shuxiong Ye (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-2019) Implement Build-in math function ln and log MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-2019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14567436#comment-14567436 ] Shuxiong Ye commented on PHOENIX-2019: -------------------------------------- The patch above will firstly turn input to double type, and using java.lang.Math related functions to get the result. Note that, for both types BigDecimal and long, when type cast occurs from these two types to double, there will be a loss of precision. java.lang.Math is only support for double. > Implement Build-in math function ln and log > ------------------------------------------- > > Key: PHOENIX-2019 > URL: https://issues.apache.org/jira/browse/PHOENIX-2019 > Project: Phoenix > Issue Type: Sub-task > Reporter: Shuxiong Ye > Assignee: Shuxiong Ye > Attachments: 0001-PHOENIX-2019-Implement-Build-in-math-function-ln-and.patch > > > Implement math build-in function, ln and log. Example show as below: > ln(dp) natural logarithm ln(2.0) 0.693147180559945 > log(dp) base 10 logarithm log(100.0) 2 > log(b, x) numeric logarithm to base b log(2.0, 64.0) 6.0000000000 -- This message was sent by Atlassian JIRA (v6.3.4#6332)