anthonylouisbsb commented on a change in pull request #10350:
URL: https://github.com/apache/arrow/pull/10350#discussion_r671183620
##########
File path: cpp/src/gandiva/gdv_function_stubs_test.cc
##########
@@ -20,10 +20,19 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
+#include <cmath>
+
#include "gandiva/execution_context.h"
namespace gandiva {
+static const double DEFAULT_THRESHOLD = 0.00005;
Review comment:
I think choosing an adequate does not have a simple and unique answer
like is shown in these articles:
- https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
-
https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
I choose that number because it is the value defined in the [float header as
default threshold](https://www.cplusplus.com/reference/cfloat/) . For huge and
small numbers, I think the developer should set the threshold manually when he
is calling the method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]