From 0420d5a1730ad167cbc3240a3b57f9646abf6bc5 Mon Sep 17 00:00:00 2001 From: Stefan Karpinski Date: Sat, 29 Jan 2011 17:28:00 -0500 Subject: [PATCH] Provide isinf and isnan for Float32 that works. This seems like not the best way to do this, but I'm not sure what is and I need working 32-bit versions. --- math_libm.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/math_libm.j b/math_libm.j index d9ab0463c8f26..8280682e06318 100644 --- a/math_libm.j +++ b/math_libm.j @@ -24,7 +24,7 @@ fpart(x) = x - trunc(x) for f = {:isinf, :isnan} @eval begin ($f)(x::Float64) = (0 != ccall(dlsym(libm,$string(f)), Int32, (Float64,), x)) - ($f)(x::Float32) = (0 != ccall(dlsym(libm,$strcat(string(f),"f")), Int32, (Float32,), x)) + ($f)(x::Float32) = ($f)(float64(x)) ($f)(x::Int) = false @vectorize $f end