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

Library Cast function ParseFloat not working correctly #67

Open
Axou89 opened this issue Nov 27, 2023 · 0 comments
Open

Library Cast function ParseFloat not working correctly #67

Axou89 opened this issue Nov 27, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Axou89
Copy link
Member

Axou89 commented Nov 27, 2023

The function ParseFloat(str string, bitSize int) float {} from the Cast Library doesn't cast properly the string to a float number.
For example, instead of casting the string "42.42" to the float number 42.42, it casts to 42.41999816894531.

function testParseFloat() {
    var str string = "42.42";
    var x int = 64;
    var y float = cast.parseFloat(str, x);
    console.print(y);
}
testParseFloat();

Probably an error from the casting from GoType Float to EclaType Float.

@tot0p tot0p added the bug Something isn't working label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants