/[gcl]/gcl/ansi-tests/numbers-aux.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/numbers-aux.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by pfdietz, Sat Apr 30 21:33:22 2005 UTC revision 1.28 by pfdietz, Sun May 1 01:33:08 2005 UTC
# Line 299  Line 299 
299                 (floating-point-overflow () t))                 (floating-point-overflow () t))
300                collect (list x y (min x y)))))                collect (list x y (min x y)))))
301    
 (defun epsilon (number)  
   (etypecase number  
     (complex (* 2 (epsilon (realpart number)))) ;; crude  
     (short-float short-float-epsilon)  
     (single-float single-float-epsilon)  
     (double-float double-float-epsilon)  
     (long-float long-float-epsilon)  
     (rational 0)))  
   
 (defun negative-epsilon (number)  
   (etypecase number  
     (complex (* 2 (negative-epsilon (realpart number)))) ;; crude  
     (short-float short-float-negative-epsilon)  
     (single-float single-float-negative-epsilon)  
     (double-float double-float-negative-epsilon)  
     (long-float long-float-negative-epsilon)  
     (rational 0)))  
   
302  ;;; Compute the number of digits that can be added to 1.0 in the appropriate  ;;; Compute the number of digits that can be added to 1.0 in the appropriate
303  ;;; float type, a rational representation of the smallest radix^(-k) s.t.  ;;; float type, a rational representation of the smallest radix^(-k) s.t.
304  ;;; 1.0 + radix^(-k) /= 1.0, and the float representation of that value.  ;;; 1.0 + radix^(-k) /= 1.0, and the float representation of that value.

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26