Bug 4870 - win portability: fix IS_NEGATIVE_ZERO macro in simple_number.h
Summary: win portability: fix IS_NEGATIVE_ZERO macro in simple_number.h
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: PC Windows XP
: P2 Normal
Assignee: Maciej Stachowiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-06 19:53 PDT by Krzysztof Kowalczyk
Modified: 2005-09-10 22:11 PDT (History)
0 users

See Also:


Attachments
fix IS_NEGATIVE_ZERO macro on win (647 bytes, patch)
2005-09-06 19:54 PDT, Krzysztof Kowalczyk
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Kowalczyk 2005-09-06 19:53:59 PDT
#define IS_NEGATIVE_ZERO(num) (_fpclass(num) == _FPCLASS_NZ) 

is much better test for negative zero on windows than

#define IS_NEGATIVE_ZERO(num) (num == 0.0 && !memcmp(&num, 
&SimpleNumber::negZero, sizeof(double)))

This reduces number of jsc tests failed on win from 86 to 75.
Comment 1 Krzysztof Kowalczyk 2005-09-06 19:54:38 PDT
Created attachment 3790 [details]
fix IS_NEGATIVE_ZERO macro on win
Comment 2 Darin Adler 2005-09-06 22:42:20 PDT
Comment on attachment 3790 [details]
fix IS_NEGATIVE_ZERO macro on win

r=me