See also here: https://groups.google.com/d/msg/julia-users/hIVawSgFvOs/9EpbqwWWBgAJ and the conclusion was: avoid writing 1. (which will not be allowed by the parser some time) and write 1.0 instead.
On Mon, Oct 24, 2016 at 3:40 AM, J Luis <jmfl...@gmail.com> wrote: > It parses .+ as broadcasting of two Ints. Do instead > > typeof(1. +1) > Float64 > > > > segunda-feira, 24 de Outubro de 2016 às 02:33:15 UTC+1, > christop...@unibas.ch escreveu: >> >> What is the difference between 1.0 and 1. ? >> Both are of type Float64, but adding 1 leads to the result 2.0, i.e., >> Float64, in the first case, >> and 2, i.e., Int64 in the second. >> >> _ >> _ _ _(_)_ | A fresh approach to technical computing >> (_) | (_) (_) | Documentation: http://docs.julialang.org >> _ _ _| |_ __ _ | Type "?help" for help. >> | | | | | | |/ _` | | >> | | |_| | | | (_| | | Version 0.5.0 (2016-09-19 18:14 UTC) >> _/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release >> |__/ | x86_64-apple-darwin13.4.0 >> >> julia> typeof(1.0) >> Float64 >> >> julia> typeof(1.) >> Float64 >> >> julia> typeof(1.0+1) >> Float64 >> >> julia> typeof(1.+1) >> Int64 >> >> Many thanks in advance, Christoph >> >