/[gcl]/gcl/ansi-tests/number-comparison.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/number-comparison.lsp

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

revision 1.4 by pfdietz, Wed Aug 6 10:10:03 2003 UTC revision 1.5 by pfdietz, Sat Aug 23 13:42:35 2003 UTC
# Line 378  Line 378 
378                                      most-positive-single-float                                      most-positive-single-float
379                                      most-positive-double-float                                      most-positive-double-float
380                                      most-positive-long-float)                                      most-positive-long-float)
381                     for lower-bound in (list most-negative-short-float
382                                        most-negative-single-float
383                                        most-negative-double-float
384                                        most-negative-long-float)
385                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)
386                   when (<= x bound)                   when (if (floatp x) (subtypep (class-of x) (class-of bound))
387                            (<= (rationalize lower-bound)
388                              x (rationalize bound)))
389                   nconc                   nconc
390                   (let* ((y (float x one))                   (let* ((y (float x one))
391                          (z (* y (- one (* 2 epsilon)))))                          (z (* y (- one (* 2 epsilon)))))
392                     (list (list y z nil)                     (list (list y z nil)
393                           (list z y t)))))                           (list z y t)))))
394        
395       (loop for x in *universe*       (loop for x in *universe*
396             when (and (realp x) (<= x -1))             when (and (realp x) (<= x -1))
397             nconc             nconc
# Line 396  Line 403 
403                                      most-negative-single-float                                      most-negative-single-float
404                                      most-negative-double-float                                      most-negative-double-float
405                                      most-negative-long-float)                                      most-negative-long-float)
406                     for upper-bound in (list most-positive-short-float
407                                        most-positive-single-float
408                                        most-positive-double-float
409                                        most-positive-long-float)
410                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)
411                   when (>= x bound)                   when (if (floatp x) (subtypep (class-of x) (class-of bound))
412                            (<= (rationalize bound) x (rationalize upper-bound)))
413                   nconc                   nconc
414                   (let* ((y (float x one))                   (let* ((y (float x one))
415                          (z (* y (- one (* 2 epsilon)))))                          (z (* y (- one (* 2 epsilon)))))
# Line 410  Line 422 
422                                        single-float-epsilon                                        single-float-epsilon
423                                        double-float-epsilon                                        double-float-epsilon
424                                        long-float-epsilon)                                        long-float-epsilon)
425                     for lower-bound in (list most-negative-short-float
426                                        most-negative-single-float
427                                        most-negative-double-float
428                                        most-negative-long-float)
429                     for upper-bound in (list most-positive-short-float
430                                        most-positive-single-float
431                                        most-positive-double-float
432                                        most-positive-long-float)
433                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)
434                     when (if (floatp x) (subtypep (class-of x)
435                                                   (class-of lower-bound))
436                            (<= (rationalize lower-bound)
437                                x (rationalize upper-bound)))
438                   nconc                   nconc
439                   (let* ((y (float x one))                   (let* ((y (float x one))
440                          (z1 (+ y epsilon))                          (z1 (+ y epsilon))
# Line 554  Line 578 
578                                      most-positive-single-float                                      most-positive-single-float
579                                      most-positive-double-float                                      most-positive-double-float
580                                      most-positive-long-float)                                      most-positive-long-float)
581                     for lower-bound in (list most-negative-short-float
582                                        most-negative-single-float
583                                        most-negative-double-float
584                                        most-negative-long-float)
585                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)
586                   when (<= x bound)                   when (if (floatp x) (subtypep (class-of x)
587                                                   (class-of lower-bound))
588                            (<= (rationalize lower-bound) x (rationalize bound)))
589                   nconc                   nconc
590                   (let* ((y (float x one))                   (let* ((y (float x one))
591                          (z (* y (- one (* 2 epsilon)))))                          (z (* y (- one (* 2 epsilon)))))
# Line 572  Line 602 
602                                      most-negative-single-float                                      most-negative-single-float
603                                      most-negative-double-float                                      most-negative-double-float
604                                      most-negative-long-float)                                      most-negative-long-float)
605                     for upper-bound in (list most-positive-short-float
606                                        most-positive-single-float
607                                        most-positive-double-float
608                                        most-positive-long-float)
609                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)
610                   when (>= x bound)                   when (if (floatp x) (subtypep (class-of x) (class-of bound))
611                            (<= (rationalize bound) x (rationalize upper-bound)))
612                   nconc                   nconc
613                   (let* ((y (float x one))                   (let* ((y (float x one))
614                          (z (* y (- one (* 2 epsilon)))))                          (z (* y (- one (* 2 epsilon)))))
# Line 586  Line 621 
621                                        single-float-epsilon                                        single-float-epsilon
622                                        double-float-epsilon                                        double-float-epsilon
623                                        long-float-epsilon)                                        long-float-epsilon)
624                     for lower-bound in (list most-negative-short-float
625                                        most-negative-single-float
626                                        most-negative-double-float
627                                        most-negative-long-float)
628                     for upper-bound in (list most-positive-short-float
629                                        most-positive-single-float
630                                        most-positive-double-float
631                                        most-positive-long-float)
632                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)                   for one in '(1.0s0 1.0f0 1.0d0 1.0l0)
633                     when (if (floatp x) (subtypep (class-of x)
634                                                   (class-of lower-bound))
635                            (<= (rationalize lower-bound)
636                                x (rationalize upper-bound)))
637                   nconc                   nconc
638                   (let* ((y (float x one))                   (let* ((y (float x one))
639                          (z1 (+ y epsilon))                          (z1 (+ y epsilon))

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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