Reply to Jarrett,

On Thu, Jun 4, 2009 at 2:20 PM, Denis Koroskin <[email protected]>
wrote:

because C (nor D) standard doesn't guaranty that float(0) will be
implemented as "all bits set to 0" on target platform (although it
currently holds true).

Actually, D does.

http://www.digitalmars.com/d/1.0/abi.html

D requires floating-point types to be IEEE 754 compliant (though the
current wording of 'real' might confusingly allow for other
standards).


I /think/ that it doesn't require that FP types be IEEE 754 types, just that they match the semantics (possibly with more accuracy). If you can assume that any FPU will be designed to work with IEEE 754 (would that be valid now days?), then you can assume that real will differ only by size. The only case I think you might need to look out for is where FP is done in software and at that point, what would real be anyway?


Reply via email to