On Tue, Nov 13, 2012 at 4:34 PM, Matthias Schabel <
matt...@schabels.com> wrote:
> Thanks...this also reminds me of another question I came up with :
>
> Why does
>
> int(3.)
>
> give the expected answer but
>
> Int64(3.)
>
> give an error. I would expect the constructors for these types to behave in
> a consistent manner.
Hmm, works for me. Which version are you using?
-Mike
>
> Matthias
>
>
>
> Julia has integer returning version of ceil, floor, round, trunc called
> iceil, ifloor, iround, itrunc.
> Julia's divide (a/b), when applied to ints, returns a floating_point value.
> Julia has div(a,b) and fld(a,b), a floored variant of div, both return an
> int value.
>
> for example, division with integers -7 and 4
>
> a = int(-7)
> b = int( 4)
> a_divide_b = a/b # -1.75
> a_div_b = div(a,b) # -1
> a_fld_b = fld(a,b) # -2
>
> On Tuesday, November 13, 2012 3:57:38 PM UTC-5, Matthias Schabel wrote:
>>
>> If implicit conversion between float and int is disallowed, shouldn't
>> these functions return integers?
>
>
> --
>
>
>
>
>
> --
>
>
>