v icon indicating copy to clipboard operation
v copied to clipboard

i64 transfer to f64 should be explict?

Open Silentdoer opened this issue 2 years ago • 4 comments

V version: OS:

What did you do?

Because it might lose accuracy?

What did you expect to see?

What did you see instead?

Silentdoer avatar Jul 03 '22 23:07 Silentdoer

Yes, because it might lose accuracy.

JalonSolov avatar Jul 03 '22 23:07 JalonSolov

but in my tests, it can be cast implict..

Silentdoer avatar Aug 11 '22 10:08 Silentdoer

From the doc it's currently stated as i64 can implicitly cast into f64.

ChAoSUnItY avatar Aug 27 '22 19:08 ChAoSUnItY

The implicit cast needs to go away. Implicit casts should only be possible when you don't lose accuracy of the data.

JalonSolov avatar Aug 27 '22 20:08 JalonSolov