mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08: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:
@ -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
|
||||
|
Reference in New Issue
Block a user