[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Using epsilon in test egg
From: |
John Cowan |
Subject: |
Re: [Chicken-users] Using epsilon in test egg |
Date: |
Mon, 28 Jul 2014 08:30:07 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Alex Shinn scripsit:
> The solution is definitely not to write your own comparison function,
> and trust that the test egg is doing the right thing.
It isn't, though, not quite. What it needs to do is not a dichotomy of
"if inexact, use epsilon, otherwise use `equal?`" but rather to have
a version of `equal?` that uses epsilon when it comes to a float.
That way comparisons against list or vector structure that contains
floats (as in the OP's case) will work correctly.
--
John Cowan http://www.ccil.org/~cowan address@hidden
What has four pairs of pants, lives in Philadelphia,
and it never rains but it pours?
--Rufus T. Firefly
- [Chicken-users] Using epsilon in test egg, Matt Gushee, 2014/07/26
- Re: [Chicken-users] Using epsilon in test egg, Alaric Snell-Pym, 2014/07/26
- Re: [Chicken-users] Using epsilon in test egg, Matt Gushee, 2014/07/26
- Re: [Chicken-users] Using epsilon in test egg, Peter Bex, 2014/07/30
- Re: [Chicken-users] Using epsilon in test egg, John Cowan, 2014/07/30
- Re: [Chicken-users] Using epsilon in test egg, Alex Shinn, 2014/07/30
- Re: [Chicken-users] Using epsilon in test egg, Peter Bex, 2014/07/30
Re: [Chicken-users] Using epsilon in test egg, Alex Charlton, 2014/07/26