Skip to content

Library Cast function ParseFloat not working correctly #67

@Axou89

Description

@Axou89

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions