Clozure CL: Ticket #830: (abs #c(1d300 1d300)) signals overflow
https://trac.clozure.com/ccl/ticket/830
<p>
As the subject says, <tt>(abs #c(1d300 1d300))</tt> signals an overflow. But in fact, the answer is approximately <tt>1.414d300</tt>, which still fits in a <tt>double-float</tt>.
</p>
<p>
The implementation is probably just doing <tt>sqrt(x^2+y^2)</tt>. A better answer can be achieved using <tt>|x|*sqrt(1+(y/x)^2)</tt> if <tt>|x| >= |y|</tt>, with obvious modifications for <tt>|x| <= |y|</tt>.
</p>
en-usClozure CLhttps://trac.clozure.com/ccl/chrome/site/logo.png
https://trac.clozure.com/ccl/ticket/830
Trac 1.0.9rmeThu, 10 Mar 2011 18:05:01 GMTowner set
https://trac.clozure.com/ccl/ticket/830#comment:1
https://trac.clozure.com/ccl/ticket/830#comment:1
<ul>
<li><strong>owner</strong>
set to <em>rme</em>
</li>
</ul>
TicketrmeFri, 11 Mar 2011 19:30:09 GMTstatus changed; resolution set
https://trac.clozure.com/ccl/ticket/830#comment:2
https://trac.clozure.com/ccl/ticket/830#comment:2
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
</ul>
<p>
(In <a class="changeset" href="https://trac.clozure.com/ccl/changeset/14673" title="When computing the absolute value of a complex number,
be a little ...">[14673]</a>) When computing the absolute value of a complex number,
be a little more careful about it.
</p>
<p>
hypot in libm is even more careful, and one could
certainly make the argument that we should just arrange
to ff-call that.
</p>
<p>
This new version conses more than what we were
previously doing, but seems to be about the same speed.
If this ends up being a performance issue, writing a
LAP version probably would not be too tough.
</p>
<p>
Fixes <a class="closed ticket" href="https://trac.clozure.com/ccl/ticket/830" title="defect: (abs #c(1d300 1d300)) signals overflow (closed: fixed)">ticket:830</a>.
</p>
Ticket