Problem with converting a floating-point value into a long value
i encountert a problem with the conversion of a floating-point value into a simple long value. It seems like it only works correct with a decimal value as well as a constant.
|long ( 99.8 ) = 100|
which is totally fine,but the following seems wrong to me
DOUBLE ldbl_value = 99.8long ( ldbl_value ) = 99
Why do i get a different result with that code?
What do you think of that?
I enclosed an image of a list, which showes how the conversion is creating different results, depending on the input type.