- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe I have found a bug in the SPACING intrinsic when very small quad precision numbers are used. I am using version 10.1 of the linux 64 compiler, so if bug has already been fixed, please disregard this post.
It appears that when the true spacing between quad precision numbers falls below TINY, SPACING returns a nonsensical very large value. For example, SPACING(1Q-4898) = 3.362Q-4932 (equal to TINY), while SPACING(1Q-4899) = 1.487Q+4931 (notice the positive exponent). I even find SPACING(0Q0) = 4.583Q+4898.
A test program and output are attached.
It appears that when the true spacing between quad precision numbers falls below TINY, SPACING returns a nonsensical very large value. For example, SPACING(1Q-4898) = 3.362Q-4932 (equal to TINY), while SPACING(1Q-4899) = 1.487Q+4931 (notice the positive exponent). I even find SPACING(0Q0) = 4.583Q+4898.
A test program and output are attached.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your test program behaves correctly with the 12.0.3 compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> For example, SPACING(1Q-4898) = 3.362Q-4932 (equal to TINY)
This is correct, since SPACING(x) = TINY for | x | < TINY. In other words, SPACING gives only normalized numbers.
This is correct, since SPACING(x) = TINY for | x | < TINY. In other words, SPACING gives only normalized numbers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting mecej4
> For example, SPACING(1Q-4898) = 3.362Q-4932 (equal to TINY)
This is correct, since SPACING(x) = TINY for | x | < TINY. In other words, SPACING gives only normalized numbers.
This is correct, since SPACING(x) = TINY for | x | < TINY. In other words, SPACING gives only normalized numbers.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page