Version française
Home     About     Download     Resources     Contact us    
Browse thread
Complex NaN / infinity?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris King <colanderman@g...>
Subject: Complex NaN / infinity?
Hi,

It's been reported before as a bug [1] that Caml's Complex module
doesn't properly support complex NaN and infinities: the current
behavior is that expressions such as "div one zero" return a complex
number with real and imaginary parts both set to NaN.  The proper
behavior would be to return a value representing directed or complex
infinity, depending on whether "zero" is directed or not.  Avoiding
infinite results doesn't help either, since expressions such as "pow
zero one" rely on infinity internally.

Has anyone made a replacement module fixing these problems?  I've
started work on a replacement which uses both polar and Cartesian
representations internally but I figure I'd ask before duplicating
work.

- Chris King

[1] http://caml.inria.fr/mantis/view.php?id=1817