Opened 3 years ago

Closed 3 years ago

#6946 closed defect (fixed)

Inconsistent behavior with GDALIsValueInRange()

Reported by: Kurt Schwehr Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:

Description (last modified by Kurt Schwehr)

r39170 has no tests and is quirky...

GDALIsValueInRange<float>(1.0f / 0.0f) is false, but

GDALIsValueInRange<double>(1.0 / 0.0) is true.

Is this specialization necessary?

template <> inline bool GDALIsValueInRange<float>(double dfValue)

Change History (2)

comment:1 Changed 3 years ago by Kurt Schwehr

Description: modified (diff)

comment:2 Changed 3 years ago by Even Rouault

Resolution: fixed
Status: newclosed

In 39324:

Cleanup and test ARE_REAL_EQUAL() and GDALIsValueInRange() (fixes #6945, fixes #6946)

Note: See TracTickets for help on using tickets.