summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-desktop>2009-12-10 23:59:19 +0100
committerAndreas Rumpf <andreas@andreas-desktop>2009-12-10 23:59:19 +0100
commit911c1cb301a8483e463772b785b0aee79cf2a68c (patch)
treed9f391bd6c1b56858663766c2635eb028aaf4526 /lib
parent033c28f1115bafd901e9db656beeb05e7b6034c9 (diff)
downloadNim-911c1cb301a8483e463772b785b0aee79cf2a68c.tar.gz
added configuration file for TeX
Diffstat (limited to 'lib')
-rwxr-xr-xlib/system.nim20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 174d739cd..4dbc0a93d 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -219,6 +219,26 @@ type
     object of ESynch ## is raised if an object is converted to an incompatible
                      ## object type.
 
+  EFloatingPoint* = object of ESynch ## base class for floating point exceptions
+  EFloatInvalidOp* {.compilerproc.} = 
+    object of EFloatingPoint ## Invalid operation according to IEEE: Raised by 
+                             ## 0.0/0.0, sqrt(-1.0), and log(-37.8) for example.
+  EFloatDivByZero* {.compilerproc.} = 
+    object of EFloatingPoint ## Division by zero. Divisor is zero and dividend 
+                             ## is a finite nonzero number 
+  EFloatOverflow* {.compilerproc.} = 
+    object of EFloatingPoint ## Overflow. Operation produces a result 
+                             ## that exceeds the range of the exponent
+  EFloatUnderflow* {.compilerproc.} = 
+    object of EFloatingPoint ## Underflow. Operation produces a result 
+                             ## that is too small to be represented as 
+                             ## a normal number
+  EFloatInexact* {.compilerproc.} = 
+    object of EFloatingPoint ## Inexact. Operation produces a result that cannot 
+                             ## be represented with infinite precision -- 
+                             ## for example, 2.0 / 3.0, log(1.1) 
+                             ## NOTE: Nimrod currently does not detect these!
+
   TResult* = enum Failure, Success
 
 proc sizeof*[T](x: T): natural {.magic: "SizeOf", noSideEffect.}