Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Husička
wine
Commits
44bf8dc4
Commit
44bf8dc4
authored
11 years ago
by
Andrey Zhezherun
Committed by
Alexandre Julliard
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msvcp: Fixed complex division.
parent
3bb2c117
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/msvcp71/math.c
+22
-18
22 additions, 18 deletions
dlls/msvcp71/math.c
dlls/msvcp80/math.c
+22
-18
22 additions, 18 deletions
dlls/msvcp80/math.c
dlls/msvcp90/math.c
+22
-18
22 additions, 18 deletions
dlls/msvcp90/math.c
with
66 additions
and
54 deletions
dlls/msvcp71/math.c
+
22
−
18
View file @
44bf8dc4
...
...
@@ -1087,6 +1087,7 @@ complex_float* __cdecl complex_float_add_cf(complex_float *ret, const complex_fl
/* ??$?KM@std@@YA?AV?$complex@M@0@AEBV10@0@Z */
complex_float
*
__cdecl
complex_float_div
(
complex_float
*
ret
,
const
complex_float
*
l
,
const
complex_float
*
r
)
{
float
tmp
,
den
;
if
((
!
r
->
real
&&
!
r
->
imag
)
||
_isnan
(
l
->
real
)
||
_isnan
(
l
->
imag
)
||
_isnan
(
r
->
real
)
||
_isnan
(
r
->
imag
))
{
ret
->
real
=
std_numeric_limits_float_quiet_NaN
();
...
...
@@ -1094,15 +1095,16 @@ complex_float* __cdecl complex_float_div(complex_float *ret, const complex_float
return
ret
;
}
ret
->
real
=
0
;
ret
->
imag
=
0
;
if
(
r
->
real
)
{
ret
->
real
=
l
->
real
/
r
->
real
;
ret
->
imag
=
l
->
imag
/
r
->
real
;
}
if
(
r
->
imag
)
{
ret
->
real
+=
l
->
imag
/
r
->
imag
;
ret
->
imag
-=
l
->
real
/
r
->
imag
;
if
(
fabsf
(
r
->
real
)
>=
fabsf
(
r
->
imag
))
{
tmp
=
r
->
imag
/
r
->
real
;
den
=
r
->
real
+
r
->
imag
*
tmp
;
ret
->
real
=
(
l
->
real
+
l
->
imag
*
tmp
)
/
den
;
ret
->
imag
=
(
l
->
imag
-
l
->
real
*
tmp
)
/
den
;
}
else
{
tmp
=
r
->
real
/
r
->
imag
;
den
=
r
->
real
*
tmp
+
r
->
imag
;
ret
->
real
=
(
l
->
real
*
tmp
+
l
->
imag
)
/
den
;
ret
->
imag
=
(
l
->
imag
*
tmp
-
l
->
real
)
/
den
;
}
return
ret
;
}
...
...
@@ -1705,6 +1707,7 @@ complex_double* __cdecl complex_double_add_cd(complex_double *ret, const complex
/* ??$?KO@std@@YA?AV?$complex@O@0@AEBV10@0@Z */
complex_double
*
__cdecl
complex_double_div
(
complex_double
*
ret
,
const
complex_double
*
l
,
const
complex_double
*
r
)
{
double
tmp
,
den
;
if
((
!
r
->
real
&&
!
r
->
imag
)
||
_isnan
(
l
->
real
)
||
_isnan
(
l
->
imag
)
||
_isnan
(
r
->
real
)
||
_isnan
(
r
->
imag
))
{
ret
->
real
=
std_numeric_limits_double_quiet_NaN
();
...
...
@@ -1712,15 +1715,16 @@ complex_double* __cdecl complex_double_div(complex_double *ret, const complex_do
return
ret
;
}
ret
->
real
=
0
;
ret
->
imag
=
0
;
if
(
r
->
real
)
{
ret
->
real
=
l
->
real
/
r
->
real
;
ret
->
imag
=
l
->
imag
/
r
->
real
;
}
if
(
r
->
imag
)
{
ret
->
real
+=
l
->
imag
/
r
->
imag
;
ret
->
imag
-=
l
->
real
/
r
->
imag
;
if
(
fabs
(
r
->
real
)
>=
fabs
(
r
->
imag
))
{
tmp
=
r
->
imag
/
r
->
real
;
den
=
r
->
real
+
r
->
imag
*
tmp
;
ret
->
real
=
(
l
->
real
+
l
->
imag
*
tmp
)
/
den
;
ret
->
imag
=
(
l
->
imag
-
l
->
real
*
tmp
)
/
den
;
}
else
{
tmp
=
r
->
real
/
r
->
imag
;
den
=
r
->
real
*
tmp
+
r
->
imag
;
ret
->
real
=
(
l
->
real
*
tmp
+
l
->
imag
)
/
den
;
ret
->
imag
=
(
l
->
imag
*
tmp
-
l
->
real
)
/
den
;
}
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/msvcp80/math.c
+
22
−
18
View file @
44bf8dc4
...
...
@@ -1087,6 +1087,7 @@ complex_float* __cdecl complex_float_add_cf(complex_float *ret, const complex_fl
/* ??$?KM@std@@YA?AV?$complex@M@0@AEBV10@0@Z */
complex_float
*
__cdecl
complex_float_div
(
complex_float
*
ret
,
const
complex_float
*
l
,
const
complex_float
*
r
)
{
float
tmp
,
den
;
if
((
!
r
->
real
&&
!
r
->
imag
)
||
_isnan
(
l
->
real
)
||
_isnan
(
l
->
imag
)
||
_isnan
(
r
->
real
)
||
_isnan
(
r
->
imag
))
{
ret
->
real
=
std_numeric_limits_float_quiet_NaN
();
...
...
@@ -1094,15 +1095,16 @@ complex_float* __cdecl complex_float_div(complex_float *ret, const complex_float
return
ret
;
}
ret
->
real
=
0
;
ret
->
imag
=
0
;
if
(
r
->
real
)
{
ret
->
real
=
l
->
real
/
r
->
real
;
ret
->
imag
=
l
->
imag
/
r
->
real
;
}
if
(
r
->
imag
)
{
ret
->
real
+=
l
->
imag
/
r
->
imag
;
ret
->
imag
-=
l
->
real
/
r
->
imag
;
if
(
fabsf
(
r
->
real
)
>=
fabsf
(
r
->
imag
))
{
tmp
=
r
->
imag
/
r
->
real
;
den
=
r
->
real
+
r
->
imag
*
tmp
;
ret
->
real
=
(
l
->
real
+
l
->
imag
*
tmp
)
/
den
;
ret
->
imag
=
(
l
->
imag
-
l
->
real
*
tmp
)
/
den
;
}
else
{
tmp
=
r
->
real
/
r
->
imag
;
den
=
r
->
real
*
tmp
+
r
->
imag
;
ret
->
real
=
(
l
->
real
*
tmp
+
l
->
imag
)
/
den
;
ret
->
imag
=
(
l
->
imag
*
tmp
-
l
->
real
)
/
den
;
}
return
ret
;
}
...
...
@@ -1705,6 +1707,7 @@ complex_double* __cdecl complex_double_add_cd(complex_double *ret, const complex
/* ??$?KO@std@@YA?AV?$complex@O@0@AEBV10@0@Z */
complex_double
*
__cdecl
complex_double_div
(
complex_double
*
ret
,
const
complex_double
*
l
,
const
complex_double
*
r
)
{
double
tmp
,
den
;
if
((
!
r
->
real
&&
!
r
->
imag
)
||
_isnan
(
l
->
real
)
||
_isnan
(
l
->
imag
)
||
_isnan
(
r
->
real
)
||
_isnan
(
r
->
imag
))
{
ret
->
real
=
std_numeric_limits_double_quiet_NaN
();
...
...
@@ -1712,15 +1715,16 @@ complex_double* __cdecl complex_double_div(complex_double *ret, const complex_do
return
ret
;
}
ret
->
real
=
0
;
ret
->
imag
=
0
;
if
(
r
->
real
)
{
ret
->
real
=
l
->
real
/
r
->
real
;
ret
->
imag
=
l
->
imag
/
r
->
real
;
}
if
(
r
->
imag
)
{
ret
->
real
+=
l
->
imag
/
r
->
imag
;
ret
->
imag
-=
l
->
real
/
r
->
imag
;
if
(
fabs
(
r
->
real
)
>=
fabs
(
r
->
imag
))
{
tmp
=
r
->
imag
/
r
->
real
;
den
=
r
->
real
+
r
->
imag
*
tmp
;
ret
->
real
=
(
l
->
real
+
l
->
imag
*
tmp
)
/
den
;
ret
->
imag
=
(
l
->
imag
-
l
->
real
*
tmp
)
/
den
;
}
else
{
tmp
=
r
->
real
/
r
->
imag
;
den
=
r
->
real
*
tmp
+
r
->
imag
;
ret
->
real
=
(
l
->
real
*
tmp
+
l
->
imag
)
/
den
;
ret
->
imag
=
(
l
->
imag
*
tmp
-
l
->
real
)
/
den
;
}
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/msvcp90/math.c
+
22
−
18
View file @
44bf8dc4
...
...
@@ -1087,6 +1087,7 @@ complex_float* __cdecl complex_float_add_cf(complex_float *ret, const complex_fl
/* ??$?KM@std@@YA?AV?$complex@M@0@AEBV10@0@Z */
complex_float
*
__cdecl
complex_float_div
(
complex_float
*
ret
,
const
complex_float
*
l
,
const
complex_float
*
r
)
{
float
tmp
,
den
;
if
((
!
r
->
real
&&
!
r
->
imag
)
||
_isnan
(
l
->
real
)
||
_isnan
(
l
->
imag
)
||
_isnan
(
r
->
real
)
||
_isnan
(
r
->
imag
))
{
ret
->
real
=
std_numeric_limits_float_quiet_NaN
();
...
...
@@ -1094,15 +1095,16 @@ complex_float* __cdecl complex_float_div(complex_float *ret, const complex_float
return
ret
;
}
ret
->
real
=
0
;
ret
->
imag
=
0
;
if
(
r
->
real
)
{
ret
->
real
=
l
->
real
/
r
->
real
;
ret
->
imag
=
l
->
imag
/
r
->
real
;
}
if
(
r
->
imag
)
{
ret
->
real
+=
l
->
imag
/
r
->
imag
;
ret
->
imag
-=
l
->
real
/
r
->
imag
;
if
(
fabsf
(
r
->
real
)
>=
fabsf
(
r
->
imag
))
{
tmp
=
r
->
imag
/
r
->
real
;
den
=
r
->
real
+
r
->
imag
*
tmp
;
ret
->
real
=
(
l
->
real
+
l
->
imag
*
tmp
)
/
den
;
ret
->
imag
=
(
l
->
imag
-
l
->
real
*
tmp
)
/
den
;
}
else
{
tmp
=
r
->
real
/
r
->
imag
;
den
=
r
->
real
*
tmp
+
r
->
imag
;
ret
->
real
=
(
l
->
real
*
tmp
+
l
->
imag
)
/
den
;
ret
->
imag
=
(
l
->
imag
*
tmp
-
l
->
real
)
/
den
;
}
return
ret
;
}
...
...
@@ -1705,6 +1707,7 @@ complex_double* __cdecl complex_double_add_cd(complex_double *ret, const complex
/* ??$?KO@std@@YA?AV?$complex@O@0@AEBV10@0@Z */
complex_double
*
__cdecl
complex_double_div
(
complex_double
*
ret
,
const
complex_double
*
l
,
const
complex_double
*
r
)
{
double
tmp
,
den
;
if
((
!
r
->
real
&&
!
r
->
imag
)
||
_isnan
(
l
->
real
)
||
_isnan
(
l
->
imag
)
||
_isnan
(
r
->
real
)
||
_isnan
(
r
->
imag
))
{
ret
->
real
=
std_numeric_limits_double_quiet_NaN
();
...
...
@@ -1712,15 +1715,16 @@ complex_double* __cdecl complex_double_div(complex_double *ret, const complex_do
return
ret
;
}
ret
->
real
=
0
;
ret
->
imag
=
0
;
if
(
r
->
real
)
{
ret
->
real
=
l
->
real
/
r
->
real
;
ret
->
imag
=
l
->
imag
/
r
->
real
;
}
if
(
r
->
imag
)
{
ret
->
real
+=
l
->
imag
/
r
->
imag
;
ret
->
imag
-=
l
->
real
/
r
->
imag
;
if
(
fabs
(
r
->
real
)
>=
fabs
(
r
->
imag
))
{
tmp
=
r
->
imag
/
r
->
real
;
den
=
r
->
real
+
r
->
imag
*
tmp
;
ret
->
real
=
(
l
->
real
+
l
->
imag
*
tmp
)
/
den
;
ret
->
imag
=
(
l
->
imag
-
l
->
real
*
tmp
)
/
den
;
}
else
{
tmp
=
r
->
real
/
r
->
imag
;
den
=
r
->
real
*
tmp
+
r
->
imag
;
ret
->
real
=
(
l
->
real
*
tmp
+
l
->
imag
)
/
den
;
ret
->
imag
=
(
l
->
imag
*
tmp
-
l
->
real
)
/
den
;
}
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment