Commit 08f7266b authored by pfdietz's avatar pfdietz

Test relationships for the various epsilon constants.

parent 5053348e
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Wed Aug 20 22:05:20 2003
;;;; Contains: Tests of the EPSILON constants
(in-package :cl-test)
(deftest epsilons.1
(loop for e in (list short-float-epsilon single-float-epsilon
double-float-epsilon long-float-epsilon)
when (= (float 1 e) (+ (float 1 e) e))
collect e)
nil)
(deftest epsilons.2
(loop for e in (list short-float-negative-epsilon
single-float-negative-epsilon
double-float-negative-epsilon
long-float-negative-epsilon)
when (= (float 1 e) (- (float 1 e) e))
collect e)
nil)
(deftest epsilons.3
(loop for e in (list short-float-epsilon single-float-epsilon
double-float-epsilon long-float-epsilon)
unless (= (float 1 e) (+ (float 1 e) (/ e 2)))
collect e)
nil)
(deftest epsilons.4
(loop for e in (list short-float-negative-epsilon
single-float-negative-epsilon
double-float-negative-epsilon
long-float-negative-epsilon)
unless (= (float 1 e) (- (float 1 e) (/ e 2)))
collect e)
nil)
\ No newline at end of file
......@@ -18,3 +18,5 @@
(load "fceiling.lsp")
(load "truncate.lsp")
(load "ftruncate.lsp")
(load "epsilons.lsp")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment