include/rtl/math.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a664d4d44ce66db8d60d8c0ebf8bb793ecf2c462
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Nov 17 10:35:57 2021 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed Nov 17 11:35:07 2021 +0100

    Fix the calculated constant
    
    rtl::math::isValidArcArg's comment talks about 2^64 = 1.844e19; but
    the calculation resulted in 2^63.
    
    Unfortunately we can't use C++17 hex-exponent notation in published
    API header.
    
    Change-Id: I1dd6e754431ad028982623ff5de4c6329fd6c2ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125348
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/include/rtl/math.hxx b/include/rtl/math.hxx
index d67d4aa75a4a..7da30df6832b 100644
--- a/include/rtl/math.hxx
+++ b/include/rtl/math.hxx
@@ -431,7 +431,7 @@ inline bool isValidArcArg(double d)
     return fabs(d)
         <= (static_cast< double >(static_cast< unsigned long >(0x80000000))
             * static_cast< double >(static_cast< unsigned long >(0x80000000))
-            * 2);
+            * 4);
 }
 
 /** Safe sin(), returns NAN if not valid.

Reply via email to