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

Query: Some double & float literals are wrong #8270

Closed
bricelam opened this issue Apr 24, 2017 · 2 comments
Closed

Query: Some double & float literals are wrong #8270

bricelam opened this issue Apr 24, 2017 · 2 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@bricelam
Copy link
Contributor

Values over/under a certain value have two Es in them.

Type Value Literal
float
double
1e-5 1E-05E0
float 1e7 1E+07E0
double 1e15 1E+15E0
@ajcvickers ajcvickers added this to the 2.0.0 milestone Apr 24, 2017
@bricelam bricelam assigned smitpatel and unassigned bricelam Jun 23, 2017
@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 29, 2017
@divega
Copy link
Contributor

divega commented Jun 30, 2017

@smitpatel [closed-fixed] but not closed?

@smitpatel
Copy link
Member

Float are generated using ToString("R") which is roundtrippable format.
doubles are generated using ToString("G17") (since R has issues on x64 system)

Also double will add E0 on SQL Server only if it is absent in literal string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

4 participants