0.6.11.24:
[sbcl.git] / tests / float.pure.lisp
1 ;;;; floating-point-related tests with no side effects
2
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; While most of SBCL is derived from the CMU CL system, the test
7 ;;;; files (like this one) were written from scratch after the fork
8 ;;;; from CMU CL.
9 ;;;; 
10 ;;;; This software is in the public domain and is provided with
11 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
12 ;;;; more information.
13
14 (cl:in-package :cl-user)
15
16 (let ((+ifni single-float-positive-infinity)
17       (-ifni single-float-negative-infinity))
18   (assert (= (* +ifni 1) +ifni))
19   (assert (= (* +ifni -0.1) -ifni))
20   (assert (= (+ +ifni -0.1) +ifni))
21   (assert (= (- +ifni -0.1) +ifni))
22   (assert (= (sqrt +ifni) +ifni))
23   (assert (= (* -ifni -14) +ifni))
24   (assert (= (/ -ifni 0.1) -ifni))
25   (assert (= (/ -ifni 100/3) -ifni))
26   (assert (< -ifni +ifni))
27   (assert (not (< +ifni 100)))
28   (assert (not (< +ifni -ifni))))