문제

HP-UX's libc has the function fesetflushtozero to switch floating-point behavior between “gradual underflow” and “flush to zero”. How to achieve the same thing on a system running glibc?

도움이 되었습니까?

해결책

There is no mention of support for this in the glibc manual. It is not a standard IEEE-754 feature and does not exist on all processors, even those with hardware support for floating-point.

Some processors suffer a performance deficiency when operating on subnormal numbers. Flush-to-zero is a deviation from IEEE 754 that provides a work-around for this. It should generally be avoided, and manufacturers should be asked to provide good performance while conforming to the standard.

If you must use it, you will need target-specific methods of doing so, likely with assembly code or special routines provided by a vendor.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top