Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Value: why not float support?
Re: Value: why not float support? [message #28441 is a reply to message #28417] Thu, 02 September 2010 09:40 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
gprentice wrote on Wed, 01 September 2010 07:52

Quote:

Are you aware that C/C++ always performs all FP arithmetics in double precision by standard definition?


As far as I can see this is not true. The C++ standard incorporates part of the ISO C standard by reference, including 5.2.4.2.2 where this is specified. I don't have the C90 standard but the C99 standard specifies that FLT_EVAL_METHOD IN float.h (cfloat in C++) has value zero if the calculation precision is the same as the operand precision and value 1 if the calculation precision is double. FLT_EVAL_METHOD wasn't part of C90 but it's very unlikely that C90 required double precision and C99 doesn't.

Also, double is required to have at least 10 significant decimal digits (DBL_DIG in cfloat) and floats at least 6 digits(FLT_DIG).

Graeme



Correct, I was wrong. Not sure where I got that info...
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Core/Path.cpp: the limitation of GetCurrentDirectory for POSIX
Next Topic: InitCaps() proposal
Goto Forum:
  


Current Time: Mon Aug 25 18:01:59 CEST 2025

Total time taken to generate the page: 0.06464 seconds