Age | Commit message (Collapse) | Author |
|
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>
|
|
pass in SearchPoint to initialize pbest_t before it is then
passed to setMemPoints
setMemPoints sets the pbest_t variable of AbsGTBehavior so
calling setPbest on AbsGTBehavior subclasses after calling
that doesn't do anything so drop it, and then DEPSAgent.setPbest
isn't needed anymore
Change-Id: Id4fdc770cefc0f801218dc9bf51a6dc5b1e25d5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120115
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I8278bfed8170907a958396839d0997fc127f4b2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119744
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This reverts commit 7b93bae224c7c2c49b105ef97304bb46f8b68da5.
Reason for revert: Does not compile
/home/tdf/lode/jenkins/workspace/lo_ubsan/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java:45: error: DEPSAgent is not abstract and does not override abstract method setLibrary(Library) in ILibEngine
public class DEPSAgent implements ILibEngine {
^
1 error
Change-Id: I72f2a22ab1f4119178f8002c21ba0845c4cd1bdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119040
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0a7c658d830f82d627d20b9ed7000f3c5b8f1f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119105
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I66e87f7c898efb1f2c6b1d31fbd5654244e3ea82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118785
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
the random numbers.
Change-Id: Ibc1e95736c5f9355e67f2129a7804064e329da89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id54e8fd6803c3a6c0d924338d1781679ed0b1bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115025
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I175da8a170fcddca083ed47b41c7241433e54db0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103383
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
With DEPS or SCO Evolutionary algorithms, it'll return
"No solution found."
Change-Id: I15e8e24eb519a20e3f3645b79e990949f648fbd2
Change-Id: I7321419ccc1cd00d75f03fa86d3c0cb4bf9ad473
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99584
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I99dbe7fa6d49e0663c3551d2e3dabd3f42d8d3c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99578
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Icf2a34500acc18b28f113c85366bf24edc6d20b9
Reviewed-on: https://gerrit.libreoffice.org/78695
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
It is possible user to swap these two values.
Change-Id: Ib375d705e42f7257aa9b16d72ab834020e401cde
Reviewed-on: https://gerrit.libreoffice.org/72483
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I5b8d3cd69a6138d7eebf37c299626019b32d639a
Reviewed-on: https://gerrit.libreoffice.org/72373
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Add SolverConstraintOperator.INTEGER_value case and in the same time
the also missing SolverConstraintOperator.BINARY_value case
Change-Id: I18b826e74a2381dedaea3090919118b8d5dad072
Reviewed-on: https://gerrit.libreoffice.org/56359
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Format "%.2f" is not optimal for large or small values.
Format "%g" should be prefered.
Change-Id: I92899d80564b9000b1f3e049221c456f8e1176a9
Reviewed-on: https://gerrit.libreoffice.org/31445
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and
coverity#1326448 Dereference null return value
Change-Id: I8e26c9c57264b654a5a7c3dc56c658f23291e357
|
|
Change-Id: I9c36aa362e58de724c63b9d23334eabfc973ee42
|
|
...for 7c465e7f9e8b5c34a4926fb0de84de70aee8f37d "coverity#1326260 Explicit null
dereferenced"
Change-Id: I3b7fb8195c29b7e447fbe31f823cd00d7a820e95
|
|
Change-Id: I75b9cb661a7a45304bf32395ad980f83621f4612
|
|
Change-Id: I41f89c4feefe4e012d72c663ebb9bbcb4aa7f163
|
|
Change-Id: I021589aeca9ef6bceb1c828c2197f5ff58f85b09
Reviewed-on: https://gerrit.libreoffice.org/18707
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Initialize java class member objects exposed as
XSolver properties: no default construction in java.
Fixes issue for both DEPS and SCO solvers.
Also removed info level console prints.
Change-Id: I6762c5cca978072ce20b1f69a6b523f53364107d
Reviewed-on: https://gerrit.libreoffice.org/14499
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
found by UCDetector
Change-Id: I6b0f49529379072da566e927b86815f173e7a90b
|
|
Found by PMD
Change-Id: I76d38d71a3379416fe7e5078ef8b121915b26b6b
|
|
found by PMD
Change-Id: Id6737916b68ccbdbdeec5d314747a38410923ac6
Reviewed-on: https://gerrit.libreoffice.org/13409
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: Ia01528460e2f4b610d123e29cad66520abc6a965
|
|
found by PMD
Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
|
|
found by PMD
Change-Id: I05b45382b8fb1b734657ce9421a20e6ef6fbe542
Reviewed-on: https://gerrit.libreoffice.org/12376
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I8c06be7bc0b8a38c662209f0de72a00550e25447
|
|
found by PMD
Change-Id: I04cbf986ddbcffff987784f381b8a9f52f1b3f31
|
|
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
|
|
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
|
|
Change-Id: Ibb905e6f3e7d92a0e558f1f6562e5b472cd2717b
|
|
found by UCDetector
Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
|
|
found by UCDetector
Change-Id: Ic07be7e34204b5d838a722e1ce6038506a771144
|
|
found by UCDetector
Change-Id: I4a7c56a9918054c23469de5680658e7b501f0165
|
|
found by UCDetector
Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
|
|
found by UCDetector
Change-Id: Ief32d078090102b14b60b35fc36542f8d4fb252b
|
|
found by UCDetector
Change-Id: I7f97e15667159cf8ee776e8f32fdcdec8ec00ed6
|
|
found by UCDetector
Change-Id: If05277fd2fe77ceabb4c7c87aeb8569e3406102d
|
|
Added missing 's'
Change-Id: I7570d86d65ebcffc547b06ab9c19843de0b90436
Reviewed-on: https://gerrit.libreoffice.org/9181
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
|
|
Change-Id: I8ee2aff2c18adaf5582ed6eeb174e88313d8c8a2
Reviewed-on: https://gerrit.libreoffice.org/8283
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
|
|
Change-Id: I7c25cd94f8a1ca339f7423c26f21f13c7a68906d
|
|
Change-Id: I323a6625f93347e69f3114fc10cb04dc759a539f
|
|
Change-Id: I63b0ce257b40caa53aef337e953ce8d07862d292
|
|
|
|
Change-Id: Id12089bc7df16631737e6acaee0973fb91dd953f
Reviewed-on: https://gerrit.libreoffice.org/3431
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
|
|
Change-Id: Ia07d3fd856578ab6976c02f8a0ec96273db19a2c
|
|
More tags removed and with it, more commented code was found. So remove it all.
Not functional changes here, just a cleanup.
Change-Id: Id4a6b3126ca32f3460dec3056b9caa370d0ee69c
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
|