bugfix: complex.nim compiles

This commit is contained in:
Andreas Rumpf
2010-04-04 18:43:57 +02:00
parent f530bbd631
commit b2ad7b30dc
7 changed files with 55 additions and 79 deletions

View File

@@ -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__) \

View File

@@ -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.}

0
lib/wrappers/tinyc.nim Normal file → Executable file
View File