/jurt/

ferences. 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>
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>
Fix title for nlpsolver/README.md 2022-12-19T09:42:02+00:00 Hossein hossein@libreoffice.org 2022-12-18T21:37:34+00:00 c6837f8ebe611f3a0ae144ffe4d4ac4bc98f6b96 The nlpsolver module is "Solver for Nonlinear Programming", which was mistakenly called "New Linear Programming", and this is now fixed. The change will appear within a week in: https://docs.libreoffice.org/nlpsolver.html Change-Id: I05b14d1e4056d8d0797728905886edef867f29e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144408 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
The nlpsolver module is "Solver for Nonlinear Programming", which was
mistakenly called "New Linear Programming", and this is now fixed.

The change will appear within a week in:

https://docs.libreoffice.org/nlpsolver.html

Change-Id: I05b14d1e4056d8d0797728905886edef867f29e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144408
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Related tdf#137145 tdf#137569 Capitalization + punctuation fixes 2022-07-05T16:18:46+00:00 Adolfo Jayme Barrientos fitojb@ubuntu.com 2022-07-05T09:57:02+00:00 02c5c0288aeb3bd5e6f4bf63b53f39e6a73cba86 Change-Id: Icd8a631da83c86333c7e5bcee0069165899d3041 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136822 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Change-Id: Icd8a631da83c86333c7e5bcee0069165899d3041
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136822
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>