|
Should we assume that the reals are dense? I mean, should we assume there is necssarily a real between any two different rationals, or is this not a safe assumption in scheme?
I don't think I understand the question right. Superficial answers:
- The reals are dense, whether you assume it or not.
- Since the reals are dense, there is a real between every two different reals. Since every rational is real, there is a real between every two different rationals. In fact, the rationals are dense in the reals. There is a rational between every two different reals.
But, when you say, "in Scheme," I suspect that you're referring to the implementation of approximate reals in Scheme, rather than to the reals. You shouldn't use Scheme's reals at all. There are only a finite number of them, so they are surely not dense. They are only approximations, and there's no indication of how big their errors are. There are no guarantees about their relationship to the rationals that can be represented exactly within the memory limits of any particular installation of Scheme.
Mike O'D.
|