﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
935	test egg's approx-equal? cannot distinguish -1. and 1.	Alaric Snell-Pym	foof	"{{{
#;1> (define (approx-equal? a b epsilon)
>  (< (abs (- 1 (abs (if (zero? b) (+ 1 a) (/ a b)))))
>    epsilon))
#;2> (approx-equal? -1. 1. 1e-05)
#t
}}}

Looking at the code, the problem is clear: the inner abs destroys the difference between 1. (a and b are near-identical) and -1. (a and b are near-identical apart from differing signs), and should be removed:

{{{
(define (approx-equal? a b epsilon)
  (< (abs (- 1 (if (zero? b) (+ 1 a) (/ a b))))
    epsilon))
}}}"	defect	closed	major	someday	extensions	4.8.x	fixed	test		
