Use of C99 extra long double math functions after r236148

Peter Jeremy peter at rulingia.com
Sun Aug 12 22:54:38 UTC 2012


On 2012-Jul-16 21:01:18 -0700, Steve Kargl <sgk at troutmask.apl.washington.edu> wrote:
>On Mon, Jul 16, 2012 at 10:40:25PM -0500, Stephen Montgomery-Smith wrote:
>> 
>> I came up with pseudo code that looks a bit like this.
...
>Stop.  Please see msun/src/math_private.h. You cannot
>use I in any expression.

Note the "pseudo code" reference.  I agree that the actual code has to
jump through hoops to avoid compiler issues with complex arithmetic
but doing that for pseudocode just obfuscates it.

>Also, consult n1256.pdf for x,y = +-0, +-inf, nan. 
>There are specific requirements that must be met.

Again, handling the special cases listed in G.6 is all just
boilerplate code that we can take as assumed for pseudocode.  IMO, it
would be nice if we could come up with a formal, compact (one/line per
rule) representation of G.6 that could be pre-processed into wrapper
code that handles all the 0/Inf/NaN special-cases and then calls
FOO_finite() which has the hand-written code to handle "normal" cases.

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-numerics/attachments/20120812/99a0cdb5/attachment.pgp


More information about the freebsd-numerics mailing list