And Michael Ferguson writes:
> Jason, on a related note, what would you consider sane accessors?

Routines that pull out the bit fields (sign bit, exponent,
significand) as integers without further interpretation...  We
could argue about whether the exponent should be biased or not.

These don't exist for historical reasons involving mixing integer
and floating-point (see the discussion about int(32) and
real(32)) along with disagreements on what should / should not be
interpreted, what happens with signaling NaN (thanks, HP, for
having the opposite bit of everyone else), etc.

And Damian McGuckin writes:
> I just had a look at the current frexp/ldexp on BSD, not glibc, and they 
> look pretty hairy to try and implement in-line.

x87 supports them in hardware, or close enough that the pointer
store to a local variable would be optimized out.  I don't know
about SSE and crew so perhaps that's why it isn't being inlined
now.

> Also, without trying to kill the discussion, aren't we are starting to 
> digress from Chapel'ness of the discussion. Just my 2c comment.

For Chapel, this becomes a question of how to support "important"
things that almost no one uses or knows how to use carefully.
Also, some targets may not support all the necessary pieces.
Some languages (like a certain snake one) decided to throw
everything out just in case some platform doesn't support
something.

Both the C99 and Fortran IEEE754 support are thoughtful and good
starting points.  The bit twiddling pieces are analogous to
unpacking anything held in the wrong register, and those
languages both have their ways (unions with bitfields, TRANSFER).

It'd be nice to support exceptional behavior more cleanly, but
that's my old and ignored hobby horse with significant effort for
little use.  With infinite time, I'd be futzing with this in
either Chapel or Julia, but...


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to