Topic: Are floating-point subnormals allowed?
Author: fernando_cacciola@hotmail.com ("Fernando Cacciola")
Date: Fri, 12 Dec 2003 19:51:08 +0000 (UTC) Raw View
AFAICS, the Standard doesn't _mention_ FP subnormals; for instance,
numeric_limits<a_float_type>::min() returns the smallest positive _normalized_ value.
However, does it mean that the use of denormalized values render a program non-conformat?
IOWs, a traits class with something like:
static T really_smallest() { return
platform_dependent_really_smallest_fp_value_possibly_denormalized ; }
could be considered standard conformat?
Or are subnormals entirely forbidden?
Fernando Cacciola
SciSoft
--
Fernando Cacciola
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
Author: petebecker@acm.org (Pete Becker)
Date: Fri, 12 Dec 2003 22:22:25 +0000 (UTC) Raw View
Fernando Cacciola wrote:
>
> AFAICS, the Standard doesn't _mention_ FP subnormals; for instance,
> numeric_limits<a_float_type>::min() returns the smallest positive _normalized_ value.
>
> However, does it mean that the use of denormalized values render a program non-conformat?
>
No, they're allowed. numeric_limits also provides has_denorm and
denorm_min().
--
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]