Hi, folks--
I am working on an application that does a lot of floating-point
calculations, and I'm having trouble with the test suite. The program
is based on the imlib2 egg, and it does some fairly simple image
processing for web applications, so the numbers in question are RGBA
color values.
On 27/07/14 01:42, Matt Gushee wrote:
I can certainly define a custom equality predicate that will do what I
need, but this is bugging me. I guess I don't really understand how
epsilon is supposed to work. The test egg documentation says that
applies to 'inexact comparisons', but I can't find
Hmm, just realized something. The test egg documentation also says:
Percentage difference allowed ...
So if the expected value is 0, then no variance is allowed? If that's
true, then epsilon isn't what I want anyway. I need to allow an
absolute amount of variance that is independent of the
Hi Matt,
The problem you’re having is because test only uses the approximate comparison
(using current-test-epsilon) when the _expected_ value is inexact:
http://api.call-cc.org/doc/scheme/inexact%3F
Since your expected value is a list (i.e. inexact? will result in #f given a
list), test is
On Sat, Jul 26, 2014 at 6:57 PM, Alaric Snell-Pym
ala...@snell-pym.org.uk wrote:
It's probably best to define your own equality predicate, I think!
Yes, I think you're right. Thanks!
___
Chicken-users mailing list
Chicken-users@nongnu.org
Hi, John--
On Sat, Jul 26, 2014 at 7:47 PM, John Cowan co...@mercury.ccil.org wrote:
Matt Gushee scripsit:
Other posters have addressed the main issues, but I'll just point out
that inexact comparison means comparison for equality of inexact
numbers. Epsilon is applied only by the default
Matt Gushee writes:
I guess my explanation wasn't entirely clear, but that's pretty much
what I was already doing. I showed the equality predicate I was using,
which tests individual values in the list with = . I think my mistake
was in assuming that (current-test-epsilon) would apply to =
On Sun, Jul 27, 2014 at 10:03 AM, Matt Gushee m...@gushee.net wrote:
Hmm, just realized something. The test egg documentation also says:
Percentage difference allowed ...
So if the expected value is 0, then no variance is allowed?
Naturally we handle this case correctly and check the
On Sun, Jul 27, 2014 at 11:02 AM, Alex Charlton alex.n.charl...@gmail.com
wrote:
Matt Gushee writes:
I guess my explanation wasn't entirely clear, but that's pretty much
what I was already doing. I showed the equality predicate I was using,
which tests individual values in the list with