mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
sim/sh: use fabs instead of abs
The sh simulator incorrectly uses integer abs instead of the floating point fabs on some floating point values, fixed in this commit.
This commit is contained in:
parent
b2829fcf9b
commit
ffa2d04822
1 changed files with 1 additions and 1 deletions
|
|
@ -1401,7 +1401,7 @@ fsca_s (int in, double (*f) (double))
|
|||
lower = result - error;
|
||||
frac = frexp (lower, &exp);
|
||||
lower = ldexp (ceil (ldexp (frac, 24)), exp - 24);
|
||||
return abs (upper - result) >= abs (lower - result) ? upper : lower;
|
||||
return fabs (upper - result) >= fabs (lower - result) ? upper : lower;
|
||||
}
|
||||
|
||||
static float
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue