Boost logo

Boost :

From: Boris Gubenko (Boris.Gubenko_at_[hidden])
Date: 2006-12-06 14:03:50


Johan Rede wrote:

> Your processor is a bit odd!
> It does not have denorms, inifinity and NaN,
> except that long double does have denorms.
> (Look at min/2 and min/256 in the output from the inspect tool.)
>

As Markus pointed out, it is not the processor itself: one needs to
compile -ieee in order to get full support of ANSI/IEEE Standard 754-1985.

For your library, compiling with cxx on Tru64 without -ieee makes little
sense. Likewise, on AlphaVMS, it should be compiled /float=ieee/ieee=denorm.
On iVMS, i.e. VMS on ia64, the full support for IEEE features is on by
default.

> std::numeric_limits incorrectly states
> that long double does not have denorms.
> Fortunately my library does not use std::numeric_limits.

Again, you need to compile with -ieee -- see below. Relatively recently,
I fixed a problem with denorm_min() for std::numeric_limits<long double>
for all three platforms: Tru64, AlphaVMS and iVMS. I'm not sure if the fix
is in the RW library Markus is using, but if your library does not use
std::numeric_limits, it is not affected by this bug.

> I think now we are done.
> The current version (v.20) may very well become the final version.

Where can I download your library and the inspect tool from? I'd like
to try it on AlphaVMS and iVMS.

Thanks,
  Boris

x.cxx
-----
#include <limits>
#include <stdio.h>

main() {
  printf("%d\n", std::numeric_limits<long double>().has_denorm);
}

cxxosf.zko.hp.com> cxx -V
Compaq C++ V7.1-006 for Compaq Tru64 UNIX V5.1B (Rev. 2650)
Compiler Driver V7.1-006 (cxx) cxx Driver
cxxosf.zko.hp.com> cxx -ieee x.cxx && a.out
1
cxxosf.zko.hp.com> cxx x.cxx && a.out
0
cxxosf.zko.hp.com>

CXXC::_3> cxx/ver
HP C++ X7.3-007 for OpenVMS Alpha V7.3-2
CXXC::_3> pipe cxx/float=ieee/ieee=denorm x.cxx ; cxxl x.obj ; run x.exe
1
CXXC::_3>

ICXX::_2> cxx/ver
HP C++ V7.2-021 on OpenVMS IA64 V8.3
ICXX::_2> pipe cxx x.cxx ; cxxl x.obj ; run x.exe
1
ICXX::_2>

----- Original Message -----
From: "Johan Råde" <rade_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, December 06, 2006 7:46 AM
Subject: Re: [boost] Optimized portable isnan, isfinite, fpclassify etc

> Markus,
>
> Now all tests have passed, even without -ieee.
>
> Your processor is a bit odd!
> It does not have denorms, inifinity and NaN,
> except that long double does have denorms.
> (Look at min/2 and min/256 in the output from the inspect tool.)
>
> std::numeric_limits incorrectly states
> that long double does not have denorms.
> Fortunately my library does not use std::numeric_limits.
>
> I think now we are done.
> The current version (v.20) may very well become the final version.
>
> Thanks for the help.
>
> --Johan
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk