On 8 September 2016 at 08:21, Sebastian Lackner sebastian@fds-team.de wrote:
Yes, there are really bool_and and bool_or reduction operations for float/double. I decided to explicitly write down the comparison with 0.0 in this case because it otherwise looks like a mistake. According to my tests all values != 0.0 are seen as true (without any small epsilon to avoid rounding errors... well).
I'd expect it to just look at the bit pattern, but just for laughs, what about -0.0f?
On 08.09.2016 11:18, Henri Verbeet wrote:
On 8 September 2016 at 08:21, Sebastian Lackner sebastian@fds-team.de wrote:
Yes, there are really bool_and and bool_or reduction operations for float/double. I decided to explicitly write down the comparison with 0.0 in this case because it otherwise looks like a mistake. According to my tests all values != 0.0 are seen as true (without any small epsilon to avoid rounding errors... well).
I'd expect it to just look at the bit pattern, but just for laughs, what about -0.0f?
Thanks for the feedback. I've sent an updated version including tests for -0.0, which shows that the current implementation matches Windows behavior. Of course that does not necessarily mean that they implement it the same way, but its at least not just matching the bit pattern of +0.0.
Regards, Sebastian