I'm new to Julia and I enjoy exploring it using Juno as my IDE.
However, the rounding of numerical results displayed by the canvases or in the Workspace is sort of inconsistent, arbitrary, and sometimes even misleading. I'll use numbers as input in my examples for simplicity, but the rounding is the same for actual calculations that produce such numbers as their result.
Most of the numbers are rounded to 3 digits. Is it possible to change this through some option setting? I couldn't find it in the Settings for the Juno related packages in Atom.
This rounding becomes misleading for floating-point values with a three digit long integer part, as these are displayed like integers. (In the example below
123.4 is displayed as
123, the same as
123..) I think it would be better to always display at least one digit to the right of the decimal point for floating-point numbers or have them end with a decimal point (
123. for the given example).
The displaying of
1.23e+4 is quite nice, but displaying
1234. as the longer
1.23e+3 does not necessarily make sense. Also, why isn't
0.0012345 displayed as
Another inconsistency is the difference in rounding between row and column vectors (or two- and one-dimensional arrays) as shown in the examples below. Paradoxically the rounding only happens for column vectors and not for row vectors, whose displaying would benefit more from the rounding.
Is the rounding behavior documented somewhere? Will it change in the future?
Here the code for easier reproduction:
a1 = [1.2345 12.345 123.45]
a2 = [1.2345; 12.345; 123.45]
a3 = [1.2345 0.12345; 12.345 0.012345; 123.45 0.0012345]
a4 = [1.2345; 0.12345; 12.345; 0.012345; 123.45; 0.0012345]
a5 = [1.2345 0.12345 12.345 0.012345 123.45 0.0012345]