result = result * 10 + getDigitPos(magnitude - scale);
}
if (isNegative()) {
- return static_cast<int64_t>(~result + 1); // i.e., -result
+ return static_cast<int64_t>(0LL - result); // i.e., -result
}
return static_cast<int64_t>(result);
}
// © 2018 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <stdlib.h>
-#include <cmath>
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
// Helpful in toString methods and elsewhere.
#define UNISTR_FROM_STRING_EXPLICIT
+#include <stdlib.h>
+#include <cmath>
#include "number_types.h"
#include "number_utils.h"
#include "charstr.h"