aboutsummaryrefslogtreecommitdiff
path: root/source/om
AgeCommit message (Expand)Author
2012-12-16update translations for LibreOffice 4.0 beta2Andras Timar
2012-12-09fix of damaged files from beta1Andras Timar
2012-12-03translators wanted LibreLogo help in a separate fileAndras Timar
2012-12-03update translations for LibreOffice 4.0 beta1Andras Timar
2012-11-20add missing po file for filter/uiconfigAndras Timar
2012-11-20add tudes po filesAndras Timar
2012-11-20initial import of LibreOffice 4.0 translationsAndras Timar
2012-11-07add librelogo filesAndras Timar
2012-10-23move po files to correct locationDavid Tardon
2012-10-16move translations structure one directory upNorbert Thiebaud
/sw_redlinehide_4b_for_libreoffice-6-2'>feature/sw_redlinehide_4b_for_libreoffice-6-2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/nlpsolver/src
AgeCommit message (Collapse)Author
2024-04-29Double values comparison changed to compare method.Todor Balabanov
Using the Double.compare() method is often preferred over the == comparison operator for comparing double values due to several reasons: Handling NaN (Not-a-Number) values: The Double.compare() method correctly handles NaN values, while the == operator does not. If either of the operands is NaN, the == operator will always return false, regardless of the other operand. In contrast, Double.compare() will correctly evaluate NaN values according to the IEEE 754 floating-point standard. Handling positive and negative zero: The == operator treats positive zero and negative zero as equal, whereas they are distinct values in IEEE 754 floating-point representation. Double.compare() correctly distinguishes between positive and negative zero. Robustness against rounding errors: Floating-point arithmetic can introduce rounding errors, causing two double values that should be equal to differ slightly. Directly comparing them with the == operator might yield unexpected results due to these small differences. Double.compare() allows you to define a tolerance level if necessary, providing more control over how equality is determined. Consistent behavior: The behavior of Double.compare() is consistent and predictable across different platforms and JVM implementations, as it follows the IEEE 754 standard. On the other hand, the behavior of the == operator might vary depending on the platform and compiler optimizations. Suitability for sorting: Double.compare() returns an integer value that can be directly used for sorting double values in ascending or descending order. This makes it convenient for sorting arrays or collections of double values. Overall, while the == operator might work in some cases, using Double.compare() provides more robust and predictable behavior, especially when dealing with floating-point numbers in Java. Change-Id: I5756936a0d2b4fe11b9113ddd33b6ae691f5103f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>