Knetic / govaluate

Arbitrary expression evaluation for golang
MIT License
3.75k stars 503 forks source link

int64 to float64, precision lost ,exm #137

Open zhaoche27 opened 4 years ago

zhaoche27 commented 4 years ago

exmple: int64(6717512636144288011) -> float64(6717512636144288000)

zeng-tong commented 3 years ago

exmple: int64(6717512636144288011) -> float64(6717512636144288000)

hi, have you solved this problem anyhow ?

QunWei-L commented 3 years ago

@Knetic Hi, Is there any special reason for using castToFloat64 here? I want to add a method "castToInt64" to solve this problem. What do you think of this solution? Will there be any potential problems