<html>
<body>
<font size=3>At 9/27/2010 11:09 AM, Patrick R. Michaud wrote:<br>
<blockquote type=cite class=cite cite="">On Sun, Sep 26, 2010 at
01:58:13PM -0400, Paul C. Anagnostopoulos wrote:<br>
> Folks,<br>
> <br>
> Should PMC functions with partial complex ranges promote their
result to a<br>
> Complex? For example, should sqrt(negative Float) produce a Complex?
<br>
> This issue does not pertain to native numbers, since we never
promote <br>
> them to PMCs.<br><br>
I would tend to vote "no" here. Most languages would
expect<br>
sqrt(negative Float) to throw an exception, and if a language<br>
wants the possibility of a complex result it's trivially simple<br>
to promote a Float to a Complex prior to calling the
function.</blockquote><br>
Throw an exception, or return NaN? Right now most math functions return
NaN or garbage on range errors or on complex domains.<br><br>
~~ Paul<br>
</font></body>
<br>
<body>
<font size=3><br>
----------------------------------------------------------------<br>
<b><i>Windfall
</i></b>
Paul C. Anagnostopoulos <br>
----------------------------------------------------------<br>
<b><i>Software</i></b>
978 371-2316 <br>
<a href="http://www.windfall.com/" eudora="autourl">www.windfall.com<br>
</a>----------------------------------------------------------------<br>
Metaphorical invocations ... often suffer from the<br>
weakness of giving such satisfaction to the human<br>
mind that they tend to be mistaken for incisive and<br>
illuminating observations. ---Torkel Franzen</font></body>
</html>