summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/nimbase.h4
-rwxr-xr-xlib/pure/complex.nim4
-rwxr-xr-x[-rw-r--r--]lib/wrappers/tinyc.nim0
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/nimbase.h b/lib/nimbase.h
index dc0ac6e0f..c7b3e551d 100755
--- a/lib/nimbase.h
+++ b/lib/nimbase.h
@@ -22,7 +22,9 @@ __TINYC__
 #ifndef NIMBASE_H
 #define NIMBASE_H
 
-#include  <math.h>
+#if !defined(__TINYC__)
+#  include  <math.h>
+#endif
 
 /* calling convention mess ----------------------------------------------- */
 #if defined(__GNUC__) || defined(__LCC__) || defined(__POCC__) \
diff --git a/lib/pure/complex.nim b/lib/pure/complex.nim
index f597a09e1..c06451ca8 100755
--- a/lib/pure/complex.nim
+++ b/lib/pure/complex.nim
@@ -1,7 +1,7 @@
 #
 #
 #            Nimrod's Runtime Library
-#        (c) Copyright 2006 Andreas Rumpf
+#        (c) Copyright 2010 Andreas Rumpf
 #
 #    See the file "copying.txt", included in this
 #    distribution, for details about the copyright.
@@ -101,6 +101,6 @@ proc sqrt*(z: TComplex): TComplex =
     else:
       if z.im >= 0.0: result.im = w
       else:           result.im = -w
-      result.re = z.im / (c.im + c.im)
+      result.re = z.im / (result.im + result.im)
 
 {.pop.}
diff --git a/lib/wrappers/tinyc.nim b/lib/wrappers/tinyc.nim
index f685c714d..f685c714d 100644..100755
--- a/lib/wrappers/tinyc.nim
+++ b/lib/wrappers/tinyc.nim