You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2014/01/08 10:28:52 UTC

[jira] [Updated] (DERBY-6447) Use StrictMath for more functions in SYSFUN

     [ https://issues.apache.org/jira/browse/DERBY-6447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-6447:
--------------------------------------

    Attachment: d6447-1a.diff

Attaching d6447-1a.diff, which makes COSH, SINH, TANH and LOG10 use the corresponding methods in StrictMath instead of their own, custom implementations.

The patch adds test cases for COSH, SINH and TANH to MathTrigFunctionsTest, since they were not tested previously. It also adds a test case for the COT function, even though the implementation of that function was not touched by the patch. The test case for LOG10 was adjusted so that it would accept the new, more accurate results (for example for LOG10(1000) and LOG10(1000000) as mentioned above).

All regression tests passed with the patch.

> Use StrictMath for more functions in SYSFUN
> -------------------------------------------
>
>                 Key: DERBY-6447
>                 URL: https://issues.apache.org/jira/browse/DERBY-6447
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d6447-1a.diff
>
>
> Most of the functions in the SYSFUN schema use methods in java.lang.StrictMath directly. A few of them use methods in SystemProcedures instead. Java 1.5 added more methods to StrictMath, so it is now possible to make more of the functions use StrictMath and drop the implementation in SystemProcedures:
> - LOG10 could use StrictMath.log10()
> - COSH could use StrictMath.cosh()
> - SINH could use StrictMath.sinh()
> - TANH could use StrictMath.tanh()



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)