English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2006-11-16 (18:02)
From: Chris King <colanderman@g...>
Subject: Complex NaN / infinity?

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

- Chris King

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