class TEST create make feature make do if not same_double (nan.min (4.0), nan) then io.put_string ("Not OK min with NaN as target%N") end if not same_double ((4.0).min (nan), nan) then io.put_string ("Not OK min with NaN as argument%N") end if not same_double (nan.max (4.0), nan) then io.put_string ("Not OK max with NaN as target%N") end if not same_double ((4.0).max (nan), nan) then io.put_string ("Not OK max with NaN as argument%N") end end nan_as_natural_64: NATURAL_64 is 0x7FF8000000000000 nan: DOUBLE is local l_ptr: MANAGED_POINTER once create l_ptr.make (8) l_ptr.put_natural_64 (nan_as_natural_64, 0) Result := l_ptr.read_real_64 (0) end same_double (d1, d2: DOUBLE): BOOLEAN is do Result := ($d1).memory_compare ($d2, 8) end end