New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Built-in function POWER(X, Y) does not work when the X argument is negative and the Y value is scaled numeric but integral [CORE3091] #3470
Comments
Modified by: @livius2Version: 2.1.3 [ 10302 ] description: tis work select power(3, 2) from RDB$DATABASE but tis not => tis work select power(3, 2) from RDB$DATABASE but this not work SQL message -833 environment: Windows XP |
Modified by: @livius2summary: Build in function Power not work when x argument i negative and y value is double - "expression evaluation not supported" error => Build in function Power not work when x argument is negative and y value is double - "expression evaluation not supported" error |
Modified by: @livius2description: tis work select power(3, 2) from RDB$DATABASE but this not work SQL message -833 => this work but this not work SQL message -833 |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandesVersion: 2.5 RC2 [ 10372 ] Version: 2.5 RC1 [ 10362 ] Version: 3.0 Initial [ 10301 ] Version: 2.5 RC3 [ 10381 ] summary: Build in function Power not work when x argument is negative and y value is double - "expression evaluation not supported" error => Built-in function POWER(X, Y) does not work when the X argument is negative and the Y value is scaled numeric but integral |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.1.4 [ 10361 ] Fix Version: 2.5.0 [ 10221 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Commented by: GR (gr) In 2.1.4.18358 it is still not fixed: select 'power( 2, 2 )', power( 2, 2 ) from RDB$DATABASE returns power( 2, 2 ) 0 |
Commented by: @livius2 I confirm this but brake all others select 'power( 3, 2 )', power( 3, 2 ) from RDB$DATABASE select 'power( 3, 2.0 )', power( 3, 2.0 ) from RDB$DATABASE power( 3, 2 ) 0.000000 return wrong values as GR show |
Commented by: @asfernandes Just works for me. And I see no way my change to alter the result. It was all about exceptions. SQL> select 'power( 2, 2 )', power( 2, 2 ) from RDB$DATABASE =============== ======================= ========================== SQL> select 'power( 3, 2 )', power( 3, 2 ) from RDB$DATABASE =================== ======================= |
Commented by: Dzirt (dzirt) In Firebird version 2.1.4.18358? It's impossible... |
Commented by: @asfernandes Now I see, I was testing 3.0 and 2.5 only. It was an error in the 2.1 backport. I committed a fix and will test later. I'm having problems to build 2.1 in any environments, due to theyr build not supporting new compilers supported in 2.5. Thanks. |
Commented by: @livius2 I test this under this snapshot 2.1.4.18359 and now all is ok power( 3, 2 ) 9.000000 |
Commented by: @pmakowski Q/A test made |
Modified by: @pmakowskistatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @livius2
Is related to QA280
this work
select power(3, 2) from RDB$DATABASE
select power(-3.0, 2) from RDB$DATABASE
select power(3.0, 2.0) from RDB$DATABASE
but this not work
select power(-3, 2.0) from RDB$DATABASE
SQL message -833
expression evaluation not supported
engine code 335544606
Commits: 94c8d72 b2861fb e664de5
The text was updated successfully, but these errors were encountered: