diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-09-22 09:55:00 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-09-22 17:59:36 +0200 |
commit | 43f2cdb3b41ff4f5e99500f0c0082d4bfa4bc97c (patch) | |
tree | e0c42d922649813c6c7d42bc346688daae97f827 /sc | |
parent | 64426b95bd6c9f1fe7a40c2f2bfabb43b1ce658c (diff) |
fix incorrect as_double usage in opencl
as_double interprets the binary representation, it is not a cast.
Change-Id: I3034a36b84fbf458b8818af1e2255b532d21d229
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140369
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/op_math_helpers.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/opencl/op_math_helpers.hxx b/sc/source/core/opencl/op_math_helpers.hxx index 81fb8f5a8541..015afcf547fb 100644 --- a/sc/source/core/opencl/op_math_helpers.hxx +++ b/sc/source/core/opencl/op_math_helpers.hxx @@ -117,12 +117,12 @@ const char is_representable_integerDecl[] = "int is_representable_integer(doubl const char is_representable_integer[] = "int is_representable_integer(double a) {\n" " long kMaxInt = (1L << 53) - 1;\n" -" if (a <= as_double(kMaxInt))\n" +" if (a <= (double)kMaxInt)\n" " {\n" -" long nInt = as_long(a);\n" +" long nInt = (long)a;\n" " double fInt;\n" " return (nInt <= kMaxInt &&\n" -" (!((fInt = as_double(nInt)) < a) && !(fInt > a)));\n" +" (!((fInt = (double)nInt) < a) && !(fInt > a)));\n" " }\n" " return 0;\n" "}\n"; |