« first day (765 days earlier)      last day (770 days later) » 

ksi
8:27 AM
A question about comparing doubles in k: how can I check whether two doubles (finite, non-degenerate, and not NaN) are at most one bit apart, i.e. they are either exactly the same or having the smallest gap. I know a function like nextafter() in c/c++ can do this. Can I implement something similar in k?
 
 
3 hours later…
ksi
10:59 AM
I find that (y=m)|x=m:.5*x+y works, at least for the data range I care
 
 
1 hour later…
12:05 PM
@ksi yes, i think so. if there is no distinct value in between, they are 1ulp apart. or you convert to bytes then to ints to compare.
 

« first day (765 days earlier)      last day (770 days later) »