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

Floor & ceiling functions give wrong results with exact numeric arguments [CORE1677] #2102

Closed
firebird-automations opened this issue Jan 7, 2008 · 12 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: stephano (stephano)

Is related to QA207

select floor(cast(1500 as numeric(18,5))) from rdb$database -> -4827 (wrong)
select floor(cast(1500 as numeric(18,4))) from rdb$database -> 1500 (correct)
select ceiling(cast(1500 as numeric(18,5))) from rdb$database -> -4826 (wrong)

Actually, any precision higher than 6 gives a wrong result.

Commits: 1c40b7d

@firebird-automations
Copy link
Collaborator Author

Modified by: stephano (stephano)

description: select floor(cast(1500 as numeric(18,5))) from rdb$database -> -4827 (wrong)
select floor(cast(1500 as numeric(18,4))) from rdb$database -> 1500 (correct)

Actually, any precision higher than 6 gives a wrong result.

=>

select floor(cast(1500 as numeric(18,5))) from rdb$database -> -4827 (wrong)
select floor(cast(1500 as numeric(18,4))) from rdb$database -> 1500 (correct)
select ceiling(cast(1500 as numeric(18,5))) from rdb$database -> -4826 (wrong)

Actually, any precision higher than 6 gives a wrong result.

summary: Floor functions gives wrong result with exact numeric argument => Floor & ceiling functions give wrong results with exact numeric arguments

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

The bug is fixed... I'm maintaining the ticket opened because:
1) I don't know if it can be included in RC1
2) There is no 2.1 RC2 version in the tracker

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 2.1 RC1 [ 10201 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 13802 ] => Firebird [ 14114 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

Link: This issue block progress on QA207 [ QA207 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

Q/A test made ok

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA207 [ QA207 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue block progress on QA207 [ QA207 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test => Done successfully

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