mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-26 01:04:00 +00:00
bugfix: complex.nim compiles
This commit is contained in:
@@ -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__) \
|
||||
|
||||
@@ -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
0
lib/wrappers/tinyc.nim
Normal file → Executable file
Reference in New Issue
Block a user