Skip to content
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

Negative infinity (double) shown incorrectly without sign in isql [CORE5570] #5837

Closed
firebird-issue-importer opened this issue Jun 20, 2017 · 17 comments

Comments

@firebird-issue-importer

Submitted by: @cincuranet

Storing Double.NegativeInfinity (https://msdn.microsoft.com/en-us/library/system.double.negativeinfinity(v=vs.110).aspx) stores it correctly (correct value is read back), but in isql the sign is not shown.

SQL> select * from test;

                  D

=======================
Infinity
Infinity

The second value should be negative (was stored as negative).

Commits: 830372f 8c5c9bd c365bf4 1b670ae 43e662a 63080ab

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jun 20, 2017

Modified by: @cincuranet

description: Storing Double.NegativeInfinity (https://msdn.microsoft.com/en-us/library/system.double.negativeinfinity(v=vs.110).aspx) stores it correctly (correct value is read back), but in isql the sign is not shown. => Storing Double.NegativeInfinity (https://msdn.microsoft.com/en-us/library/system.double.negativeinfinity(v=vs.110).aspx) stores it correctly (correct value is read back), but in isql the sign is not shown.

SQL> select * from test;

                  D

=======================
Infinity
Infinity

The second value should be negative (was stored as negative).

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 18, 2017

Commented by: @asfernandes

Please test in the next snapshot.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 18, 2017

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

Fix Version: 3.0.3 [ 10810 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 21, 2017

Modified by: @asfernandes

status: Resolved [ 5 ] => Reopened [ 4 ]

resolution: Fixed [ 1 ] =>

Fix Version: 4.0 Alpha 1 [ 10731 ] =>

Fix Version: 3.0.3 [ 10810 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 24, 2017

Commented by: @cincuranet

So far the 3.0.3 still shows wrong values.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 24, 2017

Commented by: @asfernandes

Fix was temporary reopened and now just committed in master only for testing.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 25, 2017

Modified by: @asfernandes

status: Reopened [ 4 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

Fix Version: 3.0.3 [ 10810 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 27, 2017

Commented by: @pavel-zotov

Which numeric literals should be passed to ISQL in order to get such results on console ("+/- Infinity") ?
I've tried this ( took values from https://msdn.microsoft.com/en-us/library/system.double.minvalue(v=vs.110).aspx ):

set list on;
set sqlda_display on;
set echo on;

select
-7.997e307 + -9.985e307 as add_result
from rdb$database;

select
-1.5935e250 * 7.948e110 as mul_result
from rdb$database;

-- but got:

Statement failed, SQLSTATE = 22003
arithmetic exception, numeric overflow, or string truncation
-Floating-point overflow. The exponent of a floating-point operation is greater than the magnitude allowed.

As of 'select 1/.0 from ...' (found this in git discussion) - result is:

Statement failed, SQLSTATE = 22012
arithmetic exception, numeric overflow, or string truncation
-Integer divide by zero. The code attempted to divide an integer value by an integer divisor of zero.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 27, 2017

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Deferred

Test Details: See comment 27.07.2017 07:11.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 27, 2017

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

Test Details: See comment 27.07.2017 07:11. => See comment 27/Jul/17 04:11 AM

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 27, 2017

Commented by: @asfernandes

I do not know, really. I did the test internally modifying the engine to produce -Infinity.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 27, 2017

Commented by: @cincuranet

I can confirm the Firebird-3.0.3.32794 shows the negative infinity correctly.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 27, 2017

Commented by: Slavomir Skopalik (skopaliks)

Will be nice if there will be a UDF/Internal set of functions that will provide +-Nan constant and test for Nan.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 27, 2017

Commented by: @pavel-zotov

> I can confirm the Firebird-3.0.3.32794 shows the negative infinity correctly.

Using ISQL ? Which values for numbers do you use ?

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 27, 2017

Commented by: @cincuranet

No, using .NET.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 29, 2017

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Deferred => Done successfully

Test Details: See comment 27/Jul/17 04:11 AM =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 29, 2017

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants