mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Issue #2531 - Adjust rounding in toExponential (and kin) to round up at midpoint.
Resolves #2531
This commit is contained in:
parent
f4b6cee0cc
commit
ef1f142cde
1 changed files with 3 additions and 2 deletions
|
|
@ -1,9 +1,10 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
||||
/****************************************************************
|
||||
*
|
||||
* The author of this software is David M. Gay.
|
||||
* The original author of this software is David M. Gay.
|
||||
*
|
||||
* Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
|
||||
* Copyright (c) 2024 by Moonchild Productions.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose without fee is hereby granted, provided that this entire notice
|
||||
|
|
@ -2958,7 +2959,7 @@ dtoa
|
|||
}
|
||||
#endif
|
||||
dval(d) += dval(d);
|
||||
if (dval(d) > ds || (dval(d) == ds && L & 1)) {
|
||||
if (dval(d) >= ds) {
|
||||
bump_up:
|
||||
while(*--s == '9')
|
||||
if (s == s0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue