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

*round UDFs broken for negative numbers [CORE2281] #2707

Closed
firebird-issue-importer opened this issue Jan 19, 2009 · 7 comments
Closed

*round UDFs broken for negative numbers [CORE2281] #2707

firebird-issue-importer opened this issue Jan 19, 2009 · 7 comments

Comments

@firebird-issue-importer

Submitted by: @paulvink

Assigned to: Claudio Valderrama C. (robocop)

Anything on <-0.6, 0] rounds to 0
Anything on <-1, -0.6] rounds to +1
Anything on <-1.6, -1] rounds to -1
Anything on <-2.6, -1.6] rounds to -2
Anything on <-3.6, -2.6] rounds to -3
and so on

Commits: b2b178f 57ed00d 89fdae4 bc2e065

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 21, 2009

Commented by: Claudio Valderrama C. (robocop)

Since this problem was reported privately by Paul Vinkenoog privately to me months ago but I didn't have time to fix it until recently and he put the tracker item when I showed it a change fbudf, I'm going to commit the same code in all affected branches. Not necessarily what Paul wanted, since round and trunc in fbudf were mean to be asymmetric like in the math definition (unlike Delphi functions).
round always rounds to the next bigger integer when it's in the upper half of the range (including x.5).
trunc always truncates to the biggest integer that's equal or smaller than the argument.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 22, 2009

Modified by: Claudio Valderrama C. (robocop)

assignee: Claudio Valderrama C. [ robocop ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 12, 2009

Modified by: Claudio Valderrama C. (robocop)

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 12, 2009

Modified by: Claudio Valderrama C. (robocop)

Fix Version: 2.1.2 [ 10270 ]

Fix Version: 1.5.6 [ 10225 ]

Fix Version: 2.0.6 [ 10303 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 18, 2009

Modified by: @dyemanov

Fix Version: 2.1.3 [ 10302 ]

Fix Version: 2.1.2 [ 10270 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 23, 2011

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 19, 2016

Modified by: @pavel-zotov

QA Status: No test

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

Successfully merging a pull request may close this issue.

None yet
1 participant