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

function goType(val) returns int64 instead of float64 #80

Open
zen37 opened this issue Nov 1, 2020 · 0 comments
Open

function goType(val) returns int64 instead of float64 #80

zen37 opened this issue Nov 1, 2020 · 0 comments

Comments

@zen37
Copy link

zen37 commented Nov 1, 2020

If val = 12345678901234567890 or 12345678901234567890.5 float64 should be returned instead of int64.

case "number": if (val % 1 === 0) { if (val > -2147483648 && val < 2147483647) return "int"; else return "int64"; } else return "float64";

should be replaced with

case "number": if (val % 1 === 0) { if (val > -2147483648 && val < 2147483647) return "int"; else if (val > -9223372036854775808 && val < 9223372036854775807) return "int64"; } return "float64";

@mholt mholt mentioned this issue Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant