You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is usual to me to convert an integer using a dot at the end, e.g., 4 as integer and 4. as a float point number.
When some operator is next to the dot it doesn't belong anymore to the number but to the operator. I haven't seen this reported, so here it goes an example
julia>1+2# It gives an Int as expected3
julia>1+2.# This way we obtain a Float3.0
julia>1.+2# It is somehow inconsistent with the above use of the dot since we obtain an Int3
julia>1.+2# A space solves it.3.0
I would propose for the dot to belong to the digit.
Just to give a use case where special care must be taken, at least from my perspective
whereas if one goes directly to the exponent and writes 20^20 and 20.^20, they are both equally wrong.
The text was updated successfully, but these errors were encountered:
iagobaapellaniz
changed the title
Using the dot, ., for ensuring a float number doesn't always work
Using a dot, ., at the end for defining a float number doesn't always work
Jun 9, 2017
It is usual to me to convert an integer using a dot at the end, e.g.,
4
as integer and4.
as a float point number.When some operator is next to the dot it doesn't belong anymore to the number but to the operator. I haven't seen this reported, so here it goes an example
I would propose for the dot to belong to the digit.
Just to give a use case where special care must be taken, at least from my perspective
whereas if one goes directly to the exponent and writes
20^20
and20.^20
, they are both equally wrong.The text was updated successfully, but these errors were encountered: