summaryrefslogtreecommitdiff
path: root/lib/math/round-impl.myr
diff options
context:
space:
mode:
authorS. Gilles <sgilles@math.umd.edu>2018-05-10 10:42:25 -0400
committerS. Gilles <sgilles@math.umd.edu>2018-05-10 10:42:25 -0400
commit66a472dc689c3a7b2b8f077fdf01c0dc2fdc1f7d (patch)
treeed949586ac1c84b852324941b0e730064cc6b898 /lib/math/round-impl.myr
parent3853fa79b7d297f4bd3aaf318a147a95dd088bc9 (diff)
downloadmc-66a472dc689c3a7b2b8f077fdf01c0dc2fdc1f7d.tar.gz
Use x as input variable instead of f.
Some algorithm descriptions use f as an auxiliary variable. Since we attempt to match variable naming to the relevant algorithm description, this becomes a problem. For uniformity, change everywhere.
Diffstat (limited to 'lib/math/round-impl.myr')
-rw-r--r--lib/math/round-impl.myr12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/math/round-impl.myr b/lib/math/round-impl.myr
index dc35869..589344f 100644
--- a/lib/math/round-impl.myr
+++ b/lib/math/round-impl.myr
@@ -3,14 +3,14 @@ use std
use "util"
pkg math =
- const rn64 : (f : flt64 -> int64)
- const rn32 : (f : flt32 -> int32)
+ const rn64 : (x : flt64 -> int64)
+ const rn32 : (x : flt32 -> int32)
;;
-const rn64 = {f : flt64
+const rn64 = {x : flt64
var n : bool, e : int64, s : uint64
- (n, e, s) = std.flt64explode(f)
+ (n, e, s) = std.flt64explode(x)
if e >= 63
-> -9223372036854775808
@@ -38,10 +38,10 @@ const rn64 = {f : flt64
;;
}
-const rn32 = {f : flt32
+const rn32 = {x : flt32
var n : bool, e : int32, s : uint32
- (n, e, s) = std.flt32explode(f)
+ (n, e, s) = std.flt32explode(x)
if e >= 31
-> -2147483648