Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D10DB200BF0 for ; Fri, 16 Dec 2016 02:32:16 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CFACD160B2D; Fri, 16 Dec 2016 01:32:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 24A21160B15 for ; Fri, 16 Dec 2016 02:32:15 +0100 (CET) Received: (qmail 80818 invoked by uid 500); 16 Dec 2016 01:32:15 -0000 Mailing-List: contact commits-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list commits@asterixdb.apache.org Received: (qmail 80809 invoked by uid 99); 16 Dec 2016 01:32:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Dec 2016 01:32:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2B535E0772; Fri, 16 Dec 2016 01:32:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: buyingyi@apache.org To: commits@asterixdb.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: asterixdb git commit: Fixing some doc bugs related to numeric functions. Date: Fri, 16 Dec 2016 01:32:15 +0000 (UTC) archived-at: Fri, 16 Dec 2016 01:32:17 -0000 Repository: asterixdb Updated Branches: refs/heads/master 9267168f7 -> f5f9d9270 Fixing some doc bugs related to numeric functions. Change-Id: I692586bb408f4d939b4d16bdaf784822c60c9aca Reviewed-on: https://asterix-gerrit.ics.uci.edu/1312 Sonar-Qube: Jenkins Tested-by: Jenkins BAD: Jenkins Reviewed-by: Yingyi Bu Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/f5f9d927 Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/f5f9d927 Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/f5f9d927 Branch: refs/heads/master Commit: f5f9d92705e01580215dd5ca01b00b73d32951f5 Parents: 9267168 Author: Mike Carey Authored: Thu Dec 15 15:53:14 2016 -0800 Committer: Yingyi Bu Committed: Thu Dec 15 17:31:40 2016 -0800 ---------------------------------------------------------------------- .../src/main/markdown/builtins/1_numeric.md | 23 +++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f5f9d927/asterixdb/asterix-doc/src/main/markdown/builtins/1_numeric.md ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/1_numeric.md b/asterixdb/asterix-doc/src/main/markdown/builtins/1_numeric.md index 7cdc63f..563860c 100644 --- a/asterixdb/asterix-doc/src/main/markdown/builtins/1_numeric.md +++ b/asterixdb/asterix-doc/src/main/markdown/builtins/1_numeric.md @@ -60,12 +60,13 @@ * Example: - { "v1": acos(1), "v2": acos(2), "v3": abs(0), "v4": acos(float("0.5")), "v5": acos(double("-0.5")) }; + { "v1": acos(1), "v2": acos(2), "v3": acos(0), "v4": acos(float("0.5")), "v5": acos(double("-0.5")) }; * The expected result is: - { "v1": 0.0, "v2": NaN, "v3": 0, "v4": 1.0471975511965979, "v5": 2.0943951023931957 } + { "v1": 0.0, "v2": NaN, "v3": 1.5707963267948966, "v4": 1.0471975511965979, "v5": 2.0943951023931957 } + ### asin ### @@ -123,7 +124,7 @@ atan2(numeric_value1, numeric_value2) - * Computes the arc tangent value of arguments. + * Computes the arc tangent value of numeric_value2/numeric_value1. * Arguments: * `numeric_value1`: a `tinyint`/`smallint`/`integer`/`bigint`/`float`/`double` value, * `numeric_value2`: a `tinyint`/`smallint`/`integer`/`bigint`/`float`/`double` value. @@ -268,12 +269,13 @@ * Example: - { "v1": exp(1), "v2": exp(2), "v3": exp(0), "v4": exp(float("0.5")), "v5": exp(double("1000")) }; + { "v1": ln(1), "v2": ln(2), "v3": ln(0), "v4": ln(float("0.5")), "v5": ln(double("1000")) }; * The expected result is: - { "v1": 2.718281828459045, "v2": 7.38905609893065, "v3": 1.0, "v4": 1.6487212707001282, "v5": Infinity } + { "v1": 0.0, "v2": 0.6931471805599453, "v3": -Infinity, "v4": -0.6931471805599453, "v5": 6.907755278982137 } + ### log ### @@ -292,15 +294,15 @@ * Example: - { "v1": exp(1), "v2": exp(2), "v3": exp(0), "v4": exp(float("0.5")), "v5": exp(double("1000")) }; - + { "v1": log(1), "v2": log(2), "v3": log(0), "v4": log(float("0.5")), "v5": log(double("1000")) }; * The expected result is: - { "v1": 2.718281828459045, "v2": 7.38905609893065, "v3": 1.0, "v4": 1.6487212707001282, "v5": Infinity } + { "v1": 0.0, "v2": 0.3010299956639812, "v3": -Infinity, "v4": -0.3010299956639812, "v5": 3.0 } -### atan2 ### + +### power ### * Syntax: power(numeric_value1, numeric_value2) @@ -409,7 +411,7 @@ * Example: - { "v1": sign(1), "v2": sign(2), "v3": sign(0), "v4": sign(float("0.5")), "v5": sign(double("1000")) }; + { "v1": sign(1), "v2": sign(2), "v3": sign(0), "v4": sign(float("0.5")), "v5": sign(double("-1000")) }; * The expected result is: @@ -417,6 +419,7 @@ { "v1": 1, "v2": 1, "v3": 0, "v4": 1, "v5": -1 } + ### sin ### * Syntax: