- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: C++ Standard Library IOStreams floating-point ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2006 09:10 AM
01-25-2006 09:10 AM
C++ Standard Library IOStreams floating-point problem
of this C++ problem.
According to the HP C++ User's Guide:
http://h71000.www7.hp.com/commercial/cplus/docs/ugv_stl.html#_sec
7.1.7 IOStreams Expects Default Floating-Point Format
The C++ standard library IOStreams expects floating-point values in the
default floating-point format for each platform: G_FLOAT on Alpha
systems and IEEE on I64 systems. Using standard library IOStreams for
processing floating-point values in a different format (for example, in
a program compiled /FLOAT=IEEE on Alpha or /FLOAT=G_FLOAT on I64) is not
supported. The C++ class library does not have this restriction.
Here, "is not supported" is a gentle euphemism
for "doesn't work". The current SETI@home
client, for example, uses IOStreams, and also
expects IEEE floating-point. The restriction
described above makes this impossible on Alpha.
It would be nice if an IEEE edition of this
library were available on Alpha. Any hope?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2006 12:14 PM
01-26-2006 12:14 PM
Re: C++ Standard Library IOStreams floating-point problem
Time to search the source again, I guess. I don't know if it broke anything of ours, but I'd vote for an IEEE version of the library, too.
--Travis Craig
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2006 02:47 PM
01-26-2006 02:47 PM
Re: C++ Standard Library IOStreams floating-point problem
thing(s). The offending SETI@home code
comprises many statements like:
in >> center;
where "in" is a std::istringstream, and
"center" is a double. The use is like atof()
(or atol[l]() for the integers), apparently,
but so much more cute. They use this stuff
to parse the data in a some ".xml" file(s).
Works fine for integers, too, but the
results are nonsense for floating-point
variables, due to the format difference.
The SETI@home code has hundreds of these,
making manual conversion to harmless, old
code more work than I can justify.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2006 06:50 PM
01-26-2006 06:50 PM
Re: C++ Standard Library IOStreams floating-point problem
>>>
in >> center;
...
The SETI@home code has hundreds of these,
making manual conversion to harmless, old
code more work than I can justify.
<<<
Perhaps one could subclass IOStreams, overwriting operator>> to do the Right Thing(TM). That way not the uses of "in" et al. would have to be reworked, but just the declarations.
Just an idea...
cu,
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2006 01:38 AM
01-27-2006 01:38 AM
Re: C++ Standard Library IOStreams floating-point problem
As soon as I learn enough C++ to give this
a try, I may give this a try. (Unless
someone who knows something tells me before
then that it's really hopeless.)