Hello, I am new to Julia, I worked in the past mostly in Python and a bit with JAVA, C and C++. My question is that in the code below I get InexactError. The conversion works fine with floats with .0 decimal and not with another decimal ? I found that I have to use floor() or other similar functions before conversion.
The simple answer is that there are many results that you may want when converting the value 120.5 to a decimal and so you need to choose which one you want.
The most obvious choices are round (which has several rounding modes) or ceil/floor