diff options
author | Arne Döring <arne.doering@gmx.net> | 2018-04-15 19:59:11 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-15 19:59:11 +0200 |
commit | efae3668570b51fa14483663d1979a6a8a6852fe (patch) | |
tree | 6db0ac8604f30ceb67b2689b3ab37263dc225b62 /tests/tuples/tuple_with_nil.nim | |
parent | b98cd3bf348a41778f475e835b86ab9175125789 (diff) | |
download | Nim-efae3668570b51fa14483663d1979a6a8a6852fe.tar.gz |
rename SomeReal to SomeFloat (#7617)
* rename SomeReal to SomeFloat * added changelog entry
Diffstat (limited to 'tests/tuples/tuple_with_nil.nim')
-rw-r--r-- | tests/tuples/tuple_with_nil.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/tuples/tuple_with_nil.nim b/tests/tuples/tuple_with_nil.nim index eb265f420..ec48337bd 100644 --- a/tests/tuples/tuple_with_nil.nim +++ b/tests/tuples/tuple_with_nil.nim @@ -353,7 +353,7 @@ proc writeformat(o: var Writer; p: pointer; fmt: Format) = f.baseprefix = true writeformat(o, add, cast[uint](p), f) -proc writeformat(o: var Writer; x: SomeReal; fmt: Format) = +proc writeformat(o: var Writer; x: SomeFloat; fmt: Format) = ## Write real number `x` according to format `fmt` using output ## object `o` and output function `add`. var fmt = fmt @@ -401,8 +401,8 @@ proc writeformat(o: var Writer; x: SomeReal; fmt: Format) = else: len += 4 # exponent # shift y so that 1 <= abs(y) < 2 - if exp > 0: y /= pow(10.SomeReal, abs(exp).SomeReal) - elif exp < 0: y *= pow(10.SomeReal, abs(exp).SomeReal) + if exp > 0: y /= pow(10.SomeFloat, abs(exp).SomeFloat) + elif exp < 0: y *= pow(10.SomeFloat, abs(exp).SomeFloat) elif fmt.typ == ftPercent: len += 1 # percent sign @@ -413,7 +413,7 @@ proc writeformat(o: var Writer; x: SomeReal; fmt: Format) = var mult = 1'i64 for i in 1..prec: mult *= 10 var num = y.int64 - var fr = ((y - num.SomeReal) * mult.SomeReal).int64 + var fr = ((y - num.SomeFloat) * mult.SomeFloat).int64 # build integer part string while num != 0: numstr[numlen] = ('0'.int + (num mod 10)).char |