From c62773ad3f15b8b1f930c8434e4d85ebcffca48f Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Wed, 9 May 2018 19:04:09 +0200 Subject: [PATCH] Refine the denormal check for Mono The threshold for returning 0 for denormals is slightly different. --- lslopt/lslbasefuncs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lslopt/lslbasefuncs.py b/lslopt/lslbasefuncs.py index adf848b..dc4ae57 100644 --- a/lslopt/lslbasefuncs.py +++ b/lslopt/lslbasefuncs.py @@ -463,7 +463,7 @@ def InternalTypecast(val, out, InList, f32): ret = NaN else: ret = float(match.group(0)) - if not lslcommon.LSO and abs(ret) < 1.1754943508222875e-38: + if not lslcommon.LSO and abs(ret) < 1.1754943157898259e-38: # Mono doesn't return denormals when using (float)"val" # (but it returns them when using (vector)"") ret = 0.0