Skip to content

Real.value(String) can return success but fail to encode some large negative values #325

@BillHurn

Description

@BillHurn

A test put in to check the handling of values that are unencodable as Real spotted some odd results around Long.MIN_VALUE

Despite returning a success code, the encoding can fail, resulting in an incorrect value.

 Input                      Return code         Value
 9223372036854775807        SUCCESS             9223372036854775807
 9223372036854775807.0      INVALID_ARGUMENT   
-9223372036854775808        SUCCESS             -9223372036854775808
-9223372036854775808.0      SUCCESS             0.0
-9223372036854775808.00     INVALID_ARGUMENT   
   -9223372036854775.808    SUCCESS             -9.223372036854776E15
   -9223372036854775.8080   SUCCESS             0.0E-4

ETA version in use: 3.6.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions