You want to compare two floating-point numbers and know if they are equal. Unfortunately, floating-point arithmetic is not precise so very few results will match exactly. Consequently, we usually want to compare floating point values up to a certain number of decimal places.
Most Scheme implementations conforming to R5RS will implement the full tower of numerics, providing access to exact and inexact integers,
bignum support, and a raft of other tools making this particular
recipe somewhat unnecessary.
However, there are still cases where you want a "fuzzy match" on two real numbers since the difference is below some epsilon threshhold.
In these cases, you can use floating-point byte strings to represent and compare numbers:
It is obviously better to make use of Scheme's bignum and exact
integer facilities to carry calculations through your programs with
the highest level of precision. However, there are frequent cases
where it is useful to provide "fuzzy" matching on numerical terms.
Hopefully this recipe can help deal with those situations.
A final thought: