From aa30ada88a440fd6705d6d80374334fc83c79831 Mon Sep 17 00:00:00 2001 From: Stefan Karpinski Date: Mon, 6 Apr 2015 20:11:21 -0400 Subject: [PATCH] attempt to fix 32-bit issue: try out making Base.rat use Int64s. --- base/range.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/range.jl b/base/range.jl index c5d1cfedbc9fe..5e4ff3ed5247d 100644 --- a/base/range.jl +++ b/base/range.jl @@ -107,15 +107,15 @@ FloatRange(a::FloatingPoint, s::FloatingPoint, l::Real, d::FloatingPoint) = # float rationalization helper function rat(x) y = x - a = d = 1 - b = c = 0 + a = d = Int64(1) + b = c = Int64(0) m = maxintfloat(Float32) while abs(y) <= m - f = trunc(Int,y) + f = trunc(Int64,y) y -= f a, c = f*a + c, a b, d = f*b + d, b - max(abs(a),abs(b)) <= convert(Int,m) || return c, d + max(abs(a),abs(b)) <= convert(Int64,m) || return c, d oftype(x,a)/oftype(x,b) == x && break y = inv(y) end