Files
ceres-solver/internal
Alex Stewart f11c256265 Fix fmin/fmax() to use Jet averaging on equality
- Prior to 48cb54d1, Ceres' fmin/fmax() for Jets followed the convention
  of std::min/max(), and always returned the first argument on equality,
  irrespective of whether this argument was natively a scalar or a Jet.
- After 48cb54d1, Ceres' fmin/fmax() instead returned the second
  argument on equality, again irrespective of whether this argument was
  natively a scalar or a Jet.
- Now on equality we average the arguments as Jets, which ensures that
  a consistent answer is produced irrespective of the ordering or type
  (Jet or scalar) of the input arguments. This also ensures that we
  preserve a non-zero derivative where it exists, excluding the edge
  case of two Jet inputs with equal but oppositely signed infinitesimal
  components.
- We retain the behaviour introduced in 48cb54d1 whereby NaNs are
  treated as missing values, following the convention of
  std::fmin/fmax().
- Raised as issue #816.

Change-Id: I01217c0e32c1be83be440e4515b57c79dd290923
2022-06-22 14:19:55 +01:00
..