---++ !ADQL-2.0 Erratum 2 - MOD function description IVOA DAL mailing list [[http://mail.ivoa.net/pipermail/dal/2016-July/007549.html][thread on July 2016]] highlighted a possible issue with the description of the *MOD* function. ---+++ Erratum Content Table 1 on page 8 of the [[http://www.ivoa.net/documents/cover/ADQL-20081030.html][ADQL-2.0]] recommendation reports | Name | Argument data type | Return data type | Description | | mod(x, y) | double | double | Returns the remainder of y/x. | This seems to conflict with SQL (92, 2003) definitions and, as well, the behaviour of the existing TAP services, suggesting that _x_ and _y_ should be swapped in the function description. ---+++ Rationale Considering what current TAP services using !ADQL and the mathematical description of the _modulo_ operator where M % N = R with * R having the same sign as M * |R| is less than |N| * M = K * N + R for a given integer K The definition of _mod(x, y)_ in !ADQL-2.0 should be amended to _"Returns the remainder of x/y"_. It should also be made clear, maybe in a future revision, to follow the above rules for the remainder and its sign. ---+++ Impact Assesment The change proposed by this erratum should impact no existing IVOA resource. Checks against the major TAP services shows they already act following the behaviour here above described. Checks against a choice of RDBMS-es (!PostgreSQL, !MySQL, !MariaDB, Apache Derby, !HyperSQL and Oracle) shows the same bahaviour too. See the mail thread referenced in the introduction of this page for details. <!-- * Set ALLOWTOPICRENAME = IVOA.TWikiAdminGroup -->
This topic: IVOA
>
WebHome
>
IvoaDAL
>
ADQL
>
ADQL-2_0-Next
>
ADQL-2_0-Err-2
Topic revision: r1 - 2016-07-07 - MarcoMolinaro
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback