<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>
Raymond Toy pushed to branch rtoy-setexception-inexact
at <a href="https://gitlab.common-lisp.net/cmucl/cmucl">cmucl / cmucl</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/fc1c9daa7fa37857e699bdc8c291c2b7398c1e54">fc1c9daa</a></strong>
<div>
<span>by Raymond Toy</span>
<i>at 2015-12-28T10:31:55Z</i>
</div>
<pre class='commit-message'>Replace with-inexact-exception-enabled with with-float-traps-enabled.</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
tests/fdlibm.lisp
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.common-lisp.net/cmucl/cmucl/commit/fc1c9daa7fa37857e699bdc8c291c2b7398c1e54#diff-0'>
<strong>
tests/fdlibm.lisp
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/fdlibm.lisp
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/fdlibm.lisp
</span><span style="color: #aaaaaa">@@ -14,11 +14,6 @@
</span>   (kernel:make-double-float #x7ff00000 1)
   "A randon signaling MaN value")
 
<span style="color: #000000;background-color: #ffdddd">-(defmacro with-inexact-exception-enabled (&body body)
-  `(ext:with-float-traps-enabled (:inexact)
-     ,@body))
-
-
</span> (define-test %cosh.exceptions
   (:tag :fdlibm)
   (assert-error 'floating-point-overflow
<span style="color: #aaaaaa">@@ -68,11 +63,11 @@
</span>   ;; sinh(x) = x for |x| < 2^-28.  Should signal inexact unless x = 0.
   (let ((x (scale-float 1d0 -29))
        (x0 0d0))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must not throw an inexact exception because the result
        ;; is exact when the arg is 0.
        (assert-eql 0d0 (kernel:%sinh x0)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
<span style="color: #aaaaaa">@@ -87,7 +82,7 @@
</span>     (assert-true (ext:float-nan-p (kernel:%tanh *snan*))))
   ;; tanh(x) = +/- 1 for |x| > 22, raising inexact, always.
   (let ((x 22.1d0))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
<span style="color: #aaaaaa">@@ -123,11 +118,11 @@
</span>     (assert-true (ext:float-nan-p (kernel:%asinh *snan*))))
   (let ((x (scale-float 1d0 -29))
        (x0 0d0))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must not throw an inexact exception because the result
        ;; is exact when the arg is 0.
        (assert-eql 0d0 (asinh x0)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
<span style="color: #aaaaaa">@@ -169,7 +164,7 @@
</span>     (assert-true (ext::float-nan-p (kernel:%expm1 *snan*))))
   ;; expm1(x) = -1 for x < -56*log(2), signaling inexact
   (let ((x (* -57 (log 2d0))))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   (assert-error 'floating-point-inexact
                      (kernel:%expm1 x)))))
 
<span style="color: #aaaaaa">@@ -188,11 +183,11 @@
</span>   ;; log1p(x) = x for |x| < 2^-54, signaling inexact except for x = 0.
   (let ((x (scale-float 1d0 -55))
        (x0 0d0))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must not throw an inexact exception because the result
        ;; is exact when the arg is 0.
        (assert-eql 0d0 (kernel:%log1p x0)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
<span style="color: #aaaaaa">@@ -222,11 +217,11 @@
</span>   (let ((x (scale-float 1d0 -29))
        (x0 0d0))
     ;; exp(x) = x, |x| < 2^-28, with inexact exception unlees x = 0
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must not throw an inexact exception because the result
        ;; is exact when the arg is 0.
        (assert-eql 1d0 (kernel:%exp x0)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
<span style="color: #aaaaaa">@@ -282,11 +277,11 @@
</span>   ;; atan(x) = x for |x| < 2^-29, signaling inexact.
   (let ((x (scale-float 1d0 -30))
        (x0 0d0))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must not throw an inexact exception because the result
        ;; is exact when the arg is 0.
        (assert-eql 0d0 (kernel:%atan x0)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
<span style="color: #aaaaaa">@@ -630,11 +625,11 @@
</span>     ;; asin(x) = x for |x| < 2^-27, with inexact exception if x is not 0.
     (assert-eql x (kernel:%asin x))
     (assert-eql (- x) (kernel:%asin (- x)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must not throw an inexact exception because the result
        ;; is exact when the arg is 0.
        (assert-eql 0d0 (kernel:%asin x0)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
<span style="color: #aaaaaa">@@ -645,11 +640,11 @@
</span>   ;; cos(x) = 1 for |x| < 2^-27.  Signal inexact unless x = 0
   (let ((x (scale-float 1d0 -28))
        (x0 0d0))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must not throw an inexact exception because the result
        ;; is exact when the arg is 0.
        (assert-eql 1d0 (kernel:%cos x0)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
<span style="color: #aaaaaa">@@ -660,11 +655,11 @@
</span>   ;; sin(x) = x for |x| < 2^-27.  Signal inexact unless x = 0
   (let ((x (scale-float 1d0 -28))
        (x0 0d0))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must not throw an inexact exception because the result
        ;; is exact when the arg is 0.
        (assert-eql 0d0 (kernel:%sin x0)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
<span style="color: #aaaaaa">@@ -675,11 +670,11 @@
</span>   ;; tan(x) = x for |x| < 2^-28.  Signal inexact unless x = 0
   (let ((x (scale-float 1d0 -29))
        (x0 0d0))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must not throw an inexact exception because the result
        ;; is exact when the arg is 0.
        (assert-eql 0d0 (kernel:%tan x0)))
<span style="color: #000000;background-color: #ffdddd">-    (with-inexact-exception-enabled
</span><span style="color: #000000;background-color: #ddffdd">+    (ext:with-float-traps-enabled (:inexact)
</span>   ;; This must throw an inexact exception for non-zero x even
        ;; though the result is exactly x.
        (assert-error 'floating-point-inexact
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/fc1c9daa7fa37857e699bdc8c291c2b7398c1e54">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.common-lisp.net.
If you'd like to receive fewer emails, you can adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.common-lisp.net/cmucl/cmucl/commit/fc1c9daa7fa37857e699bdc8c291c2b7398c1e54"}}</script>
</p>
</div>
</body>
</html>