Using fuzz with EQUAL function, returns appear inconsistent.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everybody,
I've been teaching myself AutoLISP over the past couple weeks and I have been trying to figure out the EQUAL function.
The book I have says that when comparing lists of two or more real numbers, the difference must be less than fuzz. But after doing some testing, that doesn't appear to be correct. It's a pretty old book so it might not still be correct. Here's what I tested:
When I compare the list (0.0 0.001) to (0.0 0.000) with fuzz of 0.001, it returns nil.
But comparing (0.0 15.001) to (0.0 15.000) with fuzz of 0.001 returns T.
In both sets of compared lists, the second items are .001 difference, yet one returns nil and the other returns T.
I was hoping someone could clarify the specific workings of the equal function that would cause these results.
Thanks,
Chris