summary refs log tree commit diff stats
path: root/rod/rodutils.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-04-12 01:13:42 +0200
committerAraq <rumpf_a@web.de>2011-04-12 01:13:42 +0200
commitcd292568d775d55d9abb51e962882ecda12c03a9 (patch)
tree85451f0e1f17dc0463350915f12bdd0a82a73455 /rod/rodutils.nim
parent46c41e43690cba9bc1caff6a994bb6915df8a1b7 (diff)
downloadNim-cd292568d775d55d9abb51e962882ecda12c03a9.tar.gz
big repo cleanup
Diffstat (limited to 'rod/rodutils.nim')
-rwxr-xr-xrod/rodutils.nim27
1 files changed, 0 insertions, 27 deletions
diff --git a/rod/rodutils.nim b/rod/rodutils.nim
deleted file mode 100755
index dad5d679f..000000000
--- a/rod/rodutils.nim
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#
-#           The Nimrod Compiler
-#        (c) Copyright 2011 Andreas Rumpf
-#
-#    See the file "copying.txt", included in this
-#    distribution, for details about the copyright.
-#
-
-## Utilities for the compiler. Aim is to reduce the coupling between 
-## the compiler and the evolving stdlib.
-
-proc c_sprintf(buf, frmt: cstring) {.importc: "sprintf", nodecl, varargs.}
-
-proc ToStrMaxPrecision*(f: BiggestFloat): string = 
-  if f != f:
-    result = "NAN"
-  elif f == 0.0:
-    result = "0.0"
-  elif f == 0.5 * f:
-    if f > 0.0: result = "INF"
-    else: result = "-INF"
-  else:
-    var buf: array [0..80, char]    
-    c_sprintf(buf, "%#.16e", f) 
-    result = $buf
-