Raymond Toy pushed to branch issue-290-pprint-with-float-traps at cmucl / cmucl
Commits:
-
83778858
by Raymond Toy at 2024-03-25T07:14:46-07:00
1 changed file:
Changes:
... | ... | @@ -10,21 +10,10 @@ |
10 | 10 | (assert-equal
|
11 | 11 | "
|
12 | 12 | (WITH-FLOAT-TRAPS-MASKED (:UNDERFLOW)
|
13 | - (LET* ((RATIO
|
|
14 | - (/ (* (EXPT 10 PPRINT-TESTS::EXPONENT) NUMBER)
|
|
15 | - PPRINT-TESTS::DIVISOR))
|
|
16 | - (PPRINT-TESTS::RESULT (COERCE RATIO PPRINT-TESTS::FLOAT-FORMAT)))
|
|
17 | - (WHEN (AND (ZEROP PPRINT-TESTS::RESULT) (NOT (ZEROP NUMBER)))
|
|
18 | - (ERROR \"Underflow\"))
|
|
19 | - PPRINT-TESTS::RESULT))"
|
|
13 | + (PRINT \"Hello\"))"
|
|
20 | 14 | (with-output-to-string (s)
|
21 | 15 | (pprint '(ext:with-float-traps-masked (:underflow)
|
22 | - (let* ((ratio (/ (* (expt 10 exponent) number)
|
|
23 | - divisor))
|
|
24 | - (result (coerce ratio float-format)))
|
|
25 | - (when (and (zerop result) (not (zerop number)))
|
|
26 | - (error "Underflow"))
|
|
27 | - result))
|
|
16 | + (print "Hello"))
|
|
28 | 17 | s))))
|
29 | 18 | |
30 | 19 | (define-test pprint.with-float-traps-enabled
|
... | ... | @@ -32,22 +21,8 @@ |
32 | 21 | (assert-equal
|
33 | 22 | "
|
34 | 23 | (WITH-FLOAT-TRAPS-ENABLED (:UNDERFLOW)
|
35 | - (LET* ((RATIO
|
|
36 | - (/ (* (EXPT 10 PPRINT-TESTS::EXPONENT) NUMBER)
|
|
37 | - PPRINT-TESTS::DIVISOR))
|
|
38 | - (PPRINT-TESTS::RESULT (COERCE RATIO PPRINT-TESTS::FLOAT-FORMAT)))
|
|
39 | - (WHEN (AND (ZEROP PPRINT-TESTS::RESULT) (NOT (ZEROP NUMBER)))
|
|
40 | - (ERROR \"Underflow\"))
|
|
41 | - PPRINT-TESTS::RESULT))"
|
|
24 | + (PRINT \"Hello\"))"
|
|
42 | 25 | (with-output-to-string (s)
|
43 | 26 | (pprint '(ext:with-float-traps-enabled (:underflow)
|
44 | - (let* ((ratio (/ (* (expt 10 exponent) number)
|
|
45 | - divisor))
|
|
46 | - (result (coerce ratio float-format)))
|
|
47 | - (when (and (zerop result) (not (zerop number)))
|
|
48 | - (error "Underflow"))
|
|
49 | - result))
|
|
27 | + (print "Hello"))
|
|
50 | 28 | s)))) |
51 | - |
|
52 | - |
|
53 | - |