Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
c45abcaf
Commit
c45abcaf
authored
Oct 07, 2004
by
Tobias Schlüter
Committed by
Tobias Schlüter
Oct 07, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
From-SVN: r88647
parent
9e749a8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
gcc/fortran/ChangeLog
+2
-0
gcc/fortran/simplify.c
+2
-11
No files found.
gcc/fortran/ChangeLog
View file @
c45abcaf
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
* simplify.c (twos_complement): New function.
* simplify.c (twos_complement): New function.
(gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
(gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
* simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2004-10-06 Paul Brook <paul@codesourcery.com>
2004-10-06 Paul Brook <paul@codesourcery.com>
* trans-stmt.c (gfc_trans_simple_do): New function.
* trans-stmt.c (gfc_trans_simple_do): New function.
...
...
gcc/fortran/simplify.c
View file @
c45abcaf
...
@@ -176,7 +176,6 @@ gfc_expr *
...
@@ -176,7 +176,6 @@ gfc_expr *
gfc_simplify_abs
(
gfc_expr
*
e
)
gfc_simplify_abs
(
gfc_expr
*
e
)
{
{
gfc_expr
*
result
;
gfc_expr
*
result
;
mpfr_t
a
,
b
;
if
(
e
->
expr_type
!=
EXPR_CONSTANT
)
if
(
e
->
expr_type
!=
EXPR_CONSTANT
)
return
NULL
;
return
NULL
;
...
@@ -203,17 +202,9 @@ gfc_simplify_abs (gfc_expr * e)
...
@@ -203,17 +202,9 @@ gfc_simplify_abs (gfc_expr * e)
result
=
gfc_constant_result
(
BT_REAL
,
e
->
ts
.
kind
,
&
e
->
where
);
result
=
gfc_constant_result
(
BT_REAL
,
e
->
ts
.
kind
,
&
e
->
where
);
gfc_set_model_kind
(
e
->
ts
.
kind
);
gfc_set_model_kind
(
e
->
ts
.
kind
);
mpfr_init
(
a
);
mpfr_init
(
b
);
/* FIXME: Possible numerical problems. */
mpfr_mul
(
a
,
e
->
value
.
complex
.
r
,
e
->
value
.
complex
.
r
,
GFC_RND_MODE
);
mpfr_mul
(
b
,
e
->
value
.
complex
.
i
,
e
->
value
.
complex
.
i
,
GFC_RND_MODE
);
mpfr_add
(
a
,
a
,
b
,
GFC_RND_MODE
);
mpfr_sqrt
(
result
->
value
.
real
,
a
,
GFC_RND_MODE
);
mpfr_clear
(
a
);
mpfr_clear
(
b
);
mpfr_hypot
(
result
->
value
.
real
,
e
->
value
.
complex
.
r
,
e
->
value
.
complex
.
i
,
GFC_RND_MODE
);
result
=
range_check
(
result
,
"CABS"
);
result
=
range_check
(
result
,
"CABS"
);
break
;
break
;
...
...
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