Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
memset all bits to zero will let float/double to zero?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Tim Prince, post: 1714381"] On a machine with no bias in the exponent, without a hidden mantissa bit, all-bits-zero is an un-normalized floating point zero. As such machines did not have gradual underflow, performing arithmetic between such operands and other operands of magnitude < 0.5 gave truncated results. For example, had <float.h> been implemented at that time, 0.9*LDBL_EPSILON + <all-bits-zero> would give 0.0. One of the early C implementations (gcos) was on such a machine. I over-simplify, since "long double" was not supported as a memory storage data type, only in register. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
memset all bits to zero will let float/double to zero?
Top