The thing you’re missing is that eps(0.9999999999999999) is half of eps(1.0) due to how floating point numbers work. The way these results are computed by Julia is that nextfloat(x) is just the result of reinterpreting x as an Integer, adding 1, and reinterpreting back as a floating point number (or subtracting for prevfloat).
2 Likes