Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
cbb94b1f
Commit
cbb94b1f
authored
Nov 06, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Improved strtod_l precision.
parent
505e5a16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
string.c
dlls/msvcrt/string.c
+12
-5
No files found.
dlls/msvcrt/string.c
View file @
cbb94b1f
...
@@ -291,7 +291,8 @@ double CDECL MSVCRT_strtod_l( const char *str, char **end, MSVCRT__locale_t loca
...
@@ -291,7 +291,8 @@ double CDECL MSVCRT_strtod_l( const char *str, char **end, MSVCRT__locale_t loca
int
exp
=
0
,
sign
=
1
;
int
exp
=
0
,
sign
=
1
;
const
char
*
p
;
const
char
*
p
;
double
ret
;
double
ret
;
BOOL
found_digit
=
FALSE
;
long
double
lret
=
1
,
expcnt
=
10
;
BOOL
found_digit
=
FALSE
,
negexp
;
if
(
!
MSVCRT_CHECK_PMT
(
str
!=
NULL
))
return
0
;
if
(
!
MSVCRT_CHECK_PMT
(
str
!=
NULL
))
return
0
;
...
@@ -378,10 +379,16 @@ double CDECL MSVCRT_strtod_l( const char *str, char **end, MSVCRT__locale_t loca
...
@@ -378,10 +379,16 @@ double CDECL MSVCRT_strtod_l( const char *str, char **end, MSVCRT__locale_t loca
_control87
(
MSVCRT__EM_DENORMAL
|
MSVCRT__EM_INVALID
|
MSVCRT__EM_ZERODIVIDE
_control87
(
MSVCRT__EM_DENORMAL
|
MSVCRT__EM_INVALID
|
MSVCRT__EM_ZERODIVIDE
|
MSVCRT__EM_OVERFLOW
|
MSVCRT__EM_UNDERFLOW
|
MSVCRT__EM_INEXACT
,
0xffffffff
);
|
MSVCRT__EM_OVERFLOW
|
MSVCRT__EM_UNDERFLOW
|
MSVCRT__EM_INEXACT
,
0xffffffff
);
if
(
exp
>
0
)
negexp
=
(
exp
<
0
);
ret
=
(
double
)
sign
*
d
*
pow
(
10
,
exp
);
if
(
negexp
)
else
exp
=
-
exp
;
ret
=
(
double
)
sign
*
d
/
pow
(
10
,
-
exp
);
while
(
exp
)
{
if
(
exp
&
1
)
lret
*=
expcnt
;
exp
/=
2
;
expcnt
=
expcnt
*
expcnt
;
}
ret
=
(
long
double
)
sign
*
(
negexp
?
d
/
lret
:
d
*
lret
);
_control87
(
fpcontrol
,
0xffffffff
);
_control87
(
fpcontrol
,
0xffffffff
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment